snaileater Posted July 17, 2008 Posted July 17, 2008 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 !
DaRam Posted July 17, 2008 Posted July 17, 2008 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 !
snaileater Posted July 18, 2008 Author Posted July 18, 2008 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 ...
JFee Posted July 18, 2008 Posted July 18, 2008 There might be a way, but sendkeys or controlsend should work fine. Regards,Josh
DaRam Posted July 18, 2008 Posted July 18, 2008 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 ...
FreeFry Posted July 18, 2008 Posted July 18, 2008 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
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