• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Any way to write a script for a program that doesn't have scripting functionality?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I want a way to automate tasks between several different programs from within Windows 7 x64 (Adobe Lightroom and PTlens)

Here's my workflow:

1. I import photos into Adobe Lightroom and this is where I want it to automate:

2. Group every 9 photos into a group (Photo > Stacking > Auto Stack By Capture Time > OK)

3. File > Plug Ins > Blend Exposures > OK

4. After this operation is done, which can take an hour, I want the script to issue commands to sort the photos by filename via Lightroom, then select them and open them in PTlens.

5. In PTlens I want to click "OK" over and over until all the photos have been processed through PT lens.


Where do I even start for something like this?
 
this can be done anywhere from way complex, to way simple.

With the complex method, you gain the a sure knowledge that you have done the task you want to do (more on that later) and with the simple method, well, it is simple to do.

The simple method is really just recording positions for the mouse to click on, and then telling it to click there (as well, you could record hotkeys for the keyboard to execute.) This has the problem that the window has to be in exactly the correct location in order for this to work. You can make it more robust with some simple color matching.

The more complex method involves injecting a DLL into photoshop and executing photoshop's native functions to accomplish what you want. The problem is, you have to both find the functions that you want to execute, and know what they do (some game hackers do this). It requires an in depth knowledge of Assembly, and in some ways, dumb luck.

If you go with the simple mouse movement/keyboard emulator, then the functions you'll want (in windows) are SetCursorPos, GetCursorPos, and SendInput
 
Welcome to the wonderful world of automation. If you choose the simple method, I'd use AutoIt and SciTE for AutoIt, both free. Use one of the recorder scripts (there seem to be two now) to get the basics; then edit the script to make sure it works when run.

I used to use software like this for automated testing. But don't run out and get that; it's very expensive, and not worth it for your application.
 
Back
Top