bobbyab9987 Posted January 29, 2016 Share Posted January 29, 2016 Hi friends, Suppose MyProgram is a tabbed program, meaning that it allows for opening multiple files in the same instance. I want to open File1, File2 and File3 in one instance of MyProgram from an AutoIT script. How can I do this? I have read the AutoIT Help File about "ShellExecute" and "Run", but I have found nothing helpful. Thanks for reading my question. Any answer would be very appreciated. Link to comment Share on other sites More sharing options...
kylomas Posted January 29, 2016 Share Posted January 29, 2016 Hi bobby, What do you mean by "tabbed program"? What kind of files do you want to open? For best results post code that is representative of the question\problem you have. Kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
MilesAhead Posted January 29, 2016 Share Posted January 29, 2016 This thread has some approaches you can see using AutoIt. Generally the pattern sounds like the tabbed application that would display a file per tab would be considered the Primary Instance of the application. Other copies of the program that just pass the command line on to the Primary are considered Secondary instances. They pass on the command line params, then exit. The are many forms of Interprocess Communication or IPC that can be used on Windows. The thread I linked has some done in AutoIt. But you could roll your own using Windows API calls via the DllCall function. My Freeware Page Link to comment Share on other sites More sharing options...
bobbyab9987 Posted January 30, 2016 Author Share Posted January 30, 2016 (edited) Hi Kylomas, pls see MilesAhead's post to understand my question more clearly. Thank you. Hi MilesAhead, thank you for your answer. This seems to be complicated if we use just AutoIT to accomplish this task. I decided to combine AutoIT and a Windows batch file to achieve the same task, but with a simpler programming skill required. Edited January 30, 2016 by bobbyab9987 Link to comment Share on other sites More sharing options...
TheSaint Posted January 30, 2016 Share Posted January 30, 2016 How are you getting your list of files? How are you opening the files? Command-line or browsing etc. If browsing, then look at the options for FileOpenDialog command in the 4th (Options) parameter - Multiselect. Command-line is possibly even simpler, providing you supply all the elements correctly (quotes etc). Other than that, I suggest you search for exactly what you want or provide some basic code that we can work with, especially so that we can get a clearer understanding of what you need. It shouldn't be that complicated, providing you understand a few basics. In fact, it seems to me that adding a batch file is only adding complexity ... but then I'm not entirely sure of what you are wanting to do. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) 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