Variable Set Decimal


The Variable Set Decimal command assigns a value to a decimal variable. This command provides three options for setting a decimal variable. Use the Modify Decimal Variables command to manipulate the original values assigned to a macro.



Note: A decimal variable can range from 5.0 x 10^ -324 to 1.7 x 10^308 with 15 to 16 significant digits. This first example is a decimal expanded to include 324 leading zeros followed by the number 5, represented as .000(321 more zeros)5. The second range extends to 17 followed by 308 zeros which would look like 1700000000(300 more zeros).0. The numbers are rounded to 15 or 16 significant digits.



Script Editor > Expand Variables Category > Variable Set Decimal



What method would you like to use?

Select from the drop down list the method required for defining the variable. Each of the options are described below.



Set Value Now

The Set Value Now option assigns a value to the decimal variable now for use later in the macro.


Destination Variable

Select a variable to use or create a new decimal variable.


Initial Value

Insert the contents of the variable in this field.



Prompt for Value

The Prompt for Value function opens an edit box during macro playback. The user is prompted to insert a decimal value.


Destination Variable

Select a variable to use or create a new decimal variable.



Optionally enter text in the Prompt edit field to explain the type of value the user should input. During macro playback, the instructions appear above the input field.


Mask the Input

The Mask the Input option masks the text entered into the input box and is viewed as *** instead of the actual digits.


The dialog should always be on top

This option makes sure that the prompt window is always on top of other open windows.


Positioning the Prompt window

Use this feature to define the position on the screen where the input box will appear during the playback of the macro. Insert exact coordinates or use the Set Position button to set where the window should appear. See the Window Positioning topic for additional information.



Hint: Setting a Default Value in the Prompt Window


First use the Set Value Now option. Insert the decimal value that you want set as the default. Then use the Prompt for Value option. Both options must reference the same variable, such as D[1]. When the macro is run, the prompt window displays the default value. The user can overwrite, amend, accept or append to this value.


Below is a sample of the commands as they would look in the Scripting Editor. The decimal .52 is the default value.


Variable Set Decimal %D[1]% to .52

Variable Set Decimal %D[1]% from Prompt



Set Value from Clipboard

Set Value from Clipboard examines the text contents of the clipboard. It takes this value and strips off any spaces, carriage returns or line feeds. It then attempts to convert the contents to a decimal value and place it in the variable. If a non-decimal value (i.e. a string of text) is in the clipboard or the text clipboard is empty, the variable value is set to zero.


Destination Variable

Select a variable to use or create a new decimal variable.