Jump to content

Need help with some problems


Recommended Posts

Hi. I'm new in scripts. I'm making auto-clicker and i need help. This is my code of script:

While 1
WinActivate("xxx")
            MouseClick("left",165 , 420, 4, 10)
                sleep (5500)
            MouseClick("left",165 , 420, 3, 10)
                sleep (1200)
            MouseClick("left",220 , 560, 4, 10)
                sleep (700)
            MouseClick("left",145 , 465, 4, 10)
                sleep (10000)
            WEnd

I want to add here some things:

- script pause when I press "Pause Break" key,

- script end work when I press "ESC" key,

- script end work when images:

E:\OFF\1.png

E:\OFF\2.png

E:\OFF\3.png

E:\OFF\4.png

appears.

If you can edit my script it will be great.

Sorry for my bad english, but I'm from Poland.

Link to comment
Share on other sites

This script will get you started but I'm not sure how to get the script to end when the images appear maybe someone else can help you with that. Check the help file out for HotKeySet to be able to modify the script the way you want.

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")


While 1
WinActivate("xxx")
    MouseClick("left",165 , 420, 4, 10)
        sleep (5500)
    MouseClick("left",165 , 420, 3, 10)
        sleep (1200)
    MouseClick("left",220 , 560, 4, 10)
        sleep (700)
    MouseClick("left",145 , 465, 4, 10)
        sleep (10000)
WEnd
            
            
            
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

1. Download Image Search form here because it took me a while to find it: ImageSearch

2. As JohnOne asked do a forum search for "ImageSearch" and read thru those post to find answers and examples for what you want to do.

jfcby

Edited by jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

I tried much time to do it work, but I think it can't read my images. In attachment I send you files of my script. After passing test, I want to replace test.bmp with pictures of another pokemon. I want to it do:

Posted Image

Here click picture next to text "Good Rod" or click on text "Good Rod"

Wait 5-6 seconds

Posted Image

Here find picture fight.bmp and click on it

Wait 0.7 second

Posted Image

Here find picture slam.bmp and click on it

Wait 10.5 seconds

And again click next to Good Rod

etc.

ImageSearchDemo worked good, but when I replaced it with my screenshot, it automatically went to the end.

Hotkeys for pause and exit.

And exit when image xxx.bmp or yyy.bmp appears:

Posted Image

Not alder, I mean elder.

If someone can check it, please do it.

I got a question. Is that script hard to do as second script?

Kolo

fishing.rar

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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