Patsie Posted November 9, 2007 Share Posted November 9, 2007 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 Link to comment Share on other sites More sharing options...
Nahuel Posted November 9, 2007 Share Posted November 9, 2007 Mm, try this: expandcollapse popup; 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 Link to comment Share on other sites More sharing options...
rasim Posted November 9, 2007 Share Posted November 9, 2007 Mm, try this: expandcollapse popup; 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 Link to comment Share on other sites More sharing options...
rasim Posted November 9, 2007 Share Posted November 9, 2007 Ok! I have understood. I`m just insert MsgBox(0, "", $Paused) after $Paused = Not $Paused and i have see what happened here. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now