A solution to the escape char?

Bruce,

I've been experimenting with the escape char issues while running 
PowerPrX and PowerPro simultaneously with the StandardConfiguration 
and I believe I have a solution.

How about a new ESC(anything in here) command and nothing else 
outside of this is escaped because the StandardConfiguration also has 
Exec QuoteEscape off. Would not all of the issues of:

File.Name("F:\Shell\images\5.jpg") vs
File.Name("F:\\Shell\\images\\5.jpg") disappear?

The only issued I've found so far is that the continued script file 
line (ie using '+ or \+) is broken, IMHO, that this is a cheap 
penalty; although, you'll probably find a solution to this.

If any users have already had StandardConfiguration turned on and 
they upgrade to this version, then they should have to turn 
StandardConfiguration back on again manually in pproconf since the 
new-new StandardConfiguration would have Exec QuoteEscape off.

I like your ?c..c implementation, and the ESC() may look more like 
that, but the processing would be done at the time of the function 
processing. Think of ESC() as a function and not a 
conversion/translation like ?c..c or &().

I know you've stopped revisions; but if off the top of your head you 
think the idea might work, let me know and I'll freeze my development 
until you have time to look at the feasiblilty.

I hope this idea works!

Ted





Ignore the below if you've already fallen asleep:

My ESC() Command in Script looks like:

; Save this to pprx.powerpro, double click on the filename from
; explorer
; However, this shouldn't work until you click on a PowerPro bar

; Using StandardConfiguration

;=====================================================
; Watch for yahoo line breaks because I'm not using \+
; because I'm using Exec QuoteEscape OFF
;=====================================================

Exec QuoteEscape ON
GLOBAL fn="C:\New TEMP\test.txt"

MESSAGEBOX(??ok?,??My filename is :[EMAIL PROTECTED](??\n?)++??"?
++FILE.name(fn)++??"?,??Exec QuoteEscape ON?)


Exec QuoteEscape OFF
fn="C:\New TEMP\test.txt"

; Could have done this with ", but demonstrating the EVENT build
WIN.Debug(??My filename is :[EMAIL PROTECTED](??\n?)++??"?++FILE.name(fn)
++??"?)

WIN.Debug("visible=",VISIBLEWINDOW(??
=powerpro?),"active=",ACTIVEWINDOW(??=powerpro?))

MESSAGEBOX(??ok?,??My filename is :[EMAIL PROTECTED](??\n?)++??"?
++FILE.name(fn)++??"?,??Exec QuoteEscape OFF?)

; QUIT

; Note, I can cut and paste the above straight into the Event...

EVENT.Create(2,10,"EVENT.DestroyThis"[EMAIL PROTECTED](??\r?)++MESSAGEBOX(??
ok?,??My filename is (from event) :[EMAIL PROTECTED](??\n?)++??"?
++FILE.name(fn)++??"[EMAIL PROTECTED](??\r?)++??Active=?++ACTIVEWINDOW(??
=powerpro?),??Exec QuoteEscape OFF?),"ACTIVEWINDOW(??=powerpro?)")

; However, you may have noticed the event "fired" prematurely????

; Hopefully you made it this far and...

Exec QuoteEscape ON

QUIT


@ESC
Exec QuoteEscape ON
LOCAL a=&("\""++arg(1)++"\"")
Exec QuoteEscape OFF
; WIN.Debug(a)
QUIT(a)





The above is very useable, but expensive processing and requires 
extra ?c..c when using a script to evaluate ESC() in an event. 
Additionally, if my script errors, sometimes the Exec QuoteEscape is 
ON and I have to keep manually turning it off. This is why I think a 
function by you would be better.

Although this proposal doesn't simplify the event command but very 
slightly IMO, it makes events look more like regular commands.

But most importantly, everything else is greatly simplified!

Sorry about the long post, especially if the answer is no.




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

 
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