AutoitMike Posted May 18, 2022 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
spudw2k Posted May 18, 2022 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 ◊ Junos Configuration Explorer ◊ 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 Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
AutoitMike Posted May 18, 2022 Author 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??
argumentum Posted May 18, 2022 Posted May 18, 2022 Do until or While Wend but both ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
spudw2k Posted May 18, 2022 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 ◊ Junos Configuration Explorer ◊ 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 Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Musashi Posted May 18, 2022 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."
argumentum Posted May 18, 2022 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 my code contribution ( and other things too ). FAQ - Please Read Before Posting.
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