Sign in to follow this  
Followers 0

Help Please

3 posts in this topic

Posted

I made a very very noobie script to click 2 spots on my desktop over and over, it doesn't ever stop, it just keeps executing itself:

MouseClick("left", 206, 267, 5)
MouseClick("left", 206, 267, 5)
Sleep(100)
MouseClick("left", 242, 260, 5)
MouseClick("left", 242, 260, 5)
Sleep(100)

Run("click.exe")

I need to make one that does the same thing except hotkeyed to pause and start, and not including the run thing.. how can I make it just repeat itself without the run?

And how do you hotkey stuff?

Also it would be cool if I could get the desktop coords from a .ini file, like the macro shown at this thread.

I tried just editing the one in the above thread so that it would click two spots instead of just one but couldn't figure it out B) man I'm such a noob :whistle:

Share this post


Link to post
Share on other sites



Posted

From the help file (example for HotKeySet):

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here;;;;
While 1
  MouseClick("left", 206, 267, 5)
  MouseClick("left", 206, 267, 5)
  Sleep(100)
  MouseClick("left", 242, 260, 5)
  MouseClick("left", 242, 260, 5)
   Sleep(100)
WEnd
;;;;;;;;

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()
    MsgBox(4096,"","This is a message.")
EndFunc

Share this post


Link to post
Share on other sites

Posted

Thanks, I've got it figured out now :whistle:

Share this post


Link to post
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
Sign in to follow this  
Followers 0