User Defined Variables

This feature provides the command-line code to set an existing variable, add a new variable, or get the value of a variable. You can use this code, from an external program, script, batch file, or command-line (command prompt in windows or terminal in Unix).  The command-line and working directory required to set the variable, will be automatically generated in the text fields.  You can use the "Copy to Clipboard" feature to copy these fields to clipboard for use in your scripts or programs.

A) Setting your own variables for the program (Automize, AbleFtp etc..) to recognize

From the command-line, via your batch files / scripts etc, first set the program install folder as the current directory
cd install_folder (i.e. cd ..\Automize or cd ..\AbleFtp etc..)

on windows, use:
jre\bin\java.exe -cp .;hitek7.jar com.hitek.engine.mods.var.UserVariable set variable_name variable_value

IMPORTANT: variable_name cannot include any spaces in it

on Unix/MacOSX, use:
java -cp .:hitek7.jar com.hitek.engine.mods.var.UserVariable set name value

where variable_name = variable name, and variable_value = variable value
 

B) Getting User variable values for use in your scripts or batch files
From the command-line, via your batch files / scripts etc,
first set the program install folder as the current directory
cd install_folder

on windows, use:
jre\bin\java.exe -cp .;hitek7.jar com.hitek.engine.mods.var.UserVariable get variable_name
jre\bin\java.exe -cp .;hitek7.jar com.hitek.engine.mods.var.UserVariable get variable_name c:\test\test.txt    (outputs the variable to the file test.txt)

IMPORTANT: variable_name cannot include any spaces in it

on Unix/MacOSX, use:
java -cp .:hitek7.jar com.hitek.engine.mods.var.UserVariable get variable_name
java -cp .:hitek7.jar com.hitek.engine.mods.var.UserVariable get variable_name /home/test.txt    (will output the variable to the file test.txt)

where variable_name = variable name, and variable_value = variable value

Return Value:

The variable value will be returned as a string value in the system output stream.   You should add code in your batch, script, or program, to read this value.

Also, if the variable is an integer, the exit code of the command above, is the integer value of the variable. 

If the variable is not an integer, the exit code of the command above = -1001.