Contents | Index | < Browse | Browse >
EXTRACT Variable ITEM ToVariable
This is a very usefull command. It will extract the given ITEM
from "Variable" and place it into "ToVariable". Note that
"Variable" and "ToVariable" can be the same variable.
* Extractions related to files :
------------------------------
Some of the ITEMs you can extract relate to files. "Variable"
must be a file (although Gui4Cli does not check if it actually
exists, so you could also give a dir or a non existant file).
Example: "Work:MyDir/MyPic.iff" - will extract:
ROOT => Work:
PATH => Work:MyDir
FILE => MyFile
EXT => .iff (the file extension with the dot)
FULLPATH
This requires that you give a file name and it will try
to locate the given file in your path and return the
full path and file name. If the file does not exist in
your path, "ToVariable" will contain nothing ("").
Example:
> MyProg = "DPaint"
> Extract MyProg FullPath MyProg
Now $MyProg should be the full path of DPaint or "".
* Extractions related to text strings :
-------------------------------------
These are various things that can be extracted from text strings.
Say you have a string: "This is my string "
CLEAN => This is my string (will also delete the trailing spaces)
UNQUOTE => This is my string (will not delete the trailing spaces)
UPPER => "THIS IS MY STRING"
LOWER => "this is my string"
* Other ITEMs that can be extracted :
-----------------------------------
GUIPATH must be given a GUI name as "Variable", and it will place
the full path (without the filename) of the GUI given,
into "ToVariable". This is useful for finding out in which
dir your gui is in, so you can load other guis, icons etc..
See also Paths
HEX Must be given a number in Variable and will convert it to
HEXadecimal notation.
OCT Same as above, but in OCTal notation.