Jump to content

Not able to select menu item


amj6
 Share

Recommended Posts

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

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

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 by Artisan
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...