Specials are functions that are processed by Kommander. You should be aware that until Kommander has a full parser all Kommander specials will be executed first and then the script will be executed. In most cases this is not a problem, but in a few it is.
Make a DCOP call. @dcop(“kmail”, “KMailIface”, “checkMail()”, “”)
The DCOP id of the process. (kmdr-executor-@pid)
Launches the specified Kommander dialog. Dialog is sought in dialog directory and in current directory - in that order. This prepends the call to the executor and sets the default directory to the one the Kommander application is in. Parameters can be passed in the usual Unix way or you can pass named parameters like “variable=value”. You can then find passed parameters in the global pool. @global(variable) would return “value”.
Expands to the specified environment variable. @env(PWD) expands to $PWD. Remember that “$” is part of the shell and shouldn't be used.
returns the output of executing the specified command. @exec(ls -l).
@execBegin ... @execEnd
@exec, but supports shebang and multiline scripts. This serves for various scripting languages either by declaring them or using a shebang.
The first one uses the name of the PHP executable. Kommander searches PATH for php and if it is not found looks to see if it is registered with Kommander in a location outside of your path. If not it tells the user it cannot be found. The second examples uses the classic “shebang” which can have some benefits and also problems. If you have a beta copy of PHP5, for instance, in
/usr/local/binwhich would not be found because it would find on in
/usr/binthis is useful. If, however, you distribute the dialog to someone who has PHP in
/usr/local/binonly it will not be found with the shebang used. So using shebangs is cautioned and using the executable is recommended if you are sharing files.
expands to the value of the specified global variable.
Returns null. Now that Kommander checks for empty widgetText on execution this will prevent erroneous errors in the case of an unset state on a widget.
The PID of the parent process.
The PID of the process.
reads a value from
the selected content in a widget that can show more than one value, like list widgets
Sets the global variable to the specified value.
the content of a widget
write value to
Returns an EOL-separated list of all values in the array. Can be used to walk through an array.
Returns an EOL-separated list of all keys in the array.
Sets a key and value for an element of an array. If no array exists it is created.
Remove all elements from the array.
Return number of elements in the array.
Return the value associated with the given key.
Remove element with the given key from the array.
Add all elements in the string to the array. String should have key\tvalue\n format."
"Return all elements in the array in key\tvalue\n format."
Return content of the given file.
Write given string to a file.
Append given string to the end of a file.
Return number of chars in the string.
Check if the string contains given substring.
Return position of a substring in the string, or -1 if it isn't found.
This will have an optional integer start position for find next uses in Alpha 6.
Return first n chars of the string.
Return last n chars of the string.
Return substring of the string, starting from given position.
Remove all occurences of a given substring.
Replace all occurences of a given substring with a given replacement.
Convert the string to uppercase.
Convert the string to lowercase.
Compare two strings. Return 0 if they are equal, -1 if the first one is lower, 1 if the first one is higher
Check if string is empty.
Check if string is a valid number.