eatc7402
-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by eatc7402
-
-
It turns out that the intention of leaving the PSP7 App open was to avoid the
5 second delay required to avoid the time the 'splash screen' was open for.
It urnes out the splash screen can be turned off in the apps preferences.
That then makes it much more acceptable to open and close the app
each time passing %T1% param each time .
-
If I use Activate or Launch with a %T1% command line parameter in a
Repeat with Folder loop and CLOSE app in the loop reopening it every time'
it seems to work as expected... opening a new file each time. As in the
following code..
// A macro to open and resize jpg into thumbnails - dbf - 2009-07-09 // first loop thru dir and get rid of thumb.db if there Repeat with Folder If Variable %T99% = "thumbs.db" Text Box Display: Delete File or Files: "thumbs.db" End If Repeat End // now loop thru the dir and process the image files Repeat with Folder Clipboard Copy Text Box Display: // If PSP Is Already Running, There Will Be No Splash Screen to Wait For. If Window Title "Jasc Paint Shop Pro - " is running Variable Set String %T1% "Skip Delay" End If // / Activate or Launch: "Jasc Paint Shop Pro" OR "psp.exe" // wait for aadvertising window to disapper If Variable %T1% <> "Skip Delay" Wait Time Delay 5 Seconds End If Text Type: <SHIFT>S Wait For Window Title: "Resize" Get Control %C1% (Resize: Button) Set Focus to %C1% Text Type: <ENTER> Delay 1 Seconds // do save as... Text Type: <F12> Wait For Window Title: "Save As" Get Control %C2% (Save As: Edit) Set Focus to %C2% Text Box Display: Variable Get Control Text: %C2% to %T1% Text Type: TH-%T1% Delay 0.5 Seconds Pause: Basic Text Type: <ENTER> Wait Window Lose Focus: "Save As" Delay 0.5 Seconds Text Type: <CONTROL><F4> Pause: Basic End Case End Switch Pause: Basic Program Shut Down: "Jasc Paint Shop Pro" Repeat End Delay 3 Seconds
But if I move the Program Shut Down: "Jasc Paint Shop Pro" outside
of the Repeat with Folder loop leaving it open. it appears not to precess
the NEXT %T1% file in the loop, and files 2 thru x do not get opened.
Is this EXPECTED behavior??? Do you have to clear the %T1% variable
to get the Activate part of Activate or Launch to process the variable??
Because it seems not to be processing it.
eatc7402
-
For one thing, you're missing a %. This:
Delete File or Files: "%T1"
should look like this:
Delete File or Files: "%T1%"
yesw u r correct, and ill fix THAT. but my propblem is it wont
enter the CASE at all... and thats what is puzzleing me. But
thanks for sure.
eatc7402
-
When processing a dir full of image files i keep running into the thumbs.db
file as part of the file list. im trying to get rid of it so i dont process it as anm image... with..
Text Box Display: If Variable %T1% = "C:\eaahmpg\work3\thumbs.db" Text Box Display: End If Switch (T1) Case: C:\eaahmpg\work3\thumbs.db Text Box Display: Delete File or Files: "%T1" Program Shut Down: "Jasc Paint Shop Pro" End Case End Switch
The 'if' works... but the CASE doesnt... hmmm.
Whats wrong with my case?? ive triede adding quotes, = .
but cant seeem top figure it out.
-
In the macro text you provided just now, you've removed your Set Focus command. That is going to cause you some problems.
Make sure you are setting the focus in your macro. That might fix your problem.
Here is the Scripting Editor Text (basic):
// If PSP Is Already Running, There Will Be No Splash Screen to Wait For. If Window Title "Jasc Paint Shop Pro - " is running Variable Set String %T1% "Skip Delay" End If Activate or Launch: "Jasc Paint Shop Pro" OR "psp.exe" // When Launching PSP, This Delay Will 'Pause' The Macro Till the Spash Screen Has Gone. If Variable %T1% <> "Skip Delay" Delay 5 Seconds Text Type: <CONTROL>n Wait For Window Title: "New Image" Text Type: 8<TAB>11<TAB>i<ENTER> Wait Text Playback End If Text Type: <SHIFT>s Wait For Window Title: "Resize" Get Control %C1% (Resize: Button) Set Focus to %C1% Text Type: <ENTER>
===========================
yes indeed it was the set focus that was missing. Hers my code that now works. It also appears that 'wait fors' are important.
Activate or Launch: "Jasc Paint Shop Pro" OR "psp.exe" // wait for splash window to disapper Wait Time Delay 5 Seconds Text Type: <SHIFT>S Wait For Window Title: "Resize" Get Control %C1% (Resize: Button) Set Focus to %C1% Text Type: <ENTER> Delay 1 Seconds
Thanks, im a newbie to ME, but not witing code. Your small 'tutorial'
was most helpful.
eatc7402
-
The Samples.mex file is a separate file from the one you were most likely building your macros in. You should search through your Macro Express folder to find the .mex where your work was saved. Unless you saved it somewhere else. In which case, you just have to look there.
I've been confused lots of times by missing ME files that weren't lost, just misplaced... by me.
It's scary, but what really sucks, is when your hard-drive crashes, and the last time you backed your macros up on your external drive was 2 months ago... and now you have 2 months worth of tweaks and improvements that just <poof!> and disappear.
yes , you were correct, a search found the .mex file... in a ' strange' place
but it was found. I will 'adjust' my save a copy proceedures accordingly.
eatc7402
-
well i opened ME today, and ALL the macro i hd been working are GONE.
no explanation, but the macros and catagories all dissapeared AFTER
running thee samples.nex file.
eatc7402
-
You most likely need a delay between your Text Type command and your Get Control command.
I don't know which version of PSP you're using, but I just tested your script using PSP 7, and it worked exactly as I expected it would. Which is to say, it didn't work until I added a .5 second delay after the Text Type command. It would probably work consistently with a shorter delay or with a window specific delay (such as: Wait for window title: Resize).
well i manged to get focus but the control does not seem to react to typing...
ive changed to the following but theres nop reaction to the 'enter'
text...
Activate or Launch: "Jasc Paint Shop Pro" OR "psp.exe"
// wait for aadvertising window to disapper
Wait Time Delay 5 Seconds
Text Type: <SHIFT>S
Delay 0.5 Seconds
Get Control %C1% (Resize: )
Wait for Control %C1% to gain focus
Text Type:<ENTER>
Delay 1 Seconds
eatc7402
-
Im attempting to set focus to a control with no luck... using the following.
Doesnt seem to work.
Activate or Launch: "Jasc Paint Shop Pro" OR "psp.exe"
Text Type: <SHIFT>S
Get Control %C1% (Resize: )
Set Focus to %C1%
the Resiize control does get activated correctly, but i cant to get the
focus on it to perform furthur operations.
eatc7402
Minimizing ME whrn starting a macro
in Macro Express 3.x
Posted
Is there option to set somewhere that will cause the ME editor window to
MINIMIZE when it begins to run a macro?
I've looked but did not seem to find it.
eatc7402