Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A quick question about outputting integer variables
#1
Hello,

I've been using QM occasionally for a few months already and I've always been able to solve my problems using the help function.

Just this thing I can't figure out:

Code:
Copy      Help
int w1=act(win("sometitle -Notepad" "Notepad"))
lef 127 53 w1 1
int a
a=2
'"a"            ;; "a"

Obviously, this will type "a" in the notepad window. How can I get it to type "2", the value of integer a? So how can I get QM to type the value of an integer variable in another program, like Notepad? I assume the solution for this is awkwardly simple, yet I can't figure it out :p

Thanks in advance.
#2
Macro Macro693
Code:
Copy      Help
int w1=act(win("sometitle -Notepad" "Notepad"))
lef 127 53 w1 1
int a
a=2
str s=a
'(s)
#3
Need to convert the variable to string.
To create code you can use dialog 'Text'.
Macro Macro2322
Code:
Copy      Help
int a=2
key F"{a}"
;or
key (_s.from(a))
#4
Macro Macro694
Code:
Copy      Help
int w1=act(win("sometitle -Notepad" "Notepad"))
lef 127 53 w1 1
int a
a=2

paste a
#5
Thank you for the replies Smile Got what I need Wink


Forum Jump:


Users browsing this thread: 2 Guest(s)