Script: Code
- Last UpdatedNov 07, 2024
- 2 minute read
Code Property Window
You can set the code of the script in the Code property window. To open this window, click the button for the "Code" property.
The following image shows the script Code property window:

The Code property window contains a text editor to enter the script code. You can do this either by entering a discrete value directly in the text editor. You can use the text tool bar in the text editor to manage and format the code.
The text tool bar contains the following options:
|
Options |
Shortcut Key |
Description |
|---|---|---|
|
Cut |
Ctrl+X |
Cut text |
|
Copy |
Ctrl+C |
Copy text |
|
Paste |
Ctrl+V |
Paste copied text |
|
Undo |
Ctrl+Z |
Undo the last action |
|
Redo |
Ctrl+Y |
Redo an action that you undid |
|
Repeat Last Command |
F4 |
Repeat the last command that was executed |
|
Bold |
Ctrl+B |
Make text bold |
|
Italic |
Ctrl+I |
Italicize text |
|
Underline |
Ctrl+U |
Underline text |
|
Font Name |
- |
Select the font for the parameter |
|
Size |
- |
Enter the font size |
|
Paragraph Style |
- |
Select a paragraph style |
|
Zoom |
- |
Zoom in and zoom out the view |
|
Foreground Color |
- |
Set text color |
|
Background Color |
- |
Set the background color |
|
|
- |
Print the text |
The Code property window also contains the following tabs:
-
Update: Use this tab to save the parameter.
-
Close: Use this tab to close this window.
Note:
- For variables with an Object data type, the data type value will be displayed as JsonElement.
- Since the BinaryFormatter has been removed for serialization and deserialization, use the following code to deserialize objects saved in variables:
IObjectSerializer jsonObjectSerializer = SerializerFactory.Create(ObjectSerializerMethodType.JSON);
MyCustomClass myCustomObject = (MyCustomClass)jsonObjectSerializer.DeserializeJSONIncludingFields<MyCustomClass>((JsonElement)MyWFVariable.Value);
This update reflects the change from BinaryFormatter to JSON serialization, ensuring compatibility with the new deserialization approach.