Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
edit text subtract help
i guess last time i asked this question i didn't explain it to well, i need help getting win text from two different static texts on a dialog and subtracting one of those text from the other text,
Copy      Help
str a.getwintext(id(3 "Dialog"))
str b.getwintext(id(4 "Dialog"))
;;then subtract id(4 "Dialog"))
;;from id(3 "Dialog"))
;; say id(3 "Dialog")) has an amount of 1000
;; and id(4 "Dialog")) has an amount of 250
;; subtract 250 from 1000 would = 750 so that would break
;; if id(4 "dialog")) has an amount of 500 subtract that from id(3 "Dialog")) that would = 500 then out ret
;;if = 500 out
    else, break
Thanks For Any Help Added Smile
For arithmetic operations use numeric variables, for example int or double. Use function val to convert string to number.

double aN=val(a 2)
double bN=val(b 2)
double result=aN-bN
if result=500
,out result
else break
haha thanks i figured i would have to transfer it to alphabetical letters thats were i was having trouble at because you cant use the same var twice unless you use it in a different function or using variant i think , i have to read qm help again to refresh some data lol ,
but yea it worked in a test if any further ;errors i will let you know
Thanks for the help...

Forum Jump:

Users browsing this thread: 1 Guest(s)