<< Click to Display Table of Contents >> Navigation: 3. Script Language > Execute-Commands > Execution Commands |
MiniRobotLanguage (MRL)
EXF. Command
Execute File/Document
Intention
Starts a file or document like when you click on it with the mouse. EXF. will not only start executable files. It will also start any registered file, like a office-document or text-file. EXF. will also open folders.
EXF. will open hyperlinks and even download-links. This will both work as expected:
EXF.http://www.heise.de/
EXF.www.heise.de/
The document will be started somehow like if you have clicked on it with the mouse.
' Open a document
EXF.?desktop\MyActions.txt
' Open a system folder, like you click on a folder-icon
EXF.?ws\
Disadvantage from that system is, that it does NOT deliver #pid# or #tid#.
EXF. is technically similar to EXS. (Execute Shell). It will however be more fast. In result, EXF. is not able to return an error code if there was a problem, because it just doesn't wait for that.
If you plan to start a lot of executable files very fast, or if the executable that you start blocks the script when you use EXS., then EXF. is just what you need.
If you start a lot of executable files, EXS. is safe and slower, because it waits(/blocks the script-execution) until all internal system processes that start the file are running.
EXF. will just be very fast and start whatever you want as fast as your system can do.
EXF. unlike EXS. breaks through all API-limits (and can even crash a process if used careless). Try this example using EXS. or EXF. and see the difference.
KPN.iexplore.exe|a
FOR.$$CNT|1|20
EXF.iexplore|www.fa2.de
NEX.
STS.DUMP
MBX.Click to Close all IE's
KPN.iexplore.exe|a
ENR.
however if you want to open many TAB's in your browser, EXF. is just faster: Try this:
' Open your daily browser
EXF.http://dict.leo.org
EXF.http://www.facebook.com
EXF.http://www.heise.de/
EXF.www.fa2.de
ENR.
Syntax
EXF.P1[|P2][|P3][|P4]
Parameter Explanation
P1 - Executable or Document-Filename (can be a hyperlink)
P2 - (optional) Parameter for command-line
P3 - (optional) Path/Folder for command, if omitted current folder is used
P4 - (optional) Window Size Parameter, if omitted NORMAL is the default size
Parameter - (optional) Parameter/timeout
It will wait the given timeout that the window will be realized.
When you add +100 to the windowsize, then you tell them NOT to wait.
You can use the following window-size parameters
0 - HIDE - Hides the window and activates another window.
1 - SHOW NORMAL Activates and displays a window.
2 - SHOW MINIMIZED - Activates the window and displays it as a
minimized window.
3 - MAXIMIZE - Maximizes the specified window.
4 - SHOW-NO-ACTIVATE - Displays a window in its
most recent Size and position.
The active window remains active.
5 - SHOW - Activates the window and displays it
in its current size and position.
6 - MINIMIZE - Minimizes the specified window and
activates the next top-level window in the Z order.
7 - SHOW-MIN-NO-ACTIVE - Displays the window as
a minimized window. The active window remains active.
8 - SHOW-NO-ACTIVE - Displays the window in its current state.
The active window remains active.
9 - RESTORE - Activates and displays the window.
10 - SHOW-DEFAULT - Sets the SHOW STATE to default.
Example
'***********************************************
' Example 1 - without Windows-Parameter
'***********************************************
' Example1
DBM.2
EXS.?desktop\MR.txt|103
DMP.
END.
'***********************************************
' Example 2 - using Windows-Parameter
'***********************************************
' Example 2
DBM.2
' Variablen und Spezialordner können verwendet werden.
: §§FIL=?desktop\MyWord.doc
EXS.§§FIL|§§WIN
DMP.
END.
Remarks
Technical remark: EXF. uses multithreaded ShellExecute-Technology and is compatible with other commands that use this technology. EXF. can never be blocked by a process that it has started.
EXF. may work with some of these (depending on the OS):
EXF.system.ini
EXF.control
EXF.write
EXF.pbrush
EXF.winword
EXF.excel
' Start NetMeeting (XP)
EXF.conf
etc.
EXF. uses the default search path and will understand following shortcuts to these executables in the window-folder.
' Will open system control panel (XP, Win 7)
EXF.control
' Will open "Control Panel\All Control Panel Items\Administrative Tools"
' XP, Win7
EXF.control admintools
' WIll open the Clipboard Viewer
' XP only
EXF.clipbrd
' Systemconsole Prompt
' XP, Win7
EXF.CMD
' NotePad
' XP, Win7
EXF.notepad
' Windows Explorer
' XP, Win7
EXF.explorer
' XP, Win7
EXF.mspaint
' Open RegEdit
' XP, WIn7
EXF.regedit
' Windows Soundrecorder
' XP only
EXF.sndrec32
' Windows System Editor
' XP only
EXF.sysedit
You can use EXF. to open folders:
EXF.?ws\
EXF.?wi\
Limitations:
EXF. does deliver #pid# or #tid#. It also does not deliver an error-code in case something did not work.
EXF. may not work well as the last command in your script, because the script may end before the background processes were processed. Also some programs may get an overrun from the speed of EXF.
See also:
• EXR. - Executer-from-Registry
• EXO. - Execute Open Document