Jump to content











Photo

Quote, Comma, Space


  • Please log in to reply
35 replies to this topic

#26 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 19 April 2009 - 02:10 PM

Thanks for the warning psc :)

I was trying to use Quote all the time as an old habit, Reason comment by Medevil "So that everyone and their dog started adding "" whereever possible" :). (ps: i have no spaced path too :) )

what i learn from the topic is:
try to use quote only with path related things :) , try to avoid using quotes in other places whenever possible :).

But
I hope on future versions of wb using
Set,"%value1%","1234,5 6,7 8"
remains the same as before, because it is much easier to understand/read than
Set,"%value2%",1234#$c5#$s6#$c7#$s8
:(


I agree with Medevil "fault tolerance is not a good idea" for many cases, not having will help much for projects to be more backward compatible. Maybe For a while it will be better with showing "fault tolerance"'s as warnings during 077betas :).

With experience by LiveXP and reasons written longly before on wb077b1 topic, contrary with Peter psc and maybe Nuno, i believe it is better for a project to follow wb versions even they are nightly build or beta, otherwise you get a looooooong list of warnings and errors by jumping from one stable to other stable. Yes, it is very bad not to have backward compatibility (ps: currently LiveXP bootsdi dont work with wb077b1), i hope the price we pay these days will lead better backward compatibility for future releases.



Topic is about "Qutoe, Comma, Space" but i have a question for "percentage"
is there any rule/comment for using variable in variable (i had some issues that i can not remember now, following lines works):
Set,%test%,peter

Set,%petervariable%,peter#$sin#$sbootland

Echo,%%test%variable%


#27 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 19 April 2009 - 02:26 PM

I hope on future versions of wb using
Set,"%value1%","1234,5 6,7 8"
remains the same as before, because it is much easier to understand/read than
Set,"%value2%",1234#$c5#$s6#$c7#$s8

In general that should work as before.
But it may happen in certain situations (I do not know one yet) that it will not work. Then unfortunattelly the script developer has to use the 'correct' method.

Topic is about "Qutoe, Comma, Space" but i have a question for "percentage"
is there any rule/comment for using variable in variable (i had some issues that i can not remember now, following lines works):

Set,%test%,peter

 Set,%petervariable%,peter#$sin#$sbootland

 Echo,%%test%variable%

There are no special rules. Variables inside a variable (I call them 'nested variables') should work in all cases.
Nested variables are thought to run in the way you show. They are tested and got the 'certification'.
%test% is replaced by peter > %%test%variable% >> %petervariable%
And therefore the echo is :peter#$sin#$sbootland > peter in bootland

However, as usual in a product under development, maybe there are constellations where this dos not work. That would be a reason to visit the bug tracker.

Peter

#28 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10557 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 19 April 2009 - 06:35 PM

Set,"%List%","a,b,c"

Run,"%ScriptFile%",Test,%list%

  

[Test]

Echo,"#1"

Echo,"#2"

Echo,"#3"
Allan, I don't think Peter is doing this on purpose but rather trying to fix a reported bug.

wb's script engine has a worldwide-known reputation for allowing all sort of possible codings but sometimes it's certainly not easy to predict every possible situation when trying to improve the current state of things.

So, should the prevous behavior be adopted as default for the run command? :)

#29 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 20 April 2009 - 12:17 AM

Set,"%List%","a,b,c"

Run,"%ScriptFile%",Test,%list%

  

[Test]

Echo,"#1"

Echo,"#2"

Echo,"#3"
Allan, I don't think Peter is doing this on purpose but rather trying to fix a reported bug.

wb's script engine has a worldwide-known reputation for allowing all sort of possible codings but sometimes it's certainly not easy to predict every possible situation when trying to improve the current state of things.

So, should the prevous behavior be adopted as default for the run command? :)



@Nuno,

Where is the reported bug?

comma is used as a separator throughout winbuilder script.

If someone wishes the commas as string rather than separator...

Thanks anyway... I cannot continue.

Bye

#30 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 20 April 2009 - 01:19 AM

For this case, i support new wb077b1 method

reason is, if i set a variable with comma and in quotes and use #1 i expect it totally as written
i mean with writing
Set,"%List%","a,b,c"
i expect
Echo,"#1"
resulting with
a,b,c

i wont expect only
a
because a,b,c are in quotes


This is the logic so far i know in wb batching, I guess this was a bugy (reported or not) and fixed by peter psc. But sadly bugy behaviour used (i guess a lot) by allanf.
if continued with bugy like allanf suggest, how can a user get #1=a #2=b,c
this doesnt work with 076/77b1 (tested some other combinations too with #$ ) :)
Set,"%List%","a,"b,c""

Echo,"#1"

Echo,"#2"


I believe allanf demanding is very logic :) but with a more expected wb batching method it will be a nice improvement for wb to have
[process]

Set,"%List%",a,b,c



[Test]

Echo,"#1"

Echo,"#2"

Echo,"#3"
with other words
[process]

Set,"%List%","a","b","c"



[Test]

Echo,"#1"

Echo,"#2"

Echo,"#3"
which results with allanf expectance.
a
b
c

Set,"%List%","a","b,c"

Echo,"#1"

Echo,"#2"
or this one resulting with
a
b,c



Hoping available in shortwhile future version if allanf, peter and other like the idea ( 077b2 :) )

I believe this improvement will help allanf fix through his scripts quickly :)


I hope it is that much easy to fix other bugy things in scripts with new versions of wb (wimpack lookin to me, i am looking to her :) with deep eye contact for a looong while, we will love or hate in the end but bootsdi blinking at the back and a regfactory soccer team waiting for a match ) :( :)

#31 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 April 2009 - 03:29 PM

Seems like a sensible change to me. However as it does introduce compatibility problems maybe you should make it optional at the script level i.e. require a new option in the [main] section of a script to enable the new syntax.

Would not like winbuilder to be like MS products which never seem to care about compatibility with earlier versions of the product.


Next beta this is possible:

[process]

Set,%List%,"a,b,c"

Run,%ScriptFile%,Test,%List%

System,SPLITPARAMETERS,ON

Run,%ScriptFile%,Test,%List%

System,SPLITPARAMETERS,OFF



[Test]

Echo,#1

Echo,#2

Echo,#3

With result:
Posted Image Processing section: [process]
Posted Image File [%BaseDir%\Projects\win7_pe\CodeBox.txt] Version [1]

Posted Image SetVar - Sucessfuly changed the value of [%List%] to: [a#$cb#$cc]
Run - Processing section: [Test] From file: [%BaseDir%\Projects\win7_pe\CodeBox.txt]
Posted Image with parameters: [a,b,c]
Posted Image a,b,c
Posted Image
Posted Image
Run - Processed section [Test] in file: [%BaseDir%\Projects\win7_pe\CodeBox.txt]
Posted Image System,SplitParameters,ON
Run - Processing section: [Test] From file: [%BaseDir%\Projects\win7_pe\CodeBox.txt]
Posted Image with parameters: [a],[b],[c]
Posted Image a
Posted Image b
Posted Image c
Run - Processed section [Test] in file: [%BaseDir%\Projects\win7_pe\CodeBox.txt]
Posted Image System,SplitParameters,OFF

The System,SPLITPARAMETERS,ON command can be given once in the project, e.g. in [Process] of script.project, and is then valid for the complete project (or until it is switched off by System,SPLITPARAMETERS,OFF, and then switched on again, and ....)

Peter

BTW: This again is one of the commands, I only invented for MY nativeEx project. :)
In spite it is currently not needed there, I'm going to find sth where to use it.
Suggestions welcome!



#32 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 20 April 2009 - 05:26 PM

Peter

with new b2, does this result

[process]

Set,%List%,"a,b","c"

System,SPLITPARAMETERS,ON

Run,%ScriptFile%,Test,%List%

System,SPLITPARAMETERS,OFF



[Test]

Echo,"#1"

Echo,"#2"

with:

a,b
c



or by using #1 #2 what is the correct way to get ?
a,b
c

#33 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 April 2009 - 05:43 PM

Add it as argument to the 'Run'

The Set command can assign ONLY ONE value, not two like you try!

Peter

#34 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 20 April 2009 - 05:54 PM

yep i am aware :)


than

[process]

Set,%List%,"a#$cb,c"

System,SPLITPARAMETERS,ON

Run,%ScriptFile%,Test,%List%

System,SPLITPARAMETERS,OFF



[Test]

Echo,"#1"

Echo,"#2"

may result with

a,b
c

??

ps: i just try to show future problem/issue with comma , I feel with new System,SPLITPARAMETERS features the example on this post should work with wb077b2 :)

#35 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 April 2009 - 06:01 PM

The SPLITPARAMETER is only made to hold compatibility for those scripts, who used a "bug's feature" for their functionality.

For all others is:

ONE parameter is ONE parameter, regardles whether it contains spaces, commas etc. or not.

Peter

#36 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 20 April 2009 - 06:06 PM

Dont get angry Peter :)

okey , bugy feature is now a real feature :) and there is no new feature around. I just shared my thoughts for future :) , that is all :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users