bucky002 Posted June 9, 2006 Posted June 9, 2006 Bucky, with that example you never leave your loop..While ProcessExists('iexplore.exe') ProcessClose('iexplore.exe') WEndIs more like it I think Edit: Or the example I gave with the Do/UntilEh, I see. Thanks, that will help me later on. Plus, yours looks prettier.
Uten Posted June 9, 2006 Posted June 9, 2006 Hey @SmOke_N, Your using sleep(1000)? From time to time I have found (visual experience, hunch - can't document it) that GuiGetMsg() will loose messages in the message pump with such a high sleep time. 250 is my maximum. Have you, or anyone else, experienced something like that? I don't now of it will affect HotKeySet calls since I have not used it much. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
i542 Posted June 11, 2006 Posted June 11, 2006 Try this: HotKeySet("z","_TerminateExplorer");HotKeySet sets Z for termnate key HotKeySet("!z","_ExitAutoIt");Alt+Z exits script While 1 Sleep(300) WEnd;waiting for hotkey Func _TerminateExplorer();terminate Explorer func $explorerPID=ProcessExists("iexplore.exe") If $explorerPID = 0 Then TrayTip("Internet Explorer close","No Internet Explorer window active",20,3) Else ProcessClose($explorerPID) EndIf EndFunc Func _ExitAutoIt() Exit EndFunc I can do signature me.
Moderators SmOke_N Posted June 11, 2006 Moderators Posted June 11, 2006 Hey @SmOke_N,Your using sleep(1000)? From time to time I have found (visual experience, hunch - can't document it) that GuiGetMsg() will loose messages in the message pump with such a high sleep time. 250 is my maximum.Have you, or anyone else, experienced something like that?I don't now of it will affect HotKeySet calls since I have not used it much.There is no GUI Uten ... But you are correct in your observations 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.
Uten Posted June 11, 2006 Posted June 11, 2006 There is no GUI Uten ... But you are correct in your observations Yes I know there is no GUI in this case and many of the "small sample" cases. But from what I see regarding GUI samples "bad habits" :"> tend to follow us around.That's why I was pointing it out and wondering. Nice to know it's not just my imagination that you can loose messages with a to high sleep setting Appreciate the clarification, thanks @SmOke_N. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
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