Brad Posted March 2, 2006 Share Posted March 2, 2006 I just finished my first autoit3 gui program, but i need some help with the finishing touches. its a grouping of network tools, and i need a way to stop a function from running Func taskl() $comp = InputBox ( 'Computer Name', 'Please enter the Computer Name' ) ;If @error Then Exit RunWait(@ComSpec & " /q /c pause | tasklist /s "&$comp&" /fo table") EndFunc this is just one of my functions, and i want it so that if someone clicks on the wrong button and they are asked for a computer name, and figure out it is not what they wanted to run and close the inputbox i want it to stop the function insted of contuining on. if i use "If @error Then Exit" it shuts down the entire program. i want to know it there is some kind of "If @error Then EndFunc" but that line does not work i tried it, but i want to know if there is something similar to stop the function from running. THANKS Link to comment Share on other sites More sharing options...
GrungeRocker Posted March 2, 2006 Share Posted March 2, 2006 (edited) Func taskl() $comp = InputBox ( 'Computer Name', 'Please enter the Computer Name' ) If NOT @error Then RunWait(@ComSpec & " /q /c pause | tasklist /s "&$comp&" /fo table") EndFuncedit: welcome to the forums! Edited March 2, 2006 by Analritter [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
Developers Jos Posted March 2, 2006 Developers Share Posted March 2, 2006 Return 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...
Brad Posted March 2, 2006 Author Share Posted March 2, 2006 Thanks everyone for your help!!!!!! Link to comment Share on other sites More sharing options...
GrungeRocker Posted March 2, 2006 Share Posted March 2, 2006 Thanks everyone for your help!!!!!! no problem have fun scripting! [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] 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