Jump to content











Photo
* * * * * 1 votes

AddVariables


  • Please log in to reply
22 replies to this topic

#1 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 10:31 AM

Hi Nuno Brito :D

This Script Syntax command isn't working on the WinBulder 080 .

[c9d80df159f3a3b7ff927c21e7687ec4 *WinBuilder.exe]

Best regards :)

[Main]

Title=test

Author=

Level=1



[Process]

AddVariables,"%ScriptFile%","pC1"

If,"%testone%",EQUAL,"%1%",Message,"testone = 1",INFORMATION



[pC1]

testone=1

testtwo=0



[Interface]

pCheckList1=pC1,1,9,6,6,200,200,


#2 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 10:35 AM

If,"%testone%",EQUAL,"%1%",Message,"testobe = 1",INFORMATION

What is the variable %1%? :D

I think you should write
If,%testone%,EQUAL,1,Message,"testobe = 1",INFORMATION
(Omitted unnecessary quotes)

Peter :)

#3 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 11:33 AM

What is the variable %1%? :D


Hi psc :)

This is a new variable of the AddVariables command :)


What is the variable %1%? :)

I think you should write

If,%testone%,EQUAL,1,Message,"testobe = 1",INFORMATION
(Omitted unnecessary quotes)

Peter :)


In this way the command does not work definitely !

This command works with WinBuilder 076 :)

For more information:
http://www.paraglide...ml#AddVariables

Best regards :)

#4 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 11:52 AM

Something is very confused here:

"script_syntax.html of 2010-FEB-19"
Custom Variables
...
Place a section called [variables] and write your variables in INI style. It is obligatory to use the percentage (%) for labeling it as a variable.
...

Your variables does not have the %

The AddVariables in your sample cas would add testone and testtwo, and these 'wrong' values are treated inpredictable.

Even if they are treated 'as user wants', the value is just 1, not %1%

Peter

#5 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 11:56 AM

Something is very confused here:

Your variables does not have the %

The AddVariables in your sample cas would add testone and testtwo, and these 'wrong' values are treated inpredictable.

Even if they are treated 'as user wants', the value is just 1, not %1%

Peter


OK.

Please give me the correct code for post 1 with WinBuilder 080 ? Because I did not understand anything :)

Best regards :D


@Edit : WinBuilder 076
https://dl-web.dropb...e...7b3074&dl=1

#6 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 12:20 PM

[Main]

Title=test

Author=

Level=1



[Process]

AddVariables,%ScriptFile%,pC1

If,%testone%,EQUAL,1,Message,"testone = 1",INFORMATION



[pC1]

%testone%=1

%testtwo%=0

Peter :D

#7 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 12:24 PM

Huh :D

I'm thank you very much psc for your reply and support :)

Best regards :)

#8 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 12:30 PM

But !

Check box is a strange name so I can not give the name to the check box without percent :D


Attached File  03.09.png   77.49KB   24 downloads



[Main]

Title=test

Author=

Level=1



[Process]

AddVariables,"%ScriptFile%","pC1"

If,"%testone%",EQUAL,"1",Message,"testone=1",INFORMATION



[pC1]

%testone%=1

%testtwo%=0



[Interface]

pCheckList1=pC1,1,9,6,6,200,200,


#9 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 01:15 PM

Now I understand the real issue!

The behaviour has changed not in 080, but starting with 077 ???

Before that, unintended, EVERYTHING could be treated as variable, since then is the enclosing % obligatory.

Logically your line
If,%testone%,EQUAL,%1%
treates the % as a string.
It could also be
If,blatestonehello,EQUAL,bla1hello

I try to reconstruct the logical behaviour.

Peter

#10 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 01:30 PM

Now I understand the real issue!

The behaviour has changed not in 080, but starting with 077 ???

Before that, unintended, EVERYTHING could be treated as variable, since then is the enclosing % obligatory.

Logically your line

If,%testone%,EQUAL,%1%
treates the % as a string.
It could also be
If,blatestonehello,EQUAL,bla1hello

I try to reconstruct the logical behaviour.

Peter


I did not understand at all what you said. That this is not the solution. I think it should be reorganized WinBuilder 080 because this is a bug :D
I do not want to use the WinBuilder 076. :D

Best regards :)

#11 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 02:06 PM

I did not understand at all what you said. That this is not the solution. I think it should be reorganized WinBuilder 080 because this is a bug :D
I do not want to use the WinBuilder 076. :D

Best regards :)

Simply:
There has been a bug in WB before version 077 which let understand some wrong syntax code in a way the user intended.

This bug has been fixed and therefore the code in 077 ???, 078, 080, 081 ??? is not executed in the way you assume.

What I want to do: Try to let WB 081 ??? understand the buggy syntax.

But there is no way to rebuild all 077 ???, 078, 080, 081 to understand 'your' intention

Peter

BTW: I just downloaded all projects which are in the WinBuilder standard updates.ini: None of them contained pCheckList

#12 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 02:24 PM

aggh :D

Namely can we do not use this Check List of the WinBuilder 08X without percent mark for give names to values ? :D


Attached File  03_2.09.png   98.17KB   17 downloads

#13 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 02:56 PM

Right, that is the reason I said:

I try to reconstruct the logical behaviour.


But as said, it is not possible to build 'back' into older versions. The current develop version is 081 RC2.

Peter

#14 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 03:07 PM

God bless you. i wait WinBuilder 081 RC2 :D

#15 pscEx

pscEx

    Platinum Member

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

Posted 03 September 2010 - 05:04 PM

God bless you. i wait WinBuilder 081 RC2 :D

That can take a long time, because 081 RC1 is not yet released due to concerns of several members.

I changed in RC 2:

[081] RC 2
date=2010-05-20

fixed - Bug which did not allow GLOBAL changes of %Constants%
fixed - Bug with duplicating quotes in interface text labels
fixed - Bug in IniDelete
changed - variables replacement: from linear search to binary search
fixed - #$xs sometimes not resolved
improved - log output
fixed - some smaller bugs when treating multiple components in interface editor
fixed - bug in progress window when exec a script at tree end
fixed - made behaviour of interface component 'FileCheckList' logically compatible to WinBuilder 076

If you like adventures you may have a look into the nativeEx home page.
Under 'Download' > Test maybe you find a 'nightly' version of WinBuilder.

Peter

#16 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 06:27 PM

Hi psc :)

You have done a great job so i congratulate you :D

Result : Problem was solved by psc.

Best regards :D


Attached File  03.099.png   102.95KB   10 downloads

#17 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 03 September 2010 - 07:22 PM

That can take a long time, because 081 RC1 is not yet released due to concerns of several members.

I changed in RC 2:

If you like adventures you may have a look into the nativeEx home page.
Under 'Download' > Test maybe you find a 'nightly' version of WinBuilder.

Peter


Hi psc :D

The WinBuilder 081 RC 2 T has an error at the regwrite line.
7c75c8bd609a0de9b96dc9120fe05038 *MD5* WinBuilder.exe

Echo,"Writing configuration...."

Hive_Load,HKCU

Echo,"Writing new values on registry hive.."

reg_add,0x2,"%reg%\Control Panel\Desktop","test","testkey"

Hive_Unload,HKCU

Attached File  log.7z   15.57KB   2 downloads


Best regards :D

#18 pscEx

pscEx

    Platinum Member

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

Posted 04 September 2010 - 11:32 AM

Hi psc :D

The WinBuilder 081 RC 2 T has an error at the regwrite line.
7c75c8bd609a0de9b96dc9120fe05038 *MD5* WinBuilder.exe

Echo,"Writing configuration...."

Hive_Load,HKCU

Echo,"Writing new values on registry hive.."

reg_add,0x2,"%reg%\Control Panel\Desktop","test","testkey"

Hive_Unload,HKCU

Attached File  log.7z   15.57KB   2 downloads


Best regards :D

I'm very sure that your common api script contains a line
%reg%\=%reg_temp%\
I already posted long time ago that this API bug is not ignored by version 081, but nobody found it reasonable to fix the bug in actual projects.

Peter

#19 paraglider

paraglider

    Gold Member

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

Posted 04 September 2010 - 11:40 AM

Yes. That fixed the problem for me.

#20 pscEx

pscEx

    Platinum Member

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

Posted 04 September 2010 - 04:58 PM

OFFTOPIC question: :D

Person#1 gives a solution
Person#2 agrees that the solution works for him.

Why person #2 gets a 'Thanks'?

Peter :D

#21 paraglider

paraglider

    Gold Member

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

Posted 04 September 2010 - 05:30 PM

Just so you don't feel left out ...

#22 pscEx

pscEx

    Platinum Member

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

Posted 04 September 2010 - 05:42 PM

:D Peter

#23 pscEx

pscEx

    Platinum Member

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

Posted 12 June 2011 - 05:27 PM

fixed - Bug which did not allow GLOBAL changes of %Constants%

As soon as you explain how to do that in a high language like C, Basic or Delphi, I'll try to help some people with their crazy ideas.

Did you already sent a bug report e.g. to Borland, that Delphi does not allow to overwrite contants?:thumbsup:

Peter :cheers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users