Jump to content
Macro Express Forums

Activate or Launch: operation


eatc7402

Recommended Posts

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

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...