anyday Posted April 3, 2006 Share Posted April 3, 2006 guys here is my code The problem is i dont know how to get the script not to exit but stop on a certain event. If ProcessExists("sam.exe") Then If this processexists i want it to display a msg box telling them a program is open which works fine, but after they click OK on the msg box i need it to return them to the main GUI window? While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $current _ANIREAD() Case $msg = $Jeff $ani2 = FileReadLine( "c:\windows\ani.ini", 3 ) $var2 = StringInStr($ani2, "z") If $var2 Then $var3 = 1 Else $var3 = 0 EndIf If ProcessExists("sam.exe") Then MsgBox(0, "Error", "Please Close Sam before Switching agents.") Exit ElseIf ProcessExists("paris.exe") Then MsgBox(0, "Error", "Please close paris before switching agents.") EndIf If $var3 = 1 Then MsgBox(0, "Error", "Your currently viewing Jeff's Paris/Sam.") EndIf Case Else ;;;;;;; EndSelect WEnd Link to comment Share on other sites More sharing options...
Developers Jos Posted April 3, 2006 Developers Share Posted April 3, 2006 ExitLoop ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 3, 2006 Moderators Share Posted April 3, 2006 Just remove the Exit from under the MsgBox() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
anyday Posted April 3, 2006 Author Share Posted April 3, 2006 (edited) If i do an exitloop it terminates the script doesnt go back to main gui If i take the exit out it continues on to the next if which i dont need it to do i need it to go back to the main gui if that process exists Edited April 3, 2006 by anyday Link to comment Share on other sites More sharing options...
cdkid Posted April 3, 2006 Share Posted April 3, 2006 uhhh ContinueLoop? AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
anyday Posted April 3, 2006 Author Share Posted April 3, 2006 thanks thats what i needed Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 3, 2006 Moderators Share Posted April 3, 2006 If i do an exitloop it terminates the script doesnt go back to main guiIf i take the exit out it continues on to the next if which i dont need it to doi need it to go back to the main gui if that process existsAhh, yes then... cdkid got it on the nose... I didn't know that wasn't your main loop. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Neoborn Posted April 3, 2006 Share Posted April 3, 2006 If you are new to AutoIT and would like to get the basics down quicker, check out this awesome new coaching tool...And if you find it useful ...vote http://www.autoitscript.com/forum/index.php?showtopic=24117 ~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT 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