Jump to content











Photo
- - - - -

Frustration


  • This topic is locked This topic is locked
35 replies to this topic

#1 pscEx

pscEx

    Platinum Member

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

Posted 19 January 2010 - 07:53 PM

For those members who do not know me:
I'm one of the three (and currently appearently the only active) WinBuilder developers.

The title of this forum is:
Tell us what do you think that can be modified or improved about the site!
Let me expand to
Tell us what do you think that can be modified or improved by members of the site!
During development, sometimes things change.
Usually the developer has as high priority goal 'Compatibility to previous versions'

But sometimes it happens, that in a previous version there has been a bug (which may have caused somebody to write some code using this bug).
If in a later version the bug disappeared, the code, written during 'bug time' does not work any more.

Last days some issues came up:

We currently have a strange situation with code like this:
Set,%DisplayNameForWBSoftware%,"test4,5"

   RegHiveLoad,WB-Software,%target_sys%\config\software

   RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

   RegHiveUnLoad,WB-Software
As reported, it does not work in WB 078 SP6
Tests made sure that it also does not work in older versions like WB 072, WB 074 and WB 076
It NEVER did create an entry under 'PSC' in the registry.

It has been reported that (a similar code) worked under WB 077 RC2

Also trying WB 077RC2 with the above code, on my system did not make an entry into the registry.

Now: There are complains that WB 077 RC2 has been ok, and I should rebuild the WB 077 RC2 functionality.

???????

To explain:
Set,%DisplayNameForWBSoftware%,"test4,5"
is invalid, because the comma is only a separator between defferent script command arguments, and not allowed inside an argument. Inside an argument the escape #$c must be used.

BTW: For your test: Before starting, please delete the registry line in question.
If you do not do so, you'll get no error message, and maybe there is something from previous tests, and you'll assume that everything is running well.

Maybe there are some members to explain me what I'm doing wrong.

But I'm also happy if some members agree that my interpretation of comma is right.

BTW: Maybe we can find a difference of my host to the complainers' host which can explain this voodoo.

Peter

#2 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 January 2010 - 11:01 PM

Tests made sure that it also does not work in older versions like WB 072, WB 074 and WB 076

RETEST:
with wb072a, wb074, wb076, wb077rc2 ; try following:

Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,"WB-Software","%TargetDir%\i386\system32\config\software"

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

RegHiveUnLoad,WB-Software

you will see on registry DisplayName will be
test4,5
"IT DOES WORK IN OLDER VERSIONS like WB 072, WB 074 and WB 076" and WB077RC2

now try with wb078sp6, you will see nothing written.:confused1:


Set,%DisplayNameForWBSoftware%,"test4,5"
is invalid, because the comma is only a separator between defferent script command arguments, and not allowed inside an argument. Inside an argument the escape #$c must be used.

when double quotes used, comma is not a seperator anymore as seen with WB 072, WB 074, WB 076, WB077RC2. That is the reason I believe double quote invented on wb at ice age like in all scripting languages.
giving more examples:
message,"Hi, how are you",Information

Echo,"I, you, he, she"
as seen, comma is not a seperator because it is between double quotes.

Maybe there are some members to explain me what I'm doing wrong.

written with a good english by jaclaz before:

Should you want my personal opinion, anything enclosed in double quotes (assumed that double quotes are the characters used to escape the parsing engine) should be used verbatim, or at least this is how Syntax is normally used on other scripting languages,

(for the ones who do not know: 'Wonko the Sane' is jaclaz's parallel universe name on boot-land)

with other words: untill now, writing comma and other things between double quotes was trustable. Now I am not sure what will come next.

loosing trustability of double quotes (which has a design purpose) make me concern about future bugs. If we should use #$c instead of "", than why do we have "" !!!!!!


I believe there've been a misunderstanding due to my bad english communication and I hope this post helps to fix this bug of wb078sp6. If I fail, I wish someone who understands my concern write with a better english.


historical note for future reference: This conversation started with post 1869 to post 1877, than current topic created by psc.

#3 pscEx

pscEx

    Platinum Member

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

Posted 19 January 2010 - 11:05 PM

...
you will see on registry DisplayName will be
test4,5
"IT DOES WORK IN OLDER VERSIONS like WB 072, WB 074 and WB 076" and WB077RC2

now try with wb078sp6, you will see nothing written. :confused1:

On my sytem, I never got any registry entry.
Voodoo?
Or maybe depend on x86 / x64 host?
Or maybe depend on ???

That should be found!

Peter

#4 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 January 2010 - 11:26 PM

On my sytem, I never got any registry entry.

a package link will be here in 30 minutes and less.

#5 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 January 2010 - 11:47 PM

Here it is
livexp with wb074
http://www.2shared.c...P_Old_Test.html


Here is a simple test routine:
*extract the package to an empty folder
*make the build
*after build ends at Tools\RegEditWB , click start
Posted Image
*regeditor will open, check the value
Posted Image

further tests with other "old" winbuilders:
winbuilder 072:
*delete "Displayname" in registry on picture
*close winbuilder
*extract WinBuilder072.zip
*open winbuilder and click codebox, than click big green button
Posted Image
*Tools\RegEditWB , click start
*regeditor will open, check the value and you will see value again written correctly.

winbuilder 076:
*delete "Displayname" in registry on picture
*close winbuilder
*extract WinBuilder076_2.zip
*open winbuilder and click codebox, than click big green button
*Tools\RegEditWB , click start
*regeditor will open, check the value and you will see value again written correctly.


As seen, old wb versions WB072, WB074, WB076 works as intented.
and WB077RC2 test can be made with current LiveXP which again will be seen things works as intended.

I hope this helps.

#6 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 20 January 2010 - 12:15 AM

I tried Lancelot's package and all versions are working as expected. However WB 78 SP6 doesn't create the registry key.
Tested on XP Pro SP3 (x86).

#7 paraglider

paraglider

    Gold Member

  • .script developer
  • 1729 posts
  • Location:NC,USA
  •  
    United States

Posted 20 January 2010 - 02:05 AM

I also am seeing the same problem as Lancelot with the current version of winbuilder and the scripts in the test download.

Note if:

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

is replaced with:

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"test4,5"

Then test4,5 is written to the registry with 78 sp6. That to me makes it a bug in winbuilder.

#8 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 20 January 2010 - 02:30 AM

when double quotes used, comma is not a seperator anymore as seen with WB 072, WB 074, WB 076, WB077RC2. That is the reason I believe double quote invented on wb at ice age like in all scripting languages.

Sorry Lancelot, double quotes exist in WB because every section of a command needed to be in double quotes in addition to all spaces, comma, quotes ... changed to special characters.

Under normal circumstances there should be none needed or be used anymore.
Not 100% sure though, if there is any exception to that rule.

:confused1:

#9 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 20 January 2010 - 03:25 AM

Here's my opinion.

I would like this to throw an error since the use of commas in the variable %DisplayNameForWBSoftware% would make more parameters than what 0x1 tollerates:
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

RegHiveUnLoad,WB-Software

I would like this to write test4,5 sucessfully because by the use of quotation WB is told that %DisplayNameForWBSoftware% is a single parameter (not a variable potentially consisting of more than one comma-separated parameter as in the example above):
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

RegHiveUnLoad,WB-Software

With WB working in this way, the following would then be possible, which would write two value entries beneath the 0x7 key:
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x7,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

RegHiveUnLoad,WB-Software
and this would write only one value entry beneath the 0x7 key:
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x7,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

RegHiveUnLoad,WB-Software

Regards,
Galapo.

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14757 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 January 2010 - 09:49 AM

For the record, Wonko the Sane said something (at least in his intention) a bit more subtle than what appears from the partial quote above.

What he was trying to say was "whatever Syntax is allright, including the use of #$c as a substitute for comma, or the use of §#@this_is_a_comma@#§ or whatever, including escaping of comma's inside double quotes, AS LONG AS IT IS DECLARED IN SYNTAX".

In his previous existence on the board, he also suggested (as often happens finding none of the members interested) the opprtunity of having a dedicated syntax highlighter and, also, a Syntax pre-processor.
http://www.boot-land...?showtopic=7330
http://www.boot-land...?...c=7330&st=1
http://www.boot-land...?...=7330&st=12

The sense of deja-vu I have on these themes is overwhelming

A scripting language, just like any programming language needs IMNSHO to have a clearly coded syntax.

There is no problem in changing it, as long as when the change is made, there is an easy to use tool to check previously written scripts for incompatibilities.

But this does not mean that psc, who appears like the only one actually trying to bring forward the winbuilder engine at the moment, could not make use of, besides some critics - which are, within limits - a clear sign of the freedom and "democracy" of the board and of the Winbuilder development, some more support and could not deserve some more appreciation and some more cooperation.

The reference to a "democracy of one" is totally gratuitious. :ranting2:

There is an issue in Winbuilder Syntax, like many other before, and unfortunately many to come, it can be solved allright, as long as everyone contributes "plainly" to it's solution, providing ideas, opinions and what not, but avoiding pointless attempts to undermine the authority on Winbuilder development that psc deserves for the countless hours and energies he provided on this project. :thumbsup:

psc may from time to time be a bit grumpy :whistling:, sometimes he may also be wrong and sometimes he may be even a bit stubborn, but he is always trying to better the engine. :worship:

On this particular issue, my personal opinion is different from his, and obviously I am rightful ;), but that doesn't mean, that, if the issue is limited to a handful of .scripts, the .script developers cannot temporarily add a workaround.

I have no idea if this is feasible :dubbio:, but in pseudocode:

Set,%DisplayNameForWBSoftware%,"test4,5"
RegHiveLoad,WB-Software,%target_sys%\config\software
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%
IF NOT %DisplayNameForWBSoftware%=="test4#$c5" THEN (
Set,%DisplayNameForWBSoftware%,"test4#$c5"
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%
)

RegHiveUnLoad,WB-Software


Could be a temporary workaround to have "passing through" compatibility, and the actual solving of the issue can be postponed to next engine revision.

This would allow to save energies, and give time to other members to contribute, with things like the syntax highlighter and the pre-processor, or a more clear Syntax definition, or any other idea that actually could help psc in the development, instead of getting to a stalemate like we seem to be at the moment. :unsure:

:cheers:

Wonko

#11 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 20 January 2010 - 10:08 AM

for me
on XP SP3 Hungarian host, using 077 RC2, running from the Code Box with the big green arrow

this works fine (077 RC2):
[codebox]Set,%DisplayNameForWBSoftware%,"test4,5"RegHiveLoad,"WB-Software","%TargetDir%\i386\system32\config\software"RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,[b][color="#FF0000"]"[/color][/b]%DisplayNameForWBSoftware%[b][color="#FF0000"]"[/color][/b]RegHiveUnLoad,WB-Software[/codebox]this does not work (077 RC2):[codebox]Set,%DisplayNameForWBSoftware%,"test4,5"RegHiveLoad,"WB-Software","%TargetDir%\i386\system32\config\software"RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%RegHiveUnLoad,WB-Software[/codebox]only the registry key: PSC is writtenbut the value: DisplayName and its data: test4,5 is notanyway:using 078 SP6 these lines work fine:[code]RegHiveLoad,"WB-Software","%TargetDir%\i386\system32\config\software"RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"test4,5"RegHiveUnLoad,WB-Software[/code]or[code]Message,"test4,5",INFORMATION,3[/code]or[code]Echo,"test4,5"[/code]or
FileCreateBlank,%BaseDir%\test.ini

TXTAddLine,%BaseDir%\test.ini,"test4,5",APPEND


#12 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 20 January 2010 - 11:48 AM

also this works fine using 078 SP6:
[codebox]FileCreateBlank,%BaseDir%\test.ini IniAddSection,%BaseDir%\test.ini,one IniWrite,%BaseDir%\test.ini,one,two,"test4,5" IniRead,%BaseDir%\test.ini,one,two,%DisplayNameForWBSoftware% RegHiveLoad,WB-Software,%TargetDir%\i386\system32\config\software RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware% RegHiveUnLoad,WB-Software[/codebox] or also this works fine using 078 SP6: [codebox]RegHiveLoad,WB-Software,%target_sys%\config\software SET,%data%,"data1,data2" RegWrite,HKLM,0x7,WB-Software\psc,value1,%data% RegRead,HKLM,WB-Software\psc,value1,%RegVal% RegWrite,HKLM,0x7,WB-Software\psc,value1,%RegVal%,data3
RegHiveUnLoad,WB-Software[/codebox]

Edited by dera, 20 January 2010 - 07:32 PM.


#13 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 20 January 2010 - 02:10 PM

I have given this whole syntax problem some more thought and i see two possible good solutions for a clear syntax.

Complete removal of " and spaces, comma, quotes, usw need alwys to be replaced with special characters.
OR
We start using " again, but this time as in any other language so that no special characters are needed anymore.

The first one would parse faster the second would be easier to read and write.


:dubbio:

edit:
PS: Converting scripts to the second one would be easy enough to do it with search and replace.

#14 paraglider

paraglider

    Gold Member

  • .script developer
  • 1729 posts
  • Location:NC,USA
  •  
    United States

Posted 21 January 2010 - 12:35 AM

You will still need an escape for " if the string contains a " with the second approach. This seems to me the most sensible and in line with all other languages.

#15 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 21 January 2010 - 01:45 AM

You actually don't.
You can nest them. It's more obvious when using different signs for opening and closing like (). But it also works with same signs, if the use is restricted enough to avoid double meanings.

For instance: """ """"Hello"""",""""Goodbye"""" """
This would be a triple escaped String of "Hello","Goodby". Each time the string is used, 1 " of each set is burned down.
For this to work there are only two requirement.
Something like "" is not required to mark an empty value and sets of " have to be seperated by another character.

It's imo the easiest readable way to do it.

:whistling:

#16 paraglider

paraglider

    Gold Member

  • .script developer
  • 1729 posts
  • Location:NC,USA
  •  
    United States

Posted 21 January 2010 - 04:49 AM

You are escaping the internal ". You are using " as the escape character. I agree that is much better than the weird escape sequences that winbuilder scripts use.

You may also need an escape character or escape sequence for % so that you can suppress variable substitution in a string.

Ignoring escape characters I think the original problem is solved if any variables are substituted in a script line before the line is parsed. So that means:

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

becomes:

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"test4,5"

Then the line is parsed. That also means that if you had a variable %var% that contained the string:

,HKLM,0x1,WB-Software\PSC,DisplayName,"test4,5"

Then you could write in the script:

RegWrite%var%

and get exactly the same result with test4,5 being written to the registry.

#17 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 21 January 2010 - 12:28 PM

You're right, sometimes a variable is used in a string and should be resolved.
To keep it simple, i would escape % with a %. This case is even easier since variables are not allowed to contain % in their name.

:whistling:

#18 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 04:36 PM

On my sytem, I never got any registry entry.
Voodoo?
Or maybe depend on x86 / x64 host?
Or maybe depend on ???

That should be found!

Peter

@lancelot
I've been outside three days and have now time again to care about the issue.

Can you try this code
[process]

 Set,%DisplayNameForWBSoftware%,"test4,5"

  RegHiveLoad,WB-Software,%target_sys%\config\software

  RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

  RegHiveUnLoad,WB-Software
in 077RC2?
If it generates anything else than only the key PSC, send me your WinBuilder.exe. I'll do a binary compare whether anything is different with the .exe I have.
Maybe also the WinBuilder.ini is intersting. Perhaps there is a forgotten switch ???

Peter

EDIT: I now have had a look at all the other previous posts, and as I see, It really worked at several members.
But I have no opinion why.
Maybe the winbuilder.ini really hides a secret?

#19 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 22 January 2010 - 04:56 PM

@lancelot
I've been outside three days and have now time again to care about the issue.

Welcome back Peter,

@lancelot
Can you try this code

[process]

Set,%DisplayNameForWBSoftware%,"test4,5"

 RegHiveLoad,WB-Software,%target_sys%\config\software

 RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

 RegHiveUnLoad,WB-Software
in 077RC2?

you forgot the quotes Peter, On post #2 and following posts I always gave examples with quotes. I guess you missed that.

[process]
Set,%DisplayNameForWBSoftware%,"test4,5"
RegHiveLoad,WB-Software,%target_sys%\config\software
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"
RegHiveUnLoad,WB-Software

with quotes wb works as expected with WB 072, WB 074, WB 076, WB 077RC2 , but not wb078sp6 :whistling:. (also confirmed by users who made tests)

Galapo descibed my thoughts very well with giving examples on his post (remember, ~3 days ago, I had reminded issue found by JFX (and bug reported by fxscrpt) of past ). Since you do not like links here it is:

Here's my opinion.

I would like this to throw an error since the use of commas in the variable %DisplayNameForWBSoftware% would make more parameters than what 0x1 tollerates:

Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

RegHiveUnLoad,WB-Software

I would like this to write test4,5 sucessfully because by the use of quotation WB is told that %DisplayNameForWBSoftware% is a single parameter (not a variable potentially consisting of more than one comma-separated parameter as in the example above):
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

RegHiveUnLoad,WB-Software

With WB working in this way, the following would then be possible, which would write two value entries beneath the 0x7 key:
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x7,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%

RegHiveUnLoad,WB-Software
and this would write only one value entry beneath the 0x7 key:
Set,%DisplayNameForWBSoftware%,"test4,5"

RegHiveLoad,WB-Software,%target_sys%\config\software

RegWrite,HKLM,0x7,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"

RegHiveUnLoad,WB-Software

Regards,
Galapo.



I hope now it is clear ???

#20 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 05:13 PM

Maybe this can end tests and discussion:
(See http://www.boot-land...?...ost&p=61565)

First some rules:

  • WinBuilder Script Line Parameters are separated by a comma.
    If a comma is inside an argument, it must be 'escaped' by #$c
  • Besides some special cases (e.g. parameters in ShellExecute) generally enclosing quotes are not needed.
  • Enclosing quotes MUST be used if the WinBuilder Script Line Parameters contain spaces (Remark: Nothing about qotes allowing a comma instead of the escape)
    If the spaces are replaced by the escape #$s, the enclosing quotes should be ommitted.
In most cases user violation of that rules are accepted by WinBuilder and processed as assumed.
E.g. unnecessary enclosing quotes or a comma inside an item enclosed by quotes.

But sometimes that can bring unexpected results.

...

You see how important it is to follow the rules, even if WinBuilder understands most violations correctly.

(Some markup changed by me to point to important words)

Peter

#21 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 22 January 2010 - 05:20 PM

this doesn't work wirh 078SP6:
[codebox]Set,%DisplayNameForWBSoftware%,"test4,5" RegHiveLoad,WB-Software,%target_sys%\config\software RegWrite,HKLM,[b][color="#008000"]0x1[/color][/b],WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware% RegHiveUnLoad,WB-Software[/codebox] but interestingly this works fine with 078SP6: [codebox]Set,%DisplayNameForWBSoftware%,"test4,5" RegHiveLoad,WB-Software,%target_sys%\config\software RegWrite,HKLM,[b][color="#008000"]0x7[/color][/b],WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware% RegHiveUnLoad,WB-Software[/codebox] i mean this later intended as: [code]reg.exe ADD HKLM\WB-Software\PSC /f /v DisplayName /t REG_MULTI_SZ /d test4\05[/code]
and the result is exactly that what was expected

#22 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 05:30 PM

you forgot the quotes Peter, On post #2 and following posts I always gave examples with quotes. I guess you missed that.

I have to agree that I missed to recognize those quotes :whistling:
I already wanted to ask Galapo for the difference berween example #1 and #2 or #3 and #4 resp.

But I think my last post should bring the 'True syntax' back.

Sometimes the violation of the rules can bring unexpected results.
As here when a result reached by violation of the programmed rules, suddenly disappeared because the code changed.

Back Compatibility does not mean that 'results' reached because of wrong syntax, wil be reached for ever using the same wrong syntax.

To help a bit to 'lower' the issue:

If declared as 'necessary' by the forum, I will add, that in the SET command a comma in the value is replaced by #$c.
But it must be seen that here the trial to exchange inside one build is made maybe some 1000 times, and really performed only once or twice.
That is really no speed enhancement for WinBuilder.

Peter

#23 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 05:34 PM

this doesn't work wirh 078SP6:

0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%RegHiveUnLoad,WB-Software _linenums:0'>Set,%DisplayNameForWBSoftware%,"test4,5"RegHiveLoad,WB-Software,%target_sys%\config\softwareRegWrite,HKLM,<strong class='bbc'>0x1</strong>,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%RegHiveUnLoad,WB-Software
but interestinglythis works fine with 078SP6:
0x7,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%RegHiveUnLoad,WB-Software _linenums:0'>Set,%DisplayNameForWBSoftware%,"test4,5"RegHiveLoad,WB-Software,%target_sys%\config\softwareRegWrite,HKLM,<strong class='bbc'>0x7</strong>,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%RegHiveUnLoad,WB-Software

Of course!0x7 writes multiple strings separated by comma, and that is what here is delivered.
0x1 wants only one string and has troubles when getting multiple strings.

Peter

#24 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 22 January 2010 - 05:43 PM

If declared as 'necessary' by the forum, I will add, that in the SET command a comma in the value is replaced by #$c.

I would like to have things work in the way Galapo wrote in his examples. Trusting wb is more important to me than any speed improvements. I do not like bolts of the engine spread around when I go with any speed (either 100KM or 260KM).

I already wanted to ask Galapo for the difference berween example #1 and #2 or #3 and #4 resp.

this is very clear, let me try:

starting with example 1 2 (trying to keep short):

galapo example 1:
-------------------
Set,%DisplayNameForWBSoftware%,"test4,5"
RegHiveLoad,WB-Software,%target_sys%\config\software
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%
RegHiveUnLoad,WB-Software

galapo says it should throw error because 0x1 value can not be written with commas (it can only be single string).
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,test4,5
is not valid.
-------------------


galapo example 2:
-------------------
Set,%DisplayNameForWBSoftware%,"test4,5"
RegHiveLoad,WB-Software,%target_sys%\config\software
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"
RegHiveUnLoad,WB-Software

galapo says it should work since
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"test4,5"
is valid.
-------------------

If I could be successfull to explain example 1 and 2, I can continue to 3 and 4 which have very similar explanation ????

ps: replies to other posts posponed to keep current post short and with the aim of going further about the issue.

#25 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 05:50 PM

this is very clear, let me try:

...

What I wanted to say that after your hint about the quotes in the THIRD line, the question was not necessary any more, because due to your "quotes" I understood what's going on with Galapo's suggestion. :whistling:


Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users