Jump to content

Need help linking files to program


mel2000
 Share

Recommended Posts

I just downloaded AutoIt and read a few examples but am having trouble getting started on what I want AutoIt to do. I want to open the Mediachance ColorcastFX app, which processes one file at a time, and automate it to have it process and save either one file at a time, or multiple selected files, if possible. The files are all located in the same directory.

Once the app is opened, the user selects a profile that applies to all subsequently opened images. The Open File dialog is launched by pressing the Load button. Once opened, ColorcastFX automatically processes that image. I then save that image by pressing the Save button. From there, I load the next image. Finally, I would like to send a Message Box telling me when all processing is done. I want to exit the app manually.

First, I'd like to know if it's possible foe AutoIt to force a program that handles one file at a time to process multiple files in turn.

Once opened by AutoIt, how do I tell the script to wait for me to select a profile before launching an Open File dialog box?

How would I tell ColorcastFX to process each file in a directory?

How would I tell ColorcastFX to save the processed files in a different directory?

The app *always* defaults to jpeg for saving. How can I make it automatically save the image as png?

The app does not have shortcut keys, just Load, Save and Exit buttons. Does that make a difference in how AutoIt opens, saves, and exits? Any assistance in getting me started would be greatly appreciated. Thanks.

Edited by mel2000
Link to comment
Share on other sites

Welcome to the AutoIt forums, mel2000 (not passe in the least) !

... First, I'd like to know if it's possible foe AutoIt to force a program that handles one file at a time to process multiple files in turn.

AutoIt is good for doing this - study the Help file under: AutoIt > Function Reference > Window Management

Once opened by AutoIt, how do I tell the script to wait for me to select a profile before launching an Open File dialog box?

You would need to build a GUI - and put GUICtrlCreateRadio's would work good for this - have a Radio button for each folder listed directly under C:\Documents and Settings, perhaps with the exception of a few of the folders there.

The app does not have shortcut keys, just Load, Save and Exit buttons. Does that make a difference in how AutoIt opens, saves, and exits? Any assistance in getting me started would be greatly appreciated. Thanks.

I would make sure there aren't any shortcut keys, but elsewise, there are ways to send button clicks:

From - Help file > AutoIt > Function Reference > Window Management > Controls:

ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )

Das Häschen benutzt Radar

Link to comment
Share on other sites

First, thank you for your quick reply, Squirrely1. I'll see how far I can get going on your recommendations.

I'm going to have to skip the recommendation of creating a GUI. How about if I start my AutoIt with the program already launched, and the profile already selected? My AutoIt script would initiate after I clicked the Load button to select the files I want to be processed. That seems simpler.

Regarding the ControlClick code: Are the coordinates relative to the app's window coords? IOW, would they stay the same if I moved the client window around?

Thanks again.

Link to comment
Share on other sites

Regarding the ControlClick code: Are the coordinates relative to the app's window coords? IOW, would they stay the same if I moved the client window around?

Sorry it took so long to get back, but my computer is punking out because of some bogus updates I guess that came to my machine via Microsoft.

To use ControlClick is different from using the more familiar Send function - you don't need coordinates to click, so it won't matter where the window is. You use a reference to the control in the third parameter. To find out what that parameter should be you use the Window Info tool which you can get to this way:

Start button > All Programs > AutoIt v3 > AutoIt Window Info

With the "Contols" tab selected in the tool window, and with the target window also open, you hover your mouse cursor over the control to get the control's ClassnameNN. Then if the control has a ClassnameNN of, for instance: Edit1, then this would be used in the third parameter of the ControlClick function:

"[CLASSNN:Edit1]"

Read all about this sort of thing in the Help file under:

AutoIt > Using AutoIt > Controls

Edited by Squirrely1

Das Häschen benutzt Radar

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