Sign in to follow this  
Followers 0
PsychodelEKS

Sending EXIT code to the app

7 posts in this topic

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. :whistle:

Any suggestions are welcome.

Currently this is needed for Miranda, Launchy and KeePass, but virtually should work on any, if possible.

Share this post


Link to post
Share on other sites



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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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 :whistle:

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

WinClose()

ProcessClose()

Have look at those two

Tnx, 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 :whistle:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0