Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with repeat command!
#1
Im trying to repeat a command not exactly the same but sort of but this message keep popping up, someone please help!


Error in <open ":1431: /87">Macro2:  this variable is already declared. If you want to use the same variable, remove the second declaration (typename and space before the variable).
Cannot start macro <open ":1431:">Macro2 while a macro is running. You may want to <fa "4466948 /1431">change 'If a macro is running' option or convert to function.
Cannot start macro <open ":1431:">Macro2 while a macro is running. You may want to <fa "4466948 /1431">change 'If a macro is running' option or convert to function.
Invalid trigger-string: options



This is is my code

int w=win("Bluestacks App Player" "*.Window.*")
lef 137 406 w 1 ;; '_ctl.Window'
5
int w1=win("Bluestacks App Player" "*.Window.*")
lef 464 492 w1 1 ;; '_ctl.Window'
5
int w2=win("Bluestacks App Player" "*.Window.*")
lef 372 551 w2 1 ;; '_ctl.Window'
key "Hey You"
int w3=win("Bluestacks App Player" "*.Window.*")
lef 932 552 w3 1 ;; '_ctl.Window'
5
int w4=win("Bluestacks App Player" "*.Window.*")
lef 27 73 w4 1 ;; '_ctl.Window'
5
int w5=win("Bluestacks App Player" "*.Window.*")
lef 28 70 w5 1 ;; '_ctl.Window'
5
int w6=win("Bluestacks App Player" "*.Window.*")
lef 246 410 w6 1 ;; '_ctl.Window'
5
int w1=win("Bluestacks App Player" "*.Window.*")
lef 464 492 w1 1 ;; '_ctl.Window'
5
int w2=win("Bluestacks App Player" "*.Window.*")
lef 372 551 w2 1 ;; '_ctl.Window'
key "Hey You"
int w3=win("Bluestacks App Player" "*.Window.*")
lef 932 552 w3 1 ;; '_ctl.Window'
5
int w4=win("Bluestacks App Player" "*.Window.*")
lef 27 73 w4 1 ;; '_ctl.Window'
5
int w5=win("Bluestacks App Player" "*.Window.*")
lef 28 70 w5 1 ;; '_ctl.Window'
5
#2
from a quick glance your error codes are because your using a macro which can only be run once and cannot be run again till it has completed all the code

but also you seen to be doing mouse clicks in the same window so i there is no need for all the declarations on the same window. Also you cannot  declare the same variable twice. 

slightly simplified  your code

Macro Macro2
Code:
Copy      Help
int w=win("Bluestacks App Player" "*.Window.*")
lef 137 406 w 1 ;; '_ctl.Window'
5
lef 464 492 w 1 ;; '_ctl.Window'
5
lef 372 551 w 1 ;; '_ctl.Window'
key "Hey You"
lef 932 552 w 1 ;; '_ctl.Window'
5
lef 27 73 w1 ;; '_ctl.Window'
5
lef 28 70 w 1 ;; '_ctl.Window'
5
lef 246 410 w1 ;; '_ctl.Window'
5
lef 464 492 w 1 ;; '_ctl.Window'
5
lef 372 551 w 1 ;; '_ctl.Window'
key "Hey You"
lef 932 552 w1 ;; '_ctl.Window'
5
lef 27 73 w 1 ;; '_ctl.Window'
5
lef 28 70 w 1 ;; '_ctl.Window'
5

if you need it to repeat the whole sequence use rep at the beginning

Macro Macro2
Code:
Copy      Help
int w=win("Bluestacks App Player" "*.Window.*")
rep 2
,lef 137 406 w 1 ;; '_ctl.Window'
,5
,lef 464 492 w 1 ;; '_ctl.Window'
,5
,lef 372 551 w 1 ;; '_ctl.Window'
,key "Hey You"
,lef 932 552 w 1 ;; '_ctl.Window'
,5
,lef 27 73 w1 ;; '_ctl.Window'
,5
,lef 28 70 w 1 ;; '_ctl.Window'
,5
,lef 246 410 w1 ;; '_ctl.Window'
,5
,lef 464 492 w 1 ;; '_ctl.Window'
,5
,lef 372 551 w 1 ;; '_ctl.Window'
,key "Hey You"
,lef 932 552 w1 ;; '_ctl.Window'
,5
,lef 27 73 w 1 ;; '_ctl.Window'
,5
,lef 28 70 w 1 ;; '_ctl.Window'
,5


Forum Jump:


Users browsing this thread: 1 Guest(s)