kripz Posted October 14, 2007 Share Posted October 14, 2007 When i right click the icon there is script paused and its ticked, what does this mean? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 14, 2007 Moderators Share Posted October 14, 2007 When i right click the icon there is script paused and its ticked, what does this mean?That you've paused the script/exe from running.If you want to "un-pause", click the check mark. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
kripz Posted October 14, 2007 Author Share Posted October 14, 2007 That you've paused the script/exe from running.If you want to "un-pause", click the check mark.How do i disable users from pausing the script, get rid of the pause option from the right click menu completely? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 14, 2007 Moderators Share Posted October 14, 2007 How do i disable users from pausing the script, get rid of the pause option from the right click menu completely?Look in the help file index under OptFind your choice:TrayAutoPause Script pauses when click on tray icon.0 = no pause1 = pause (default). If there is no DefaultMenu no pause will occurs. TrayIconDebug If enabled shows the current script line in the tray icon tip to help debugging.0 = no debug information (default)1 = show debug TrayIconHide Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.0 = show icon (default)1 = hide icon TrayMenuMode Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values.0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the "Default"-style (default).1 = no default menu2 = usercreated checked items will not automatically unchecked if you click it4 = don't return the menuitemID which has the "default"-style in the main contextmenu if you double click the tray icon8 = turn off auto check of radio item groups Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
murdock Posted October 15, 2007 Share Posted October 15, 2007 Im kinda curious how autoit does this? Ive never been able to pause scripts from my GUIs before if they were already in a while loop, but they do pause if I hit the tray button. How can I call whatever function its using? Link to comment Share on other sites More sharing options...
Nahuel Posted October 15, 2007 Share Posted October 15, 2007 You could try something like this: HotKeySet("{PAUSE}", "TogglePause") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(10) WEnd EndFunc Add this to your script and you can pause the execution pressing the pause key. Link to comment Share on other sites More sharing options...
Tasmania Posted October 15, 2007 Share Posted October 15, 2007 (edited) Im kinda curious how autoit does this?Ive never been able to pause scripts from my GUIs before if they were already in a while loop, but they do pause if I hit the tray button.How can I call whatever function its using?The easiest way to pause a script is to do the following:Global $Paused = 0HotKeySet("{PAUSE}", "pause")Func pause() $Paused= NOT $Paused While $Paused sleep(100) TraySetState(4) WEnd TraySetState(8)EndFuncModified from somewhere within the help file. Edited October 15, 2007 by Tasmania Link to comment Share on other sites More sharing options...
Tasmania Posted October 15, 2007 Share Posted October 15, 2007 You could try something like this: HotKeySet("{PAUSE}", "TogglePause") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(10) WEnd EndFunc Add this to your script and you can pause the execution pressing the pause key.I don't reccomend putting the sleep at 10 miliseconds as this causes more polling on the CPU. I reccomend setting sleep to 100 ms or maybe even 2 or 300 ms... however what you may need is up to you. Link to comment Share on other sites More sharing options...
Nahuel Posted October 15, 2007 Share Posted October 15, 2007 I don't reccomend putting the sleep at 10 miliseconds as this causes more polling on the CPU. I reccomend setting sleep to 100 ms or maybe even 2 or 300 ms... however what you may need is up to you.Yeah, that's actually a typo. It said 100. Thanks for noticing. Link to comment Share on other sites More sharing options...
murdock Posted October 15, 2007 Share Posted October 15, 2007 I don't reccomend putting the sleep at 10 miliseconds as this causes more polling on the CPU. I reccomend setting sleep to 100 ms or maybe even 2 or 300 ms... however what you may need is up to you.Ya I will fool with the timing. I'm a big fan of straining the CPU as little as possible.Thanks for the lighning quick replies too 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