Jump to content
Macro Express Forums

Store, Return > Orig. Window - Act If Window Exist


dgehman

Recommended Posts

Tried to search for these, but couldn't develop a useful search strategy.

 

I'm trying to create a macro that:

1. Notes what window I'm working in & saves that info

2. Switches to Eudora mail reader

3. Via keystrokes looks for new mail [more on this below]

4. After doing this, sends me back to the window I was working in in step 1.

 

I can accomplish step 2, the switch to Eudora.

 

In the Scripting Editor, how can I record the window I'm in, and get back to it?

 

Also -- depending on Eudora's whims, the manual search might pop up a Enter Password dialog.

 

Again, in the Scripting Editor, how do I manage a conditional branch if Enter Password pops up?

Is the following correct:

<IFOTH:03:1:Enter Password><TEXTTYPE:[password]><TEXTTYPE:<ENTER>><ENDIF>

 

In Scripting Editor this looks like (minus icons)

If Window Title "Enter Password" is on top
Text Type: [password]
Text Type: <ENTER>
End if

 

I don't have to create an "Else," that is, spell out the path to take if the Enter Password window is NOT on top, right?

Link to comment
Share on other sites

You can set the window title to a variable by using the Variable Set String command. The option is Set Value to Topmost Window Title. You can then switch back to this window by using the Activate Window command found under the Windows/Programs commands. Check the Activate Window Only option and then enter your variable name in the Window Title box.

 

You can use an If statement to handle the password box. It might look something like this:

if Window Title "Enter Password" is on top

Text Type: password

end if

if Window Title "Other Window" is on top

enter your code here

end if

 

You could also use an Else command in place of the second If. It all depends on what exactly you want it to do.

Link to comment
Share on other sites

Thanks -

I've now become aware of a second question --

 

Can a macro run in the background?

 

Reason I'm asking: the Eudora macro requires 3 actions each requiring a 3 second delay to prevent it from trying to unlock a mailbox while it's busy. My macro now brings me to 10 seconds or so of Eudora activity, where I get to watch it run.

 

It's fun, but I'd rather be back in my wordprocessor typing things.

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...