ame1011 Posted August 10, 2008 Share Posted August 10, 2008 Hi, I added a context menu to all files in windows (via the registry) so that I can right click on a file to launch my program and that's working fine. Problem is, if I select multiple files and run my program, one instance of my program is opened per file and the CmdLineRaw variable for each instance only contains that one file that is associated with that instance of the program. Is there any way to have my program only open one instance and process all the files? I want to achieve behavior like WMP's 'add to playlist' where windows media player is opened only once and all the songs are added to the playlist. [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
davecollinsnz Posted August 10, 2008 Share Posted August 10, 2008 Use _Singleton (look in help file) and have the ones that will close send the file name and path to the one that will stay open. Trust me to make SkyNet with AutoIt... Link to comment Share on other sites More sharing options...
LWC Posted December 9, 2010 Share Posted December 9, 2010 But how does _Singleton know to exit the script after the X files which you've selected, but not before launching the program with all of the collected parameters? Is there anyone out there with an actual working example? Thanks! 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