Jump to content

Selecting Folders/Files in Windows..


Recommended Posts

I have an existing piece of software that I am trying to automate and am having trouble accessing the Windows dialog. I can get to the window where there is a drop down box to select a drive/folder where the files are located. It is changing this location through Autoit that has been difficult to do. Once the correct location is set then I think I can acces the files ok.

Any suggestions on how to do this?

I have tried ControlFocus and ControlSend after the window is active with no luck.

Thanks.

Link to comment
Share on other sites

The Windows software is called PDF Tools and allows me to merge PDFs. I know based on which project I am working on, where the PDFs exist. This is not a problem. The issue is getting the open dialog to accept a directory/folder selection based on where the files are. I can create the string for this no problem, just need to get PDF Tools to accept the new location.

ShellExecuteWait ("C:\Program Files\PlotSoft\PDFill\PDFill_PDF_Tools.exe")

WinWaitActive("PDFill PDF Tools 6.0 (Free and No Watermark)")

;open merge pdf files

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

WinWaitActive("Free PDF Tools: Merge PDF Files")

Send("{TAB}")

Send("{ENTER}")

WinWaitActive("Add PDF Files to be Concated")

Here it is waiting for input...

Thanks.

Link to comment
Share on other sites

What does the information from the Au3Info (normally located -> c:\Program Files\AutoIt3\Au3Info.exe) say?

"Human kind cannot gain anything without first giving something in return, to obtain; something of equal value must be lost."The Help File is truly your friend.

Link to comment
Share on other sites

Window Info shows:

Title: Add PDF FIles to be Concated

Class:#32770

ComboBox

Instance: 1

Yes, it just sits there allowing you to navigate to a new location. Of course the default location has files in it, but I need to move to a different one.

Thanks!

Link to comment
Share on other sites

Replace this:

WinWaitActive("Add PDF Files to be Concated")

with this:

WinWaitActive("Add PDF files to be Concated")

ControlSend("Add PDF files to be Concated", "", "Edit1", "C:\file.pdf{ENTER}")

i downloaded the software and the title differ "Add PDF files to be Concated" ..so change it to what ever you got ..

Edited by DARKwind
Link to comment
Share on other sites

DARKwind,

When I replace the line as suggested with ControlSend("Add PDF files to be Concated", "", "Edit1", "D:\PROJECTS\C000-C099\C03131-00A\1.pdf{ENTER}")

It opens the dialog ok and inserts the path into the File Name location, but it inserts it as D:|PROJECTS\C000-C099\C03131-00A\1.pdf

If I manually correct the "|" to "\" it will load the file correctly. Any ideas why it is changing the backslash ?

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