--- In [email protected], miinx wrote:
> Just with the above, the Event.txt info file doesn't mention
> "\n" for new lines, only "\r".. is that an error above, or an
> omission in Event.txt?
Hi Karen,
I should stick with the documentation. I guess I've gotten sloppy.
Because \n works, I've slipped into it.
> Also, the ESC() function seems kinda messy when there's the ?""
> syntax, doesn't it? This:
It was agreed on this board, when the Standard Configuration changed,
that scripts should be written independent of the escape character.
Older users are still using ' instead of \ as the escape character. I
am writing scripts for both ' and \ configurations, so I
automatically use ESC().
> could be written as:
> Event.Create(10,30, ?#.YourScript\r Event.DestroyThis#, \+
> ?#anywindow("=notepad")#)
> couldn't it?
I'm in the the habit of destroying the event before the script incase
the script opens a dialogbox or the script causes some other "pause"
like WAIT.for() and allows enough time for the event to process
again... Processing Event.DestroyThis before .YourScript will
always work, and the other way around will sometimes work depending
on the script.
Because you've escaped the \r using delimiters ?#..#, the \r is not
seen as a carriage return.
I believe the line continuation mark in script files is ;;+ instead of
\+ but Bruce has programmed backward compatibility and includes older
versions of syntax. Again ;;+ is escape character independent.
This will work for the Standard Configuration:
Event.Create(10,30, "Event.DestroyThis\r.YourScript", ;;+
?#anywindow("=notepad")#)
but is escape character dependent.
IMHO, this is best:
EVENT.Create(10,30, ESC("event.destroythis\r",?"\")++ ;;+
?".YourScript", ?#ANYWINDOW("=notepad")# )
Good luck, events are very useful...
I should sign off as "ten-step" because I always do something the
long way.
"ten-step" Ted
PS, I use probably 50 times more Wait.for() than Events because
Wait.for() is more easily scripted. But for Longer waits like during
Windows Startups, Events are slightly better and faster. My rule of
thumb is less than 1 minute is a Wait.for(); otherwise, I'll consider
an Event.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/