muchki Posted December 22, 2019 Posted December 22, 2019 i am more or less happy with my code only the X button does not exit what can i do? I made an 'exit' button and it works pressing Esc works just the X button not working here's my code: URLTrimmer 1.5.2 12 21 2019.txt
Subz Posted December 22, 2019 Posted December 22, 2019 (edited) At line 39 add the while loop in a separate function example: ; use this for realtime testing ; https://www.autoitscript.com/autoit3/docs/functions/HotKeySet.htm ;~ Start monitoring the clipboard on script start-up _MonitorClipBoard() Func _MonitorClipBoard() While 1 Local $pingclip Local $origional Local $firstFourInClip = StringMid(ClipGet(), 1, 4) Local $http = "http" If $firstFourInClip = $http And $origional <> ClipGet() Then ExitLoop TrimItDown() ;~ Remember to exit the loop Else Sleep(200) EndIf WEnd EndFunc After GUIDelete() put the _MonitorClipBoard function example: ... Case $idButton_Exit Send("{Esc}") ExitLoop EndSwitch WEnd GUIDelete() _MonitorClipBoard() EndFunc ;==>TrimItDown Hope that makes sense. Edited December 22, 2019 by Subz
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