Daniel W. 0 Posted June 17, 2006 Hi, was boring when i asked wOuter what to make he told me this: [22:43] Daniel: .... [22:43] Daniel: i want to code something but dunno what [23:00] wOuter: write something that makes up idees for you. [23:00] wOuter: xD [23:25] Daniel: xD So i have rewritten Exit Func _Exit() Switch @Compiled Case 1 Local $file1 =FileGetShortName( @ScriptFullPath ) Local $split = StringSplit( $file1 , "\" ) Local $file = $split[ $split[ 0 ] ] Select Case ProcessExists( $file ) ProcessClose( $file ) Case Not ProcessExists( $file ) SetError( 1 ) Return " " EndSelect Case 0 Local $file = "Autoit3.exe" Select Case ProcessExists( $file ) ProcessClose( $file ) Case Not ProcessExists( $file ) SetError( 2 ) Return " " EndSelect EndSwitch EndFunc Regards Hide Daniel W.'s signature Hide all signatures --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Share this post Link to post Share on other sites
SmOke_N 207 Posted June 17, 2006 (edited) Setting the @error is rather useless IMHO... You can play around with this, and it doesn't do anything that Exit doesn't do because you never get an error msg:$timer = TimerInit() While 1 $diff = TimerDiff($timer) / 1000 If $diff >= 6 Then MsgBox(0, '1', _Exit()) ToolTip($diff & @CR & @ScriptName, 0, 0) WEnd Func _Exit() If ProcessExists(@AutoItPID) Then ProcessClose(@AutoItPID) SetError(1) Return 0 EndFunc Edited June 17, 2006 by SmOke_N Hide SmOke_N's signature Hide all signatures 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. Share this post Link to post Share on other sites
MHz 76 Posted June 17, 2006 So, how does this UDF replace this Exit 1 Share this post Link to post Share on other sites
Daniel W. 0 Posted June 17, 2006 This was just for fun and not for a revolution in autoIT .... Hide Daniel W.'s signature Hide all signatures --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Share this post Link to post Share on other sites
SmOke_N 207 Posted June 17, 2006 (edited) My reply (as well as MHz's I'm sure) wasn't meant to be mean, it was just constructive criticism, I'm sure I could have worded mine better . Edited June 17, 2006 by SmOke_N Hide SmOke_N's signature Hide all signatures 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. Share this post Link to post Share on other sites
Daniel W. 0 Posted June 17, 2006 Oh k than i understood it wrong ( english 4 at school ^^ ) Sorry then Hide Daniel W.'s signature Hide all signatures --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Share this post Link to post Share on other sites
jvanegmond 303 Posted June 17, 2006 You must be off from school, you're spamming out scripts like a ... Like you're off from school ! Hide jvanegmond's signature Hide all signatures github.com/jvanegmond Share this post Link to post Share on other sites
Daniel W. 0 Posted June 17, 2006 Why do you flame ? I got a 1 in latein so fuck off ? And this is the Scripts and Scraps forum? And i posted A SCRIPT wow thats amazing or ? a script in the script forum wOOt lets flame him ... Hide Daniel W.'s signature Hide all signatures --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted June 17, 2006 (edited) dan calm down, i dont think he was flaming you at all, your the one thats starting up the flame. Edited June 17, 2006 by thatsgreat2345 Share this post Link to post Share on other sites
Richard Robertson 186 Posted June 17, 2006 Nice, a little pointless, but at least it is readable and makes sense. Now you need to make up something revolutionary! Share this post Link to post Share on other sites
jvanegmond 303 Posted June 19, 2006 Why do you flame ?I got a 1 in latein so fuck off ?And this is the Scripts and Scraps forum?And i posted A SCRIPT wow thats amazing or ? a script in the script forum wOOt lets flame him ...I meant: Wow that's amazing, You're doing a great job!! Keep them coming! Hide jvanegmond's signature Hide all signatures github.com/jvanegmond Share this post Link to post Share on other sites
Jos 1,844 Posted June 19, 2006 Which part makes sence ? I don't think its wise to ProcessClose() any program when it can be close in a normal fashion with Exit. Hide Jos's signature Hide all signatures 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. Share this post Link to post Share on other sites