PsychodelEKS Posted February 21, 2007 Share Posted February 21, 2007 Is there any way to send an application the EXIT code, like it is done by OS on windows shutdown. Need this to unmount my flash drive automatically. Any suggestions are welcome. Currently this is needed for Miranda, Launchy and KeePass, but virtually should work on any, if possible. Link to comment Share on other sites More sharing options...
lod3n Posted February 21, 2007 Share Posted February 21, 2007 http://www.autoitscript.com/autoit3/docs/keywords/Exit.htm [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
PsychodelEKS Posted February 21, 2007 Author Share Posted February 21, 2007 http://www.autoitscript.com/autoit3/docs/keywords/Exit.htmThanks for your participation, but I mean EXIT code to the app, not exit the script. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 21, 2007 Moderators Share Posted February 21, 2007 Thanks for your participation, but I mean EXIT code to the app, not exit the script.If you are talking about an external "window" you may want to look at _SendMessage() ... Providing you know what the exit codes are.If you are talking about the process itself... well I'm not quite sure on that one... but searching the MSDN data base might be the place to start. 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...
PsychodelEKS Posted February 21, 2007 Author Share Posted February 21, 2007 If you are talking about an external "window" you may want to look at _SendMessage() ... Providing you know what the exit codes are.If you are talking about the process itself... well I'm not quite sure on that one... but searching the MSDN data base might be the place to start.Thank for the clue. Though I though of smth less complicated :"> May be I'll have just to kill the processes that way Link to comment Share on other sites More sharing options...
Shevilie Posted February 21, 2007 Share Posted February 21, 2007 WinClose() ProcessClose() Have look at those two Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
PsychodelEKS Posted February 22, 2007 Author Share Posted February 22, 2007 WinClose()ProcessClose()Have look at those twoTnx, i thought of ProcessClose() myself, but it seems to be coarse, as an app may be wirting smth or etc. (like Miranda to its DB). I'll give WinClose a try anyway. If it catches the windows I need.I've also had an idea of using Unlocker (exe or dll) app, to check if there are any currently open descriptors for the folder.I'm tryung to implement script that would've copy a protected arch from my USB stick, extract it to specified folder, mout this folder as a drive, perform nesseccary files operations and launch apps. Then on the second run, if drive already found, it should close the apps (thats the topic), unmount the folder, compress it, remove folder itself, backup arc and move it to the stick. Thats it I came to this after my previous stick died of awesome write usage (as i think), cause I used to run all the apps from it and some (like Miranda), almost constantly write smth to disk. So think that was the cause of hardware failure (from 1Gb I resulted in ~300Mb). So now my launcher bacame more complicated. If anyone interested 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