Steve,
 
Re: The ? operator.
 
In the help, if you search the index for "expressions", then scan down the
page for the 'string delimiter' section, you'll find info about the ?.  For
the most part, I believe, it's used due to it's unique property of not
evaluating escape characters within it's defined string.  Since most people
don't like to see '\\' everywhere, and others prefer a different escape
character, everyone tries to use escape-neutral code wherever possible.
You'll see this a lot.
 
Paul
 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of rainmanf1
Sent: Wednesday, July 05, 2006 6:45 PM
To: [email protected]
Subject: [power-pro] Re: Please Help With Short Script



Wow, Bruce - I didn't see that it was you that wrote the reply. Thank
you much for the help.

I put this "script" in a button definition in a bar, configured as
command "*Script", "If", "(anywindow("C:\*")), with the rest of the
statements in the "More Commands" box. I understand that I need to
escape the "\". Now I know I have to do it in expressions. I hope I
can find something about the "?", which looks like it might be an
operator, in the docs.

As for the "not being able to run it again", I meant a second time,
after it opened the 3 windows and closed them (it's a toggle). The
next time it did absolutely nothing, but some of the syntax wasn't
right. I've since put it into a script file.

I saw in Sysinternal's PrcView, Windows Explorer under powerpro and
indented, which I think means that explorer was started by powerpro
and is its child.

Thanks again for your help!
Steve
--- In [EMAIL PROTECTED] <mailto:power-pro%40yahoogroups.com> ps.com,
"brucexs" <[EMAIL PROTECTED]> wrote:
>
> 
> > *Script If (anywindow("C:\*"))
> > *Window Close ("C:\*")
> > else
> > exec explorer2 C:\path1
> > exec explorer2 C:\path2
> > exec explorer2 C:\path3
> > endif
> > 
> > The problem is that after the script closes the windows, I can't 
> run
> > it again. 
> 
> I am not sure what you mean by "I can't run it again.". Do you get 
> an error message? Which one? Or does it just not do what you 
> expect? If so, what do you expect and what actually happens?
> 
> In any event, the following worked for me, assuming \ is your escape 
> character (ie you are using the standard configuration:
> 
> Script If (anywindow("C:\\*"))
> *Window Close "C:\*"
> else
> exec explorer2 C:\path1
> exec explorer2 C:\path2
> exec explorer2 C:\path3
> endif
> 
> The confusing fact is that anywindow("...") involves an expression 
> so that the \ must be escaped. Window close is written in the old 
> command format so you don't need parenthesis or escaping \.
> 
> The following also works, re-written to use dot format for commands, 
> for consistency. I also used ?" " to avoid having to escape the \.
> If (anywindow("C:\\*"))
> Window.Close ("C:\*")
> else
> exec.explorer2(?"C:\path1")
> exec.explorer2(?"C:\path2")
> exec.explorer2(?"C:\path3")
> 
> 
> 
> 
> Also, I see that explorer.exe remains as a subprocess of
> > Powerpro.
> 
> 
> I am not sure what you mean by this and what tool you are using to 
> make this determination.
>



 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to