Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to write separate actions that repeat?
#1
I just learned a little bit about this. I'm just using pixel detection to press a key once it detects a change. Here are 2 I'm using (and the question below)

rep
    wait 0 C 0x000000 490 919 w 1
    wait 0.1
    key " "

rep    
    wait 0 C 0xCB53B4 920 1017 w 1
    wait 0.3
    key "d"

I want both of these to work independently of each other, and both repeat. Is there any way to make that work without 2 separate files?
#2
Macro Macro3400
Code:
Copy      Help
;/exe

int w=win("Untitled - Paint" "MSPaintApp")

int th1=mac("sub.Thread1" "" w)
int th2=mac("sub.Thread2" "" w)
wait 0 HMA th1 th2

#sub Thread1
function w
rep
,wait 0 C 0x000000 490 919 w 1
,out "color 1"
,wait 0.1
,;key " "

#sub Thread2
function w
rep
,wait 0 C 0xCB53B4 920 1017 w 1
,out "color 2"
,wait 0.3
,;key "d"

With the /exe the macro will run in separate process.


Forum Jump:


Users browsing this thread: 1 Guest(s)