I want to create a custom action one that does things that (from my limited perspective) is beyond the capiblitys of Final builders action types.
So I want to do this in a script however I am not sure if there is any way to get variable values and set them as well since a script runs (sorta) outside of final builder.
I would love to create a custom action in .NET (that would be even better) but I am have a hard time understand what needs to be done with action studio. It would be nice if there was a walk through example of a hello world custom .NET FB action.
If some one can help
Thanks
Davinci
Hi Davinci,
If you’re using FinalBuilder, look in the FinalBuilder program directory under ActionDefs\Examples\DOTNET\v2.0 (or 1.1)\CSharp you will find a solution which shows both a basic and an “executable” assembly package. These are both called from the FBDotNetExamples.fbap Action Studio package file.
Automise is currently missing these example packages, although I just added them for the next test build.
The Action Studio manual is available in PDF format (ActionStudioManual.pdf) in the Automise program directory, and covers creation of script, COM and .NET based custom actions. We’ll look into maybe doing a full walkthrough for the web site in future.
To get and set variable values from inside custom actions (including .NET custom actions), you can use Context.GetVariable(Name) and Context.SetVariable(Name, Value.)
Regards,
Angus
Thanks thats good information and I have read through it and understand what needs to be done.
BUT!
If you can tel me how I can acess FinalBuilder Variables in a VBscript that would be GREAT! I have read it is posible in the “Action List Parameters” index of the help file where it states…
"The scope of an action list parameter is confined to the actions within the Action List that defines the parameter. Action List Parameters can be modified from script in the same manner as FinalBuilder variables."
How can this be done what VB calls can I make to read and write values to a FB variable.
Thanks,
Davinci
I'm not sure if this is in FB's docs but if it does not exist already this information should be under the "Script Variables" heading...
set shell = createObject("WScript.Shell")
Set ProcessEnv = shell.Environment("process")
msgbox ProcessEnv("MyFinalBuilderVar")
ProcessEnv("MyFinalBuilderVar") = "test"
The above code will only work if you set the variable to be environment.
Hope this helps others.
Cheers
Davinci
Hi Davinci,
The code you wrote is not necessary. If you’re working from inside a script event in FinalBuilder (ie using the script editor in the IDE), you can just type
MyFinalBuilderVar = "test"
If you’re working inside an Action Studio action package (ie using the script editor in Action Studio), you can just use
Context.SetVariable “MyFinalBuilderVar”, "test"
Sorry, that latter information got somewhat hidden in my previous post.
Regards,
Angus