AutoitMike 3 Posted May 18, 2022 Share Posted May 18, 2022 This not a programming issue. I know how to exit any loop. However, I sometimes goof up and I get into an infinite loop while developing an app and running it (.AU3 file) My win 7 keyboard has a "Pause" Break key where "Pause" is over the word "Break" Holding Ctrl and the "Pause" - "Break" key does not stop the program. Task manager does not show any process with the name of the app running. Is there any other clean way to "Break" a bad program? Thanks Link to post Share on other sites
spudw2k 276 Posted May 18, 2022 Share Posted May 18, 2022 Ctrl+Break works for me when running the script in SciTE. Otherwise, look for any AutoIt3.exe or AutoIt3_x64.exe processes and kill them. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to post Share on other sites
AutoitMike 3 Posted May 18, 2022 Author Share Posted May 18, 2022 I see a "HotKeySet" function. HotKeySet("{ESC}", "Terminate") Do While 1=1 Wend Func Terminate() Exit 0 EndFunc ;==>Terminate If I run the above program it will "Hang" until I press "Esc" and then quit?? Link to post Share on other sites
argumentum 960 Posted May 18, 2022 Share Posted May 18, 2022 Do until or While Wend but both ? Follow the link to see my signature's stuff.FAQ - Please Read Before Posting. Link to post Share on other sites
spudw2k 276 Posted May 18, 2022 Share Posted May 18, 2022 As @argumentum eluded to, there is no Do While syntac in AutoIt. It is either While => Wend, or Do => Until. https://www.autoitscript.com/autoit3/docs/intro/lang_loops.htm Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to post Share on other sites
Musashi 739 Posted May 18, 2022 Share Posted May 18, 2022 4 hours ago, AutoitMike said: However, I sometimes goof up and I get into an infinite loop while developing an app and running it (.AU3 file). Is there any other clean way to "Break" a bad program? If you want to terminate an .au3 script running in the SciTE editor (e.g. because it is frozen), then there is also the following option. In the taskbar there should be an AutoIt icon which, when you move the mouse pointer over it, shows the script name. A right click on the icon opens a dialog with an EXIT option. "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to post Share on other sites
argumentum 960 Posted May 18, 2022 Share Posted May 18, 2022 (edited) 12 hours ago, AutoitMike said: However, I sometimes goof up and ..... Same here. that's why I use Buy one, get one free PS: it has an emergency kill all AutoIt's Edited May 18, 2022 by argumentum spelling Follow the link to see my signature's stuff.FAQ - Please Read Before Posting. Link to post Share on other sites
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