Jump to content

Clicking Problem


Smiggle
 Share

Recommended Posts

Hey guys im pretty new to the forum and im having some trouble on my script. The script is working as i intended too except that sometimes it doesn't click or at least clicks are not being registered.

heres my script

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

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

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Func ShowMe()
    $Runner = Not $Runner
    While $Runner
        Sleep(1222)
        MouseClick("right",720,602,1)
        sleep (1222)
        Mouseclick("left",939,490,1)
        sleep (1222)
        MouseClick("left",1004,715,1)
        sleep (1222)
       
    WEnd
EndFunc   ;==>ShowMe
Link to comment
Share on other sites

Hello Smiggle,

First, Welcome to the AutoIt Forums :graduated:

The script example you provide, works for me, I tested by turning 'ShowMe()' on and off several times, without any problems. I believe the problem lies with the rest of the code which you did not supply.

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

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...