Jump to content











Photo
- - - - -

Frustration


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

#26 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 06:04 PM

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.

As known from my signature, I usually avoid the word "Problem". There are only issues.

But here I see a real "Problem". "Trusting wb" in this case means "Trusting that the interpretation of an invalid syntax (and the result of the interpretation) will be the same in the future"

A nightmare for a programmer, because also a stronger check of the syntax will bring complains ("That worked before! Why now a syntax error?")

@Lancelot: Maybe you learn Delphi, come into the team and code that part! (Just kidding) :ranting2:

And just a wish to developers:
When you see that e.g.
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,"%DisplayNameForWBSoftware%"
and
RegWrite,HKLM,0x1,WB-Software\PSC,DisplayName,%DisplayNameForWBSoftware%
Bring different results since WB072 or earlier, that is an issue, maybe a bug to be reported.
It is not a bug to be reported, when an issue or bug disappears :whistling:


Peter

#27 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 - 06:33 PM

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. :ranting2:

But there still remains some unanswered questions and comments. :whistling:.

Maybe this can end tests and discussion:

There was never a discussion (and I wrote many times that before). After I get my first reply from my bug report I already knew what will your decision will be whatever anybody writes. I only shared my ideas of concerns for future (which none of them ever replied honestly even with previous post, only keeping jokes (or methods of posting) but nothing written decently as an answer.). Besides the honest responses to this topic shows that our advanced scripts authors (not me) also have confusions because of wb behaviours. (trustability). I believe the answers of the questions in the end will clear everybodies mind.

Only discussion was created by you ironicly by claiming this never worked with WB 072, WB 074, WB 076 and WB 077RC2 but now, at last you understand it was working with WB 072, WB 074, WB 076 and WB 077RC2. End of discussion, now time to go further.

As written many times by me before, I do not say you "must" do the things with the "known" methods by any scripting adviced by anybody, I only write I believe this (as written by galapo's examples) is the logical way for a script writer to write things for registry with set (variables). Yes scriptwriters must not trust their bad habits of other codings.
I already updated the 3 scripts ~4 days ago after your findings (already knowing what will happen next) and asked you the 2nd question written below.

What I am looking for is the answers of following questions:
2 ) WHAT will be written on log for the wrong entries to warn user when something wrong with these kind of usages going on ????? so many can fix scripts when this happens.
3 ) With Galapo's examples, how to use regwrite with using variables by set and following galapo's example you can also answer question 1 2.

I believe clear answers of these questions will clear all scriptwriters (and none delphi coders) mind.
:ranting2:

#28 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 January 2010 - 06:56 PM

# Enclosing quotes MUST be used if the WinBuilder Script Line Parameters contain spaces (Remark: Nothing about qotes allowing a comma instead of the escape)

Could we get rid of this exception and have the clear syntax rule of:
"Never use quotes, but always use escape sequences!"?

I mean, i would love the syntax rules different as explained, but if the quotes should go, then they should go completely and not be lurking somewhere in the dark.

:whistling:

#29 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 07:26 PM

Could we get rid of this exception and have the clear syntax rule of:
"Never use quotes, but always use escape sequences!"?

I mean, i would love the syntax rules different as explained, but if the quotes should go, then they should go completely and not be lurking somewhere in the dark.

:whistling:

I also thought already about this, but there is one argument which cannot be neglected: Readability.
In many commands, e.g. the simple Echo command there are arguments with (multiple) spaces. If all these spaces ase replaced by the escape, the line becomes 'unreadable'.

All the other special characters can be replaced by the escape because they only occur rarelly.
With an #$c inside, a line is not really "easily redable" but "rather well readable"

Peter

#30 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 07:38 PM

What I am looking for is the answers of following questions:
2 ) WHAT will be written on log for the wrong entries to warn user when something wrong with these kind of usages going on ????? so many can fix scripts when this happens.
3 ) With Galapo's examples, how to use regwrite with using variables by set and following galapo's example you can also answer question 1 2.

#2:
Currently in SP7 implemented is the log:
Posted Image SetVar - Sucessfuly changed the value of [%DisplayNameForWBSoftware%] to: [test4,5]
...
Posted Image RegWrite - Type: [0x1] Section [HKLM\WB-Software\PSC] Key [DisplayName]: test4

To prevent questions: Sorry, WB cannot know (when processing RegWrite) what the user intended to do.
It can only interpret the actual command line, and therefore only detect a parameter count error and give a message how the (not preformed) script line is understood.

#3: As already explained, I "enhanced" the Set command by ALLWAYS exchanging a comma in the value by #$c
So the author's mistake is corrected (by causing some performance decrease), and the following "RegWrite" will work as known since WB 072 (or earlier)

Peter

#31 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 - 07:59 PM

here is another issue, maybe related or not (due to comma edit: "and variable" usage) so I write here:

I have some scripts which includes these kind of lines, I simplified with the following example to ease explaining,

here is a test script:
[Variables]

testvar=Run,%ScriptFile%,test



[Process]

Set,%addfile%,testvar

%addfile%,test



[test]

Echo,"#1"

it works nicely with wb077rc2

but it does not work with wb078sp6 giving warning "Unrecognized command: [%addfile%,test]"
?

#32 pscEx

pscEx

    Platinum Member

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

Posted 22 January 2010 - 08:22 PM

Sorry, I'm not very creative right now. Today I have had a seven hours car drive, and I feel a bit tired.

On the first view: You are reporting a bug.
On the second view: I do not know any script where this construction is used and works.
On the third view: If it works anywhere: Does it really not violate some rules, and works "Nobody knows why"?
On the fourth view: I think that your line is nonsence due to outside of WinBuilder syntax. We have the ability to define something in [Variables] like MyProg=Exec / Run %anyDir%\%AnyScript%\%Mysection%. And then activate with a command line Myprog.
If you expand this possibility to "Use of variables" etc., it shows your creativity, but it does not automatically implement that your creative ideas are implemented in WB (and will ever be implemented).
BTW: If you write it into the bug tracker as suggestion, me personally would refuse as "unimplementable"

Let me see tomorrow, but I see no chance to help you in this request of yours.

Peter

#33 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 - 08:36 PM

Than time to sleep Peter,

I do not know any script where this construction is used and works.

Because not published yet.

Same section processed twice with different values of %addfile% , nothing miracle. I already have ideas for "workarounds" in mind, all up to your respond tomorrow.

Good night, have nice dreams. :whistling:

:ranting2:

edit:
last 2 posts of this topic answered on a new topic here
http://www.boot-land...showtopic=10235
since current topic is closed without any reason ??

#34 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 January 2010 - 08:38 PM

I also thought already about this, but there is one argument which cannot be neglected: Readability.

I think, that an easy syntax rule does more for error free code than good readability.
But if you really want good readability, get rid of the strange escape sequences all together.

:whistling:

#35 pscEx

pscEx

    Platinum Member

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

Posted 23 January 2010 - 08:55 AM

here is another issue, maybe related or not (due to comma edit: "and variable" usage) so I write here:

I have some scripts which includes these kind of lines, I simplified with the following example to ease explaining,

here is a test script:

[Variables]

 testvar=Run,%ScriptFile%,test

 

 [Process]

 Set,%addfile%,testvar

 %addfile%,test

 

 [test]

 Echo,"#1"

it works nicely with wb077rc2

but it does not work with wb078sp6 giving warning "Unrecognized command: [%addfile%,test]"
?


See here:
http://www.boot-land...?...ost&p=71514

For Macro definitions the percent is not allowed.

When wb077rc2 processes it inspite of the wrong syntax, is unintended.

Peter

#36 pscEx

pscEx

    Platinum Member

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

Posted 23 January 2010 - 02:19 PM

Let's close the topic now.

I made a modification that RegWrite 0x1 also processes split variables, which contain a comma rather than the escape #$c.
Available in WB 078 SP7.

Now everybody is happy:
  • I'm happy because I needed less than one day to allow this syntay error being processed in that way, like some users assumed to be correct. :ranting2:
  • Lancelot is happy because he saved many hours by not writing correct syntax into 3 LiveXP scripts and replace commas by the escape #$c. :ranting2: :whistling:
  • All users are happy because they now can use WB 078 SP6 as 'LiveXP official version' rather than WB 077 RC2. :cheers:
Peter :worship:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users