ExoCore 0 Posted August 7, 2011 (edited) I already looked at using hot key.. but when I try doing this expandcollapse popup#include <Misc.au3> $g_szVersion = "ScriptBT" If WinExists($g_szVersion) Then Exit ; It's already running AutoItWinSetTitle($g_szVersion) HotKeySet( "{END}","_killEricMSBot") Func _killEricMSBot() ProcessClose("EricMSBot.exe") EndFunc MsgBox(0, "Guide to Start", "Start F9,Stop END,Pause Insert ") Global $Sending HotKeySet("{F9}", "ToggleSend") While 1 Sleep(100) WEnd Func ToggleSend() $Sending = NOT $Sending While $Sending Send('{ENTER}') Sleep(2000) Send('@reborn c') Sleep(4000) WEnd EndFunc HotKeySet("{Insert}", "TogglePause") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(15000) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc It doesnt pause like I want it too, it just keep going Edited August 7, 2011 by ExoCore Share this post Link to post Share on other sites
JohnOne 1,603 Posted August 7, 2011 (edited) EDIT:Forget my solution, just seen Edited August 7, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
wakillon 403 Posted August 8, 2011 Try expandcollapse popup#include <Misc.au3> Global $Sending , $Paused, $g_szVersion = "ScriptBT" If WinExists($g_szVersion) Then Exit ; It's already running AutoItWinSetTitle($g_szVersion) HotKeySet( "{END}","_killEricMSBot") HotKeySet("{Insert}", "TogglePause") HotKeySet("{F9}", "ToggleSend") MsgBox(0, "Guide to Start", "Start F9,Stop END,Pause Insert ") While 1 Sleep(100) WEnd Func _killEricMSBot() ProcessClose("EricMSBot.exe") EndFunc Func ToggleSend() $Sending = NOT $Sending While $Sending Send('{ENTER}') Sleep(2000) Send('@reborn c') Sleep(4000) WEnd EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(15000) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
ExoCore 0 Posted August 8, 2011 (edited) Try expandcollapse popup#include <Misc.au3> Global $Sending , $Paused, $g_szVersion = "ScriptBT" If WinExists($g_szVersion) Then Exit ; It's already running AutoItWinSetTitle($g_szVersion) HotKeySet( "{END}","_killEricMSBot") HotKeySet("{Insert}", "TogglePause") HotKeySet("{F9}", "ToggleSend") MsgBox(0, "Guide to Start", "Start F9,Stop END,Pause Insert ") While 1 Sleep(100) WEnd Func _killEricMSBot() ProcessClose("EricMSBot.exe") EndFunc Func ToggleSend() $Sending = NOT $Sending While $Sending Send('{ENTER}') Sleep(2000) Send('@reborn c') Sleep(4000) WEnd EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(15000) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc ty so much I got a question, how do i make something send(once every whatever) when I also want the other function to still running I see what i did wrong now Edited August 8, 2011 by ExoCore Share this post Link to post Share on other sites