Saving For Web

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
TimTom
Newbie
Posts: 18
Joined: Mon Oct 10, 2005 3:05 pm

Saving For Web

Post by TimTom » Fri Mar 24, 2006 11:17 pm

Hi, I hope one of you folks can help me, here.

Below is a macro I use (trying to use) for saving photos for the Web using Photo Shop Elements. The WaitWindowOpen>Save For Web command seems to be the problem.

I have gotten this macro to work by taking out the WWO command and replacing it with Wait>6 (or even longer). However, sooner or later I will get a screen freeze at the Save For Web page. I really need to get the WWO command to work reliably.

Right now, the macro just gets hung up at the Save For Web page and occasionally freezes. Part of the problem is that Photo Shop is unstable in attempting to bring up the Save For Web screen. It can come up quickly or take a good while (10 seconds or so).

One thing I've noticed is that in the command WaitWindowOpen>Save For Web, the word "For" is a light brown color rather than black -- as though this is a reserved word and is messing up the command. Not sure if this is relevent as I have, very occasionally, gotten past WWO>Save For Web line in the macro.

Any suggestions would be greatly appreciated.

Jerry


//Resize to height 125

Press ALT
send>i
Release ALT
Press Down * 5
Press Right
Press Enter
Press Tab * 2
send>125
Press Enter

//Sharpen
Press ALT
send>t
Release ALT
Press Down * 11
Press Right
Press Down * 3
Press Enter
WaitWindowOpen>Unsharp Mask*
send>50
Press Enter

//Save For Web
Press CTRL
Press ALT
Press SHIFT
send>s
WaitWindowOpen>Save For Web*
Release CTRL
Release ALT
Release SHIFT
Press ENTER
WaitWindowOpen>Save Optimized As*
Press Enter

Press CTRL
send>zz
Release CTRL

//Resize to height 300
Press ALT
send>i
Release ALT
Press Down * 5
Press Right
Press Enter
Press TAB * 2
send>300
Press Enter

//Sharpen
Press ALT
send>t
Release ALT
Press Down * 11
Press Right
Press Down * 3
Press Enter
WaitWindowOpen>Unsharp Mask*
send>50
Press Enter

//Save For Web
Press CTRL
Press ALT
Press SHIFT
send>s
WaitWindowOpen>Save For Web*
Release CTRL
Release ALT
Release SHIFT
Press ENTER
WaitWindowOpen>Save Optimized As*
Press LEFT * 4
Send>f
Press ENTER


User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 27, 2006 7:45 am

Hard to say what the issue is without being able to run an identical setup or debug on your system, but a couple of things of note:

1) Not sure if it would make any difference but I would release the modifer keys before the WWO line. Change your Save For Web bit to this:

//Save For Web
Press CTRL
Press ALT
Press SHIFT
send>s
Release CTRL
Release ALT
Release SHIFT
Wait>0.5
WaitWindowOpen>Save For Web*

2) If the window is called just "Save For Web" then remove the asterisk at the end of the WWO line.

If you continue to have issues feel free to contact support and organise a remote desktop session. We can then run through your script with you and find out what exactly is happening and find a fix.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

TimTom
Newbie
Posts: 18
Joined: Mon Oct 10, 2005 3:05 pm

Post by TimTom » Mon Mar 27, 2006 3:32 pm

Thanks, Marcus. I really appreciate your help.

Using the following code really didn't help:

//Save For Web
Press CTRL
Press ALT
Press SHIFT
send>s
Release CTRL
Release ALT
Release SHIFT
Wait>.5
WaitWindowOpen>Save For Web
Press ENTER
WaitWindowOpen>Save Optimized As*
Press Enter
Wait>.5

But I think I have a better insight into the problem. I think that "Save For Web" window is opening okay but that it just won't accept keystrokes from the macro. It does, however, accept my manual keystrokes! All I need the "Save For Web" page to do is recognize "Press Enter" right after it opens. I've tried using the Wait command and I've tried setting the focus on SFW with no results. Right now it is just stopping at the open "Save For Web" page and waits for the next instruction.

This is probably a problem with the SFW page but is there anything you can suggest that I can do to get SFW to accept macro keystrokes?

Jerry

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Mar 27, 2006 3:35 pm

Well, one obvious thing is that you have no SetFocus command - so perhaps Save For Web is not focused. And sometimes you need a short delay between WaitWindowOpen returning and sending the keystrokes - this is because the window may well exist but still be too busy to accept keystrokes - you have to remember that Macro Scheduler runs much faster than you would when doing it manually. So try this:

WaitWindowOpen>Save For Web
Wait>1
SetFocus>Save For Web
Wait>1
Press Enter

If that works, you can try reducing the wait time.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Mar 27, 2006 3:44 pm

TimTom said:
One thing I've noticed is that in the command WaitWindowOpen>Save For Web, the word "For" is a light brown color rather than black -- as though this is a reserved word and is messing up the command. Not sure if this is relevent as I have, very occasionally, gotten past WWO>Save For Web line in the macro.
In addition to Setting focus before pressing enter, you might want to use the "View System Windows" utility to see what name the system is using for the "Save For Web" window.

Later,
Dick

TimTom
Newbie
Posts: 18
Joined: Mon Oct 10, 2005 3:05 pm

Post by TimTom » Tue Mar 28, 2006 6:32 am

Marcus & Dick,

Thank you for you help! Adding the Wait>1 right after WWO and SetFocus seems to do the trick. (I did try the SetFocus earlier, by the way, but took it out prior to my last response.) I'll need to test this solution for awhile before I really start to believe in it but it seems to be working. If it "missfires" on me again, I will just increase the wait time by .5 until it is truly stable.

You have a very fine product but what really sets Macro Scheduler apart is the quality of the help available.

Really appreciate your help!!

Jerry

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts