Jump to content

Help me Script Pixel Monitor


 Share

Recommended Posts

Hello
I need help, I have to do a script where it does the following actions:
1) message welcome with OK button to start it
2) with the mouse let me choose 2 colored points (separated from each other autonomously) of the monitor to keep under control
3) as soon as you click on the colored points of the chosen monitor, it starts
4) each time the 2 selected points (with the mouse previously) change color, AutoIt automatically press F1 for the first point and F2 for the second point
5) with AltGr key = Pause, CrtlR key = Play

Can you help me? I can't do it xD
Thanks

Link to comment
Share on other sites

Global $Paused
HotKeySet("{End}", "TogglePause")
HotKeySet("{Home}", "Terminate")
HotKeySet("{Insert}", "ShowMessage")

msgbox(1, "bot", "Press [INSERT] to start. [HOME] will pause the bot. [END] quits the program.")

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
while 1
$coord = PixelSearch(651, 691, 0xE4262A) 
If @error Then
send("{f1}")
else
sleep(200)
endif
$coord1 = PixelSearch(630, 691, 0xE4262A)
If @error Then
send("{f1}")
Else
    sleep(200)
endif
wend
EndFunc

 

But Error Why?

 

asd.PNG

Link to comment
Share on other sites

  • Developers

You used Cut&Paste from another post as the script contains invalid characters. Change the File/Encoding to "Code page property" in SciTE, which will show these invalid characters.

After those are corrected you will find some more syntax errors in the code, but I first like to make it ultimately clear to you that game automation discussions aren't allowed around here! As this script is from a game related Thread, I can only assume you haven't read our forum rules yet so please do that now.

*click*

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...