amj6 Posted August 13, 2013 Share Posted August 13, 2013 hi, I have an application which has a menu option as File-> Open File (Inside File there is sub option as Open File). I want to write a autotoit script to open the application & open the file by using the above mentioned options. I tried teh script in the below mentioned ways 1. I used ControlSend. But the problem is the classname. When i use the Autoit windowinfo then the class name appears as [CLASS:Afx:00400000:8:00010005:00000000:0B261359]. How to use controlsend in the above case? 2. I tried using WinMenuSelectItem & it didnt work. But somewhere in the forum i read that WinMenuSelectItem can be used mostly for microsoft related tools & it wont work for other applications?is it true? Please let me know how to use script to open a file using my application. Link to comment Share on other sites More sharing options...
FireFox Posted August 13, 2013 Share Posted August 13, 2013 Hi,Welcome to the autoit forum You can try the WinMenuSelectItem function or the ControlSend function with !o as key combination.Br, FireFox. Link to comment Share on other sites More sharing options...
Artisan Posted August 13, 2013 Share Posted August 13, 2013 Also, many programs can open a file if you put the file name (and directory if needed) right after the application name. You can do it from command prompt, a Windows shortcut, even AutoIt (see ShellExecute and Run). Example: "Notepad.exe C:UsersArtisanDownloadsTextFile.txt" Link to comment Share on other sites More sharing options...
amj6 Posted August 14, 2013 Author Share Posted August 14, 2013 Hi, Thanks for your comments. Passing !o worked. Also will try second option of opening exe along with file but there lot of files that i want to open without closing the application. Link to comment Share on other sites More sharing options...
Artisan Posted August 14, 2013 Share Posted August 14, 2013 (edited) Also will try second option of opening exe along with file but there lot of files that i want to open without closing the application. In that case, you can use what I suggested to open the first file. It may work to open the remaining files that way (just don't close the application first). It also may open a new instance of the application, which may not be what you want. Either way, you've got a solution now. Edited August 14, 2013 by Artisan 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