Jump to content
Sign in to follow this  
amj6

Not able to select menu item

Recommended Posts

amj6

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.

Share this post


Link to post
Share on other sites
FireFox

Hi,

Welcome to the autoit forum :)

You can try the WinMenuSelectItem function or the ControlSend function with !o as key combination.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Artisan

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"

Share this post


Link to post
Share on other sites
amj6

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.

Share this post


Link to post
Share on other sites
Artisan

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

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  

×