Jump to content











Photo
- - - - -

Build 049 - beta 1


  • Please log in to reply
13 replies to this topic

#1 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 03 August 2006 - 08:03 PM

This is a preview of some of the new commands and bugfixes that will be available on the 049 release, I'm publishing these beta versions so that developers can take better advantage of these newer features and include them on their scripts.

Since these are mostly untested beta versions, it is not recommended for regular users althought it can still be used in replacement of openbuilder.exe from the 048 release.


Beta 1 - log of changes ------------------------------------------------

- Fixed a few invalid entries on the right-click menu on the source editor

- Changed the default process level when file blank from 3 to 4

- Added MD5click to ensure the integrity of downloaded files

- Added net update support for .link files

- Added AddVariables - a command that allows to load variables from a section in any ini file. Syntax: AddVariables,%scriptFile%,SectionToAdd

- Added special character #$p - that will be decoded to % (usefull to use in batch commands)

- Section [Variables] on script.project files now holds global variables that will extend to each script

---------------------------------------------------------------------------

MD5: 43659b94d04f6d0bcb55b955cf96feb7 - OpenBuilder049-B1.zip


Have fun!
:P

Attached Files



#2 pscEx

pscEx

    Platinum Member

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

Posted 04 August 2006 - 09:32 AM

- Section [Variables] on script.project files now holds global variables that will extend to each script

Tried with
[Variables]

%ProjectInfo%=%ProjectDir%\ProjectInfo.ini
:P

- Added AddVariables - a command that allows to load variables from a section in any ini file. Syntax: AddVariables,%scriptFile%,SectionToAdd


Tried with
AddVariables,%ProjectInfo%,Created

Echo,"Date=%Date%"
Result

AddVariables: Sucessfully added section [Created] from file [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Projects\PicoXP\ProjectInfo.ini] into the local variable list
04.08.2006=%04.08.2006%

I think it should be

AddVariables: Sucessfully added section [Created] from file [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Projects\PicoXP\ProjectInfo.ini] into the local variable list
Date=04.08.2006

:P

Peter :P

#3 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 04 August 2006 - 10:00 AM

Thanks for reporting this, the variables are a tricky issue to handle, I'm also working on the run command with parameters.. :P

#4 pscEx

pscEx

    Platinum Member

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

Posted 04 August 2006 - 10:12 AM

I'm also working on the run command with parameters.. :P

:P :P :P

Peter

#5 pscEx

pscEx

    Platinum Member

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

Posted 04 August 2006 - 03:51 PM

Issue with AddVariables:

MakeDirs looks like
[process]

...

Run,%ScriptLog%,Process-log

That gives ProjectInfo.ini

[Scripts]
0 - Retrieve Project Info=2006-Aug-04 17:47:09
1 - PX Make directories=2006-Aug-04 17:47:10
Auto Keyboard=2006-Aug-04 17:47:11
Screen resolution=2006-Aug-04 17:47:11

If I change to
[process]

AddVariables,%ProjectInfo%,Created

...

Run,%ScriptLog%,Process-log
it results with

[Scripts]
0 - Retrieve Project Info=2006-Aug-04 17:48:41
1 - PX Make directories=
Auto Keyboard=2006-Aug-04 17:48:42
Screen resolution=2006-Aug-04 17:48:43

Log:

Processing section: [Process-log] from file: [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Archive\Build\ScriptLog.script]
Sucessfully read specified Inifile from: [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Projects\PicoXP\Build\Build-1-MakeDirs.Script] Section: [Main] Key: [Title] into variable: [%Title%] with value: [1 - PX Make directories]
IniDeleteKey - Successfully deleted INI key in [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Projects\PicoXP\ProjectInfo.ini] key: [1 - PX Make directories]
StrFormat - Failed to convert [2006-aug-04 17:48] from: [yyyy-mmm-dd hh:nn:ss] to variable: [%TimeStamp%]
IniWrite - Successfully wrote INI key in file: [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Projects\PicoXP\ProjectInfo.ini] Section: [Scripts] key/value: [1 - PX Make directories=]
Run - Successfully processed section: [C:\Dokumente und Einstellungen\Peter\Desktop\OpenBuilder Test\Archive\Build\ScriptLog.script]

'2006-aug-04 17:48' is the content in %ProjectInfo%,[Created]Date=

Peter

#6 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 04 August 2006 - 08:24 PM

Your details are good, but I still fail to see where things are not being decoded as %variables%.. :P


I think this might be related to some confusion created when adding new variables to the list, perhaps adding special characters that make these added variables unique will solve these things.. :P

The global project variables use the same code routine as the AddVariables, I wonder why it's not working.. :P

#7 pscEx

pscEx

    Platinum Member

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

Posted 05 August 2006 - 08:05 AM

I think the command
AddVariables,%ProjectInfo%,Created
besides others adds the global

Date=2006-Aug-04 19:28

and in the ScriptLog script
StrFormat,Date,"%TimeStamp%","yyyy-mmm-dd hh:nn:ss"
is replaced by
StrFormat,2006-Aug-04 19:28,"%TimeStamp%","yyyy-mmm-dd hh:nn:ss"

 >> StrFormat - Failed to convert [2006-aug-04 17:48] from: [yyyy-mmm-dd hh:nn:ss] to variable: [%TimeStamp%]

(remember this reply.)

What about enclosing the variable names with % when reading from INI?

Peter

#8 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 10 August 2006 - 03:35 PM

I've finally understood what you needed to add, sorry for the delay..

The syntax of AddVariables should be the same on every case, so adding %% automatically on each group of added variables could eventually lead to cases of %%vars%% so I think it would be wiser to keep the addedvariables as unmodified as possible.

Perhaps an optional parameter wich would be placed on top and end of each var would solve this, what do you think?


AddVariables,%ScriptFile%,Section
or
AddVariables,%ScriptFile%,Section,%

:P

#9 pscEx

pscEx

    Platinum Member

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

Posted 10 August 2006 - 03:45 PM

I've finally understood what you needed to add, sorry for the delay..

The syntax of AddVariables should be the same on every case, so adding %% automatically on each group of added variables could eventually lead to cases of %%vars%% so I think it would be wiser to keep the addedvariables as unmodified as possible.

Perhaps an optional parameter wich would be placed on top and end of each var would solve this, what do you think?

AddVariables,%ScriptFile%,Section
or
AddVariables,%ScriptFile%,Section,%

:P


Did I understand correct:

AddVariables,%ScriptFile%,Created
results in

Date=2006-Aug-09 14:07
HostOS=Microsoft Windows XP [Version 5.1.2600]
OpenBuilderVersion=049

and
AddVariables,%ScriptFile%,Created,%
results in

%Date%=2006-Aug-09 14:07
%HostOS%=Microsoft Windows XP [Version 5.1.2600]
%OpenBuilderVersion%=049


That would be ok for me.

Peter

#10 xpdoctor

xpdoctor

    Newbie

  • Members
  • 11 posts

Posted 10 August 2006 - 05:30 PM

The character #$p (%) doesn't exist in context menu .
Please fix it

#11 pscEx

pscEx

    Platinum Member

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

Posted 17 August 2006 - 07:54 AM

Actualization issue:

If I change the value of a checkbox and run the actual script by right click, the script runs with the old checkbox value.

Peter

#12 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 17 August 2006 - 09:02 AM

Actualization issue:

If I change the value of a checkbox and run the actual script by right click, the script runs with the old checkbox value.

Peter



I think this might be solved saving the interface back to the script and then running it..

Thanks for reporting! :P

#13 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 17 August 2006 - 09:48 AM

I think this might be solved saving the interface back to the script and then running it..

Thanks for reporting! :P



i beg to differ. The word should be "worked around", not "solved" :P

#14 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 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 17 August 2006 - 10:35 AM

Well.. it wasn't a workaround, the problem was that I was adding a call to the procedure that saved the interface back to script only on the RUN button.

Instead of adding more code, I've removed the line from the RUN button and placed the call on the procedure that will actually process all type of script running - single or only selected (from the right-click menu) and all (from run button) - this way everytime any type of RUN is called, the interface gets saved.

This was easy to figure..

The actual problem for me at this moment is the TLabel component, wich seems to disappear under certain conditions.

Using a TStaticText as direct replacement it will work fine and nothing disapears, but TLabel insists on disappearing whenever I use a filebox component or buttons inside the script (there might be other conditions where this is replicated), also tried to disable transparency, doublebuffering, controlStyle, parent color/font with no good results..

Refreshing and/or Repainting the parent control (TScrollBox) didn't worked either - I've also tried on both filebox and button components..

This should also likely get solved on next release.. :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users