Hello,
Started working with learning the scripting interface as I am having other issues with HollyHock that is preventing me from moving further.
I was curious if the scripts were working properly in HollyHock (Noticed Wiki Disclaimer) or if I was not doing something right in the following basic script:
Summary: Creating an output to feed a text field, set a string and the output to 'Empty'
--------------------------------------------------------------------------------------------------------------------------------------------
//////////////////////////////////////////////////////
// Script example
//
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// Paramters declaration
//////////////////////////////////////////////////////
var output: Tparameter;
var dataread: String;
//////////////////////////////////////////////////////
// initialisation procedure
//////////////////////////////////////////////////////
procedure init;
begin
output := CreateParam('output',ptTextField );
SetIsInput(output,false);
end;
// Global Variables
//////////////////////////////////////////////////////
// Main Loop procedure
//////////////////////////////////////////////////////
Procedure Process;
begin
SetStringValue(dataread, 'Empty');
setvalue(output,dataread);
end;
----------------------------------------------------------------------------------------------------------
I then tie a text field to the output, however I cannot get the output of the script to push 'Empty' to the text field.
Any advice?
-S
[Scripting] HollyHock 1.01.007d
Hi, SetValue is for numbers, while SetStringValue is for strings...
This example works:
This example works:
Code: Select all
begin
dataread := 'Empty';
SetStringValue(output,dataread);
end;Bjørn S
Thanks a ton bsork!
I finally got to verify and now back on track, much appreciated!
-S
I finally got to verify and now back on track, much appreciated!
-S
"Every act of creation is first an act of destruction." -Picasso
Who is online
Users browsing this forum: No registered users and 17 guests
