Sign in to follow this  
Followers 0
Patsie

Need quick help with this script

4 posts in this topic

Ok, so I setup my other two scripts fine. Now I just need this one to work so that it right clicks or performs the action every second instead of however long it does it. Right now it only happens every so often, all I want is it to happen every second. Thanks.

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

Global $Paused, $t

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("{F8}", "Showme")

;;;; Body of program would go here;;;;

While 1

If $t = 1 Then

MouseClick("right",0,0);rightclicks at the coordinates x=205,y=531

Sleep(60 * 1)

EndIf

Sleep(10)

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 Showme()

If $t = 0 Then

$t = 1

Return

EndIf

If $t = 1 Then

$t = 0

Return

EndIf

EndFunc

Share this post


Link to post
Share on other sites

Mm, try this:

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

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



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

Func _Click()
    If $t = 1 Then
        MouseClick("right", 0, 0);rightclicks at the coordinates x=205,y=531
    EndIf
EndFunc

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()
    If $t = 0 Then
        $t = 1
        _Click()
        AdlibEnable("_Click",60000)
        Return
    EndIf
    If $t = 1 Then
        $t = 0
        AdlibDisable()
        Return
    EndIf
EndFunc   ;==>Showme

Share this post


Link to post
Share on other sites

Mm, try this:

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

Global $Paused, $t
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F8}", "Showme")
;;;; Body of program would go here;;;;
While 1
    Sleep(25)
WEnd
;;;;;;;;

Func _Click()
    If $t = 1 Then
        MouseClick("right", 0, 0);rightclicks at the coordinates x=205,y=531
    EndIf
EndFunc

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()
    If $t = 0 Then
        $t = 1
        _Click()
        AdlibEnable("_Click",60000)
        Return
    EndIf
    If $t = 1 Then
        $t = 0
        AdlibDisable()
        Return
    EndIf
EndFunc   ;==>Showme

Share this post


Link to post
Share on other sites

Ok! I have understood. <_< I`m just insert MsgBox(0, "", $Paused) after $Paused = Not $Paused and i have see what happened here.

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