Jump to content

Open File dialog box of an external application ...


Recommended Posts

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 !

Link to comment
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 !

Link to comment
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 ...

Link to comment
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 ...

Link to comment
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

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...