HalleMike Posted July 27, 2017 Share Posted July 27, 2017 Hello to all, I've written a script using following part is inserted. Func _CallFolder() ; .... Local $_hDLL = DllOpen("user32.dll") ; .... ; .... While 1 ; .... ; .... If _IsPressed("1b",$_hDLL) then _Terminate($_hDll,$_iPID,$_hGUI) Sleep(10) WEnd ; .... ; .... EndFunc Func _Terminate($_para1, $_para2, $_para3) DllClose($_para1) ProcessClose($_para2) GUIDelete($_para3) Exit EndFunc The script is working right. But on typing "ESC" not only my script is closing all other open programs using "ESC" for termination too going closed. I've no idea why that happens. Maybe one of the "profis" can help me on it. Please ecxuse my bad English but I'm a German trying his best. Thank you and best regards, HalleMike Link to comment Share on other sites More sharing options...
Trong Posted July 27, 2017 Share Posted July 27, 2017 see here: Regards, Link to comment Share on other sites More sharing options...
HalleMike Posted July 28, 2017 Author Share Posted July 28, 2017 Thank you VIP. I hired the function HorKeySet() and fired the function _IsPressed() in my script and all things are fine. The script works how I want. But nevertheless I would like to know why I got this problem with _IsPressed(). I don't understand how it comes to "repeating after pressing a key". There're no words about it in the help explanation. Maybe you know it and have a minute to write it down here. Thanks again, HalleMike Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 28, 2017 Moderators Share Posted July 28, 2017 HalleMike, Quote There're no words about it in the help explanation Oh yes there are, because I added some code to the example in the Help file specifically to cover that case. You need to check for the key no longer being pressed in the function before returning - look for the code after the "Wait until key is released" comment. M23 shaqan 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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