Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble with a simple macro
#1
Haven't done much manipulation with variables and clipboard yet.

Not sure what is going on here.

==> All I want is to grab the number from the clipboard, multiply it by 18, and display an info box with the result. I keep getting 7 digit numbers as results

Code:
Copy      Help
;deb
int hwnd1=win()
int hwnd2=win("Excel" "")
if hwnd1 = hwnd2
,'Cc
str s
int i
s.getclip
s.rtrim("[]")
i=s
;out i
;out s

out i
i = i*18
s=i
out i
out s

any thoughts appreciated thanks
#2
i=s ;;assigns pointer to string

i=val(s) ;;converts string to integer
#3
thank you,
that did the trick


Forum Jump:


Users browsing this thread: 1 Guest(s)