Who is Participating?

Does PSP 8.1 have macros? I just googled and version 12 does have them.. I know AutoIT and KiXtart do allow the use of keypress and AutoIT has mouse movements too.. Also, VBScript has some key press functions too.. But, if you can do this as a macro in PSP, you will do way better than any external app/script that does the keypress/mouse movement will. :)

If you can use the WinWait or state checks in AutoIT, you will do better than implementing sleep.. I know that is kind of contradictory to what I just stated. LOL!.. Just thinking here a bit.. What is the application you are trying to automatically run? Irfanview? MS Paint? Maybe if you presented it that way, there maybe a better way to do what you are looking for? Most of the time, folks are looking either to re-size width x height or to compress the size of the graphic..

0

hrolsonsAuthor Commented: 2014-02-07

I'm using Paint Shop Pro v8.1. The above code:

1. Changes the image to 16 million colors.
2. Crops to what is selected.
3. Opens the Resize window.

Can you use the "AutoIT Window Info Tool" on the "Resize" Window and send through a screenshot of the results?

Example:
Sorry don't have PaintShop Pro, so have used FireWorks as an example, using the code below, I can detect based on the Title, Class and Instance and also only when that Instance has the text "Resize" in its name. You can gather that information using the AutoIt Window Info tool as shown above. Hope that makes sense.

Couple of questions:
So what does the Shift + R do?
Are you able to send me an example Image and specify exactly what you want it to do?

Have found an old copy of Jasc Paint Shop Pro 8.1 so can test, but would need exact instructions, before and after Resize command.

Personally, I don't like send commands, since the scripts can easily be broken by simply clicking the mouse off screen or pressing a key on your keyboard. Using a combination of the Jasc Script Tool and Batch Processing you can basically perform the actions on an entire directory easily without much trouble (see info below). However with that being said, there are some ways to actively force send keys, i.e. using combinations of WinActivate and WinWaitActive, so can show a few ways if you still want to go down that track.

Can you please try the following, on my system I had to change the focus from Per Cent to Pixels before changing the Height and Width. Pausing for 150ms between Send worked for me, you can of course change it higher/lower within the SendKey Function.

Unfortunately all the tests I've done, I wasn't able to reproduce the error at 150ms, although PaintShop Pro 8.1 was installed on a new Window 7 x64, computer with 8GB ram that was sitting in my office. Please note I also got the memory error, but that was because as mentioned above, the default setting for me was "Per cent" rather than "Pixels", so it was attempting to resize the image by 879% the highest value, which understandably caused the memory error. Maybe your machine is changing to Per Cent rather than Pixels? Also all the images I had were already 16 million colours couldn't find any in my collection that wasn't, was using large 3995 x 3995 image as well.

There is a very cool AutoIT forms editor that is available called Koda.. Most of the pages are in Russian, but the program does indeed support English.. Very cool and insightful for coding up things like this. Have also used AdminScriptEditor even though they just went out of business..

0

hrolsonsAuthor Commented: 2014-02-09

Entered your code and it reported sending the correct keys.

0

hrolsonsAuthor Commented: 2014-02-09

My code works, it's just that I'd rather not use sleep. But maybe I'll just leave well enough alone.