Sign in to follow this  
Followers 0
snaileater

Open File dialog box of an external application ...

6 posts in this topic

Hi everybody,

i would like to automate the opening of files using the integrated Open File Dialog box of a currently running application. Is there any way to do it ? i wouldn't like to use fonctions such as Sendkeys ... Even if i use sendkeys i dunno how to specify the directory to search in ....

Thanks for help !

Share this post


Link to post
Share on other sites



Built in Auto It Help should be your first option. Failing which a Forum search would have pointed you to a thread from yesterday http://www.autoitscript.com/forum/index.ph...c=76107&hl=

Hi everybody,

i would like to automate the opening of files using the integrated Open File Dialog box of a currently running application. Is there any way to do it ? i wouldn't like to use fonctions such as Sendkeys ... Even if i use sendkeys i dunno how to specify the directory to search in ....

Thanks for help !

Share this post


Link to post
Share on other sites

Built in Auto It Help should be your first option. Failing which a Forum search would have pointed you to a thread from yesterday http://www.autoitscript.com/forum/index.ph...c=76107&hl=

Thanks for answering ... and thanks for ur worthful comment ... but the thread u mention is not answering my question :

I don't want to use any AutoIT "FileOpenDialog" functionnality but the open file dialog box of the external application (Mapinfo in this case...) that would be currently running ...

i just wonder if it's possible to automate that task (that i would like to be executed by Mapinfo in this case) by avoiding the use of senkeys commands ...

Share this post


Link to post
Share on other sites

There might be a way, but sendkeys or controlsend should work fine.


Regards,Josh

Share this post


Link to post
Share on other sites

Something like this, but with "Send" I'm afraid (Why do you want to avoid keyboard stuffing?)

ProcessWait("mapinfo.exe") ; Change as appropriate
While 1
  WinWaitActive("Open") ; Change as appropriate here and in the next line to Title of MapInfo's Open Dialog Window
  If WinActive("Open") Then
     Send("drive:\path_to\file.ext{ENTER}") ; Change as appropriate
     If Msgbox(4 + 32, "Confirm", "Continue Scanning for MapInfo Open Dialogs?") <> 6 Then
        ExitLoop
     End If
  EndIf
WEnd

I don't want to use any AutoIT "FileOpenDialog" functionnality but the open file dialog box of the external application (Mapinfo in this case...) that would be currently running ...

i just wonder if it's possible to automate that task (that i would like to be executed by Mapinfo in this case) by avoiding the use of senkeys commands ...

Share this post


Link to post
Share on other sites

Or, he could use something like this:

Run("notepad.exe")
ProcessWait("notepad.exe")

WinMenuSelectItem("[CLASS:Notepad]", "", "&File", "&Open")

If you're wondering about the & char before the item/subitem text, have a look in the helpfile about the WinMenuSelectItem function. muttley

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  
Followers 0