searapaixao wrote:

> Script runfile &(scriptpath++"selecttag.txt")
> 
> PowerPro complains that it cannot find the file
> &(scriptpath++"selecttag.txt"). substitute "Script runfile" by the new
> notation: runfile.scriptpath++"selecttag.txt" but it also doesn't work. 
> Does anyone have an ideia of how to make this script compatible with
> the latest PowerPro?

Adapting an old script to your configuration may need a bit of work. Bruce has 
worked hard to keep 
backwards compatibility, so I think there is a way to make it work without 
messing up the script, but it 
may involve your changing your configuration. It's up to you to decide which 
one of the two your prefer 
to adapt, the script or your configuration...

Do read the help file regarding runfile, I think that's changed in suble ways. 
Look for *script and then 
runfile.

&(scriptpath++"electtag.txt") should work just fine, provided that you have 
turned on & as your 
expression follows character in pproconf.exe>setup>advanced setup>characters.
That's standard if you have cheched "standard configuration". OTOH, when you do 
that, your "escape 
character for strings used in expressions is \, but in 3.8 and older versions 
it used to be ' - so a lot of 
strings break with this setting. There are many threads regarding this type of 
problems. My own choice 
was to bite the bullet and change ' into \ in all my scripts. Now I can work 
with a standard configuration 
and I have fewer portability problems.

The ultimate tools for avoiding any portabily problems with strings are
* The ? syntax: ?XMyStringX means the string MyString and you can substitute 
any other character for X 
- of course X should be part of MyString. You see how this syntax allows for 
greater flexibility in nesting 
quoted strings.
* The esc() function, which applies the escape character (the & we were talking 
before) in a generalized 
way:  esc("My Estring","E") means 'escape the s of string', because X is used 
as the escape character.

Putting it all together:
esc(?X-line1-En-line2-X,?XEX) prints
-line1-
-line2-
because escaped En means a newline, and the first argument string is protected 
with ?X...X so there's 
no escaping occurring in it BEFORE it's processed by esc() - which does all the 
escaping for you. The 
same example could be given a more familiar look as
esc(?"-line1-\n-line2-",?"\")
but don't be fooled by the double quotes and the \n sequence, they mean nothing 
special, the key 
ingredients remain esc() and ?X..."  (with X=" in this case)



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/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/
 



Reply via email to