PEscobar Posted January 10, 2016 Share Posted January 10, 2016 So I made two scripts that I run at the same time, but whenever I press the hotkeys to end them, only one of them stops. I've tried having different hotkeys for both, having same hotkeys, starting them at different times, starting them at the same time and only one will end no matter how many times I hit the hotkey to end it. Link to comment Share on other sites More sharing options...
water Posted January 10, 2016 Share Posted January 10, 2016 (edited) Can you please give us more information?Why do you need to run those scripts at the same time and why do you want to end them with the same hotkey?Different hotkeys should work, so could you please post your code when you tried to different hotkeys? Edited January 10, 2016 by water algiuxas 1 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
algiuxas Posted January 10, 2016 Share Posted January 10, 2016 Hotkey is already in use, so other script can't set Hotkey. After switching years ago to Linux, sadly I don't use AutoIt anymore. Link to comment Share on other sites More sharing options...
water Posted January 10, 2016 Share Posted January 10, 2016 Correct.That's something the OP could have found himself by simply having a look at the help file!"If two AutoIt scripts set the same hotkeys, you should avoid running those scripts simultaneously as the second script cannot capture the hotkey unless the first script terminates or unregisters the key prior to the second script setting the hotkey." algiuxas 1 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
algiuxas Posted January 10, 2016 Share Posted January 10, 2016 (edited) I recommend to make contact with other script maybe with local TCP connection, file saving/reading, when it closes it would send data to other script that it was closed.Or easier way, just kill process/end task of other script. Edited January 10, 2016 by algiuxas Xandy 1 After switching years ago to Linux, sadly I don't use AutoIt anymore. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2016 Moderators Share Posted January 10, 2016 PEscobar,Why are you running "two scripts [...] at the same time" and trying to end them simultaneously? Would it not be more efficient to combine the two into a single script and so avoid the problem altogether?M23 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...
Trong Posted January 10, 2016 Share Posted January 10, 2016 HotKeySet("{ESC}", "_Exit") Func _Exit() Run(@ComSpec & " /c TASKKILL /F /T /IM script1.exe /IM script2.exe") EndFunc ;==>_Exit Regards, Link to comment Share on other sites More sharing options...
algiuxas Posted January 10, 2016 Share Posted January 10, 2016 It would be nice if you could write script here(if it wouldn't break forum rules) and maybe give us more details. After switching years ago to Linux, sadly I don't use AutoIt anymore. 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