Jump to content
Sign in to follow this  
Allegro

Selecting Folders/Files in Windows..

Recommended Posts

Allegro

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.

Share this post


Link to post
Share on other sites
DARKwind

Can you post more details about the windows dialog... ,also post your script, so we can check it...

Share this post


Link to post
Share on other sites
Allegro

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.

Share this post


Link to post
Share on other sites
archgriffin

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.

Share this post


Link to post
Share on other sites
Juvigy

Is it waiting to enter the file location and then to click the OK button ?

Share this post


Link to post
Share on other sites
Allegro

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!

Share this post


Link to post
Share on other sites
DARKwind

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

Share this post


Link to post
Share on other sites
Allegro

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 ?

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  

×