Hello,
I've been working with AutoIt for a little over 2 weeks now, and so far I've only created simple point and click automations.
It's working out great for me, but, I'd like to know if I can run multiple instances of AutoIt without one taking mouse control over the other. I want to be able to have a bunch of automations running, each working on its own, and I would like to run them on miminized windows so that I still have control over the computer.
Is this possible with AutoIt? Or must I run the automations on multiple computers?
Thanks!
EDIT: Also, if I'm running something minimized, how can I get the pixel colors at a certain coordinate inside the window? I don't think PixelGetColor will work, because that just grabs straight off the screen.
Here's my code, I want to be able to have this running multiple times, in multiple minimized windows.
CODEIf PixelGetColor ( 631 , 485 ) = 0xEDC21F Then
MouseClick ( "left" , 358 , 495 , 1 )
Sleep ( 300 )
Send ( "8768400995" )
MouseClick ( "left" , 631 , 485 , 1 )
Sleep ( 1200 )
ElseIf PixelGetColor ( 631 , 485 ) <> 0xEDC21F Then
Do
PixelGetColor ( 631 , 485 )
Until PixelGetColor ( 631 , 485 ) = 0xEDC21F
If PixelGetColor ( 631 , 485 ) = 0xEDC21F Then
MouseClick ( "left" , 358 , 495 , 1 )
Sleep ( 300 )
Send ( "8768400995" )
MouseClick ( "left" , 631 , 485 , 1 )
Sleep ( 1200 )
EndIf
EndIf
If PixelGetColor ( 578 , 382 ) = 0xEBE9ED Then
MouseClick ( "left" , 523 , 404 , 1 )
Sleep ( 300 )
MouseClick ( "left" , 358 , 495 , 1 )
Send ( "^a" )
Sleep ( 300 )
Send ( "8768400995" )
MouseClick ( "left" , 631 , 485 , 1 )
EndIf
;checks 2nd page
If PixelGetColor ( 849 , 563 ) = 0xE7A80C Then
MouseClick ( "left" , 849 , 563 , 1 )
ElseIf PixelGetColor ( 849 , 563 ) <> 0xE7A80C Then
Do
PixelGetColor ( 849 , 563 )
Until PixelGetColor ( 849 , 563 ) = 0xE7A80C
If PixelGetColor ( 849 , 563 ) = 0xE7A80C Then
MouseClick ( "left" , 849 , 563 , 1 )
EndIf
EndIf
;checks 3rd page
If PixelGetColor ( 568 , 624 ) = 0xE59C0A Then
Sleep ( 1000 )
MouseClick ( "left" , 344 , 100 , 1 )
MouseClick ( "left" , 134 , 130 , 1 )
MouseClick ( "left" , 67 , 412 , 1 )
MouseClick ( "left" , 181 , 413 , 1 )
Sleep ( 300 )
Send ( "^a" )
Sleep ( 300 )
Send ( "^x" )
MouseClick ( "left" , 356 , 129, 1 )
Sleep ( 300 )
MouseClick ( "left" , 373 , 450, 1 )
Sleep ( 300 )
Send ( "^v" )
MouseClick ( "left" , 568 , 624 , 1 )
EndIf
If PixelGetColor ( 568 , 624 ) <> 0xE59C0A Then
Do
PixelGetColor ( 568 , 624 )
Until PixelGetColor ( 568 , 624 ) = 0xE59C0A
If PixelGetColor ( 568 , 624 ) = 0xE59C0A Then
Sleep ( 1000 )
MouseClick ( "left" , 344 , 100 , 1 )
MouseClick ( "left" , 134 , 130 , 1 )
MouseClick ( "left" , 67 , 412 , 1 )
MouseClick ( "left" , 181 , 413 , 1 )
Sleep ( 300 )
Send ( "^a" )
Sleep ( 300 )
Send ( "^x" )
MouseClick ( "left" , 356 , 129, 1 )
Sleep ( 300 )
MouseClick ( "left" , 373 , 450, 1 )
Sleep ( 300 )
Send ( "^v" )
MouseClick ( "left" , 568 , 624 , 1 )
EndIf
EndIf
Sleep ( 1000 )
If PixelGetColor ( 413 , 399 ) = 0xEBE9ED Then
MouseClick ( "left" , 525 , 401 , 1 )
Sleep ( 300 )
MouseClick ( "left" , 373 , 450, 1 )
Sleep ( 300 )
Send ( "^v" )
MouseClick ( "left" , 568 , 624 , 1 )
EndIf
;clicks page
If PixelGetColor ( 350 , 421 ) = 0x6D523E Then
MouseClick ( "left" , 350 , 421 , 1 )
ElseIf PixelGetColor ( 350 , 421 ) <> 0x6D523E Then
Do
PixelGetColor ( 350 , 421 )
Until PixelGetColor ( 350 , 421 ) = 0x6D523E
If PixelGetColor ( 350 , 421 ) = 0x6D523E Then
MouseClick ( "left" , 350 , 421 , 1 )
EndIf
EndIf
;verifies page
If PixelGetColor ( 152 , 459 ) <> 0xFFFFFF Then
ElseIf PixelGetColor ( 152 , 459 ) = 0xFFFFFF Then
Do
PixelGetColor ( 152 , 459 )
Until PixelGetColor ( 152 , 459 ) <> 0xFFFFFF
Endif
If PixelGetColor ( 677 , 632 ) <> 0xEDC91D Or PixelGetColor ( 542 , 461 ) <> 0xEAD21C Then
Do
PixelGetColor ( 677 , 632 )
PixelGetColor ( 542 , 461 )
Until PixelGetColor ( 677 , 632 ) = 0xEDC91D Or PixelGetColor ( 542 , 461 ) = 0xEAD21C
EndIf
If PixelGetColor ( 677 , 632 ) = 0xEDC91D Then
Sleep ( 20000 )
MouseClick ( "left" , 676 , 642 , 1 )
SoundPlay ( "success.wav" , 1 )
Sleep ( 2147483647 )
EndIf
If PixelGetColor ( 542 , 461 ) = 0xEAD21C Then
MouseClick ( "left" , 403 , 161 , 1 )
Sleep ( 500 )
Send ( "^a" )
Sleep ( 500 )
Send ( "{ENTER}" )
EndIf
Until PixelGetColor ( 677 , 632 ) = 0xEDC91D
(It's pretty simple and not well done, but it works.)