Jump to content











Photo
- - - - -

[syntax] Why QL shortcut in Variant 1 works OK and in Variant 2 NOT?


  • Please log in to reply
13 replies to this topic

#1 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 23 April 2007 - 08:37 AM

Why QL shortcut in Variant 1 works OK and in Variant 2 NOT?
It is valid for LiveXP and nativeEx.

Variant 1:

[Variables]
%ProgramMenu%=TotCmd
%ProgDir%=
%ShC%=%Ł%pSystemDrive%Ł%p
%StartMenu%=
%Ł%=#$

[ShorcutDesktop]
Run,%BuildModelScript%,Add-Shortcut,"DE","%ShC%\%ProgDir%\TotCmd\TotCmd.exe","TotCmd"

[ShorcutStart]
If,%CheckBoxStartFolder%,Equal,True,Run,%ScriptFile%,StartFolder

[ShorcutQL]
Run,%BuildModelScript%,Add-Shortcut,"QL","%ShC%\%ProgDir%\TotCmd\TotCmd.exe","TotCmd"

[ShorcutST]
Run,%BuildModelScript%,Add-Shortcut,"ST","%ShC%\%ProgDir%\TotCmd\TotCmd.exe","TotCmd"


Variant 2:

[Variables]
%Target_Dir%=%TargetDir%
%WorkDir%=
%SysDrV%=#$pSystemDrive#$p
%ProgramMenu%=\TotCmd

[ShorcutDesktop]
Run,%BuildModelScript%,Add-Shortcut,"DE","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

[ShorcutStart]
Run,%BuildModelScript%,Add-Shortcut,"SM%ProgramMenu%","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

[ShorcutQL]
Run,%BuildModelScript%,Add-Shortcut,"QL","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

[ShorcutST]
Run,%BuildModelScript%,Add-Shortcut,"ST","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

#2 pscEx

pscEx

    Platinum Member

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

Posted 23 April 2007 - 09:16 AM

Why QL shortcut in Variant 1 works OK and in Variant 2 NOT?
It is valid for LiveXP and nativeEx.

Variant 1:

[Variables]
%ProgramMenu%=TotCmd
%ProgDir%=
%ShC%=%Ł%pSystemDrive%Ł%p
%StartMenu%=
%Ł%=#$

[ShorcutDesktop]
Run,%BuildModelScript%,Add-Shortcut,"DE","%ShC%\%ProgDir%\TotCmd\TotCmd.exe","TotCmd"

[ShorcutStart]
If,%CheckBoxStartFolder%,Equal,True,Run,%ScriptFile%,StartFolder

[ShorcutQL]
Run,%BuildModelScript%,Add-Shortcut,"QL","%ShC%\%ProgDir%\TotCmd\TotCmd.exe","TotCmd"

[ShorcutST]
Run,%BuildModelScript%,Add-Shortcut,"ST","%ShC%\%ProgDir%\TotCmd\TotCmd.exe","TotCmd"


Variant 2:

[Variables]
%Target_Dir%=%TargetDir%
%WorkDir%=
%SysDrV%=#$pSystemDrive#$p
%ProgramMenu%=\TotCmd

[ShorcutDesktop]
Run,%BuildModelScript%,Add-Shortcut,"DE","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

[ShorcutStart]
Run,%BuildModelScript%,Add-Shortcut,"SM%ProgramMenu%","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

[ShorcutQL]
Run,%BuildModelScript%,Add-Shortcut,"QL","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

[ShorcutST]
Run,%BuildModelScript%,Add-Shortcut,"ST","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"


The WinBuilder mechanism of replacing variables sometimes is still a mystery ...

Peter

#3 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10549 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 23 April 2007 - 03:09 PM

Why QL shortcut in Variant 1 works OK and in Variant 2 NOT?

....

Variant 2:

[Variables]
...
%WorkDir%=
...

[ShorcutQL]
Run,%BuildModelScript%,Add-Shortcut,"QL","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

...


This will result in something like ,"%SysDrV%\\TotCmd\TotCmd.exe" wich occurs since you're asking to reset the value of %WorkDir% on the [variables]

To properly debug the value of these variables you can use echo and read their value on the log window, or output a message and see if they match the results you expect.

If this doesn't solve it - please post the complete script including the interface section to check the other variables.

Hope this helps, good luck! :cheers:

#4 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 23 April 2007 - 03:21 PM

This will result in something like ,"%SysDrV%\\TotCmd\TotCmd.exe" wich occurs since you're asking to reset the value of %WorkDir% on the [variables]


Why

[ShorcutDesktop]
Run,%BuildModelScript%,Add-Shortcut,"DE","%SysDrV%\%WorkDir%\TotCmd\TotCmd.exe","%TBoxShortcutName%"

works OK and QL not?

#5 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10549 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 23 April 2007 - 03:27 PM

Because I am sure that you are giving %workdir% an empty value on [variables] and I still need to view the [process] and [interface] sections otherwise we'd be guessing the reasons.

Please post the rest of your script.. :cheers:

#6 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 23 April 2007 - 03:35 PM

Because you are giving %workdir% an empty value on [variables] and I still need to view the [process] and [interface] sections otherwise we'd be guessing the reasons..

:cheers:



Thank you Nuno for spending your time in discussion with me,
but I am not on your level.

Best will be that I post complete script for your evaluation.

Attached File  PowerISO.zip   368.09KB   244 downloads

#7 pscEx

pscEx

    Platinum Member

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

Posted 23 April 2007 - 04:08 PM

Thank you Nuno for spending your time in discussion with me,
but I am not on your level.

Best will be that I post complete script for your evaluation.

Attached File  PowerISO.zip   368.09KB   244 downloads


Maybe next time you attach the suspicious script in the very first post.
That prohibits several forum members like me wasting their time.

Please compare

[Interface]
pBevel2=pBevel2,1,12,21,67,171,168
pTextLabel1="Create shortcuts in :",1,1,27,73,117,18,8,Normal
CheckBoxShortcutDesktop="Desktop",1,3,30,94,129,18,True
CheckBoxShorcutStart="StartMenu",1,3,30,114,96,18,True
CheckBoxShorcutQ="Quick Launch",1,3,30,134,150,18,False
CheckBoxSendTo="Send To",1,3,30,154,87,18,False
TBoxShortcutName="Shortcut name",1,0,30,199,147,21,"PowerISO"
CheckBoxStartFolder=,1,3,14,264,40,18,True
pTextBox2="Folder in menu",1,0,30,262,138,21,"PowerISO"

with

If,%CheckBoxShorcutQL%,Equal,True,Run,%ScriptFile%,ShorcutQL


Peter

#8 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4171 posts

Posted 23 April 2007 - 04:42 PM

As fellow developers you know that one can forget to do something when a person is determined to make something work. So the best thing to do is post your development efforts so that other fresh minds might help. Ive fallen victim to these type of mistakes.

Thanks for doing so.

#9 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 23 April 2007 - 04:45 PM

Maybe next time you attach the suspicious script in the very first post.
That prohibits several forum members like me wasting their time.

Please compare

with
Peter


Thank you Peter!

I have spend days looking what is wrong
and I didn't notice that one letter "L" is missing.

In addition I found that instead of "Shortcut"
on some places "Shorcut" is used?!

This is the result of Pedro's MakeScript_V10 generator.
I could not correct it and Pedro is lost.
I must go through all Application scripts and manually make changes.

Thank you all for your time and attention!

#10 pscEx

pscEx

    Platinum Member

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

Posted 23 April 2007 - 05:16 PM

Thank you Peter!

I have spend days looking what is wrong
and I didn't notice that one letter "L" is missing.

In addition I found that instead of "Shortcut"
on some places "Shorcut" is used?!

This is the result of Pedro's MakeScript_V10 generator.
I could not correct it and Pedro is lost.
I must go through all Application scripts and manually make changes.

Thank you all for your time and attention!

@Phox
You are my official WinBuilder friend.
And as a fried allow me this statement.
(I do not want to PM, because it also it is valid for all other forum's members)

In the near past we already had a similar situation with 'nativeEx-barebone standard options', where after a long discussin it bacame clear that you misunderstood 'standard'.

I'm sure you are younger then me.

And many years I had to fight with and against bugs and unwanted 'features' ...
But I needed a long time to understand that most of the bugs and unwanted features have been my work!

So, when now I have an issue, I first ask 'what did I wrong'.

And If I ask some other people to help me, I detailled describe what I did.
(Sometimes during description I can abort it, because I saw my mistake).

Next issue you have, try to think on this!

BTW the misspelling of 'shortcut' really does not matter, but it may be the root of new troubles, if somebody tries to change the script.

Peter

#11 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 23 April 2007 - 06:40 PM

@Phox
You are my official WinBuilder friend.
And as a fried allow me this statement.
(I do not want to PM, because it also it is valid for all other forum's members)


@Peter.

Thank you for friendly lecture. This type of answer I only allow to my real friends.
I am glad that you use me, to give example to all other Forum members. I feel honored.

In the near past we already had a similar situation with 'nativeEx-barebone standard options', where after a long discussin it bacame clear that you misunderstood 'standard'.


I don’t know what you specify as standard, but to my modest knowledge and experience,
any product should be so designed that it could not be damaged by its commands (buttons,
check boxes, ect). If something must be used, than there should not be possibility for selection.

I am thankful for any help, but I don’t press anybody to spend time helping me. I understand
that this Forum is organized on a fully voluntary basis. I also think that my mistakes could help
other members not to repeat them.

I'm sure you are younger then me.


I am not sure how you came to this conclusion and what importance it has?

And many years I had to fight with and against bugs and unwanted 'features' ...
But I needed a long time to understand that most of the bugs and unwanted features have been my work!


I have a feeling that you accept most of the comments as an attack on your work?
There is no need for it! You are second (after Nuno) most valuable Forum member and
I really appreciate and admire your work. A little more patience will help.

So, when now I have an issue, I first ask 'what did I wrong'.


That is my approach to. But I don’t have your knowledge and experience in this area.

And If I ask some other people to help me, I detailled describe what I did.
(Sometimes during description I can abort it, because I saw my mistake).


I do it, but again, I don’t have (and some other members) enough knowledge to place right
question or to prepare documentation.

Next issue you have, try to think on this!


I will try!

BTW the misspelling of 'shortcut' really does not matter, but it may be the root of new troubles, if somebody tries to change the script.

Peter


That much I know, but for the sake of correctness it should be taken care.

Thank you for your time and attention.

phox.

#12 pscEx

pscEx

    Platinum Member

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

Posted 23 April 2007 - 06:51 PM

@Peter.

Thank you for friendly lecture. This type of answer I only allow to my real friends.
I am glad that you use me, to give example to all other Forum members. I feel honored.



I don't know what you specify as standard, but to my modest knowledge and experience,
any product should be so designed that it could not be damaged by its commands (buttons,
check boxes, ect). If something must be used, than there should not be possibility for selection.

I am thankful for any help, but I don't press anybody to spend time helping me. I understand
that this Forum is organized on a fully voluntary basis. I also think that my mistakes could help
other members not to repeat them.



I am not sure how you came to this conclusion and what importance it has?



I have a feeling that you accept most of the comments as an attack on your work?
There is no need for it! You are second (after Nuno) most valuable Forum member and
I really appreciate and admire your work. A little more patience will help.



That is my approach to. But I don't have your knowledge and experience in this area.



I do it, but again, I don't have (and some other members) enough knowledge to place right
question or to prepare documentation.



I will try!



That much I know, but for the sake of correctness it should be taken care.

Thank you for your time and attention.

phox.


Thanks Phox for your reply!

It proofs that I have been right long time ago to declare you as my friend.

I do not want to answer every topic.
Just one: My feeling that you are younger then me, is a result of the fact that your kind of posting -beeing very absolute, black and white describing- reminds me on myself about 10 to 15 years ago.

Peter

#13 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 23 April 2007 - 07:34 PM

Thanks Phox for your reply!

It proofs that I have been right long time ago to declare you as my friend.

I do not want to answer every topic.
Just one: My feeling that you are younger then me, is a result of the fact that your kind of posting -beeing very absolute, black and white describing- reminds me on myself about 10 to 15 years ago.

Peter



Thank you!

#14 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4171 posts

Posted 24 April 2007 - 06:16 AM

@Peter.
Thank you for friendly lecture. This type of answer I only allow to my real friends.
I am glad that you use me, to give example to all other Forum members. I feel honored.

:cheers: Phox and Peter get :cheers:.


I also think that my mistakes could help
other members not to repeat them.

Same for me. One way for us to learn and that is thru all of us helping each other better ourselves.


I am not sure how you came to this conclusion and what importance it has?
I have a feeling that you accept most of the comments as an attack on your work?
There is no need for it! You are second (after Nuno) most valuable Forum member and
I really appreciate and admire your work. A little more patience will help.

Lets have a round of :cheers: for everyone and a bit of :cheers:. :cheers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users