Vidíte historickú verziu tejto stránky. Pozrite si aktuálnu verziu.

Porovnať s aktuálnou verziou Zobraziť históriu stránky

« Predchádzajúce Verzia 2 Ďalej »

%HI_ShellExecute function


Function
The function calls the function ShellExecuteEx Win32 API, which enables to open a file in default browser.
Declaration
%HI_ShellExecute(
   TEXT in sVerb,
   TEXT in sFile
 )
Parameters
sVerbRequired action.
sFileFile name.
Description
The action does not direct to the specific graphic object. Parameter sFile contains the file name over which the action is executed.

According to value of sVerb the action is as follows:

""Executes default action (open).
"openas"Opens dialog to select some program which will open the file.
"edit"Launches an editor and opens the document for editing. If sFile is not a document file, the function will fail.
"explore"Explores the folder specified by sFile.
"find"Initiates a search starting from the specified directory.
"open"Opens the file specified by the sFile parameter. The file can be an executable file, a document file, or a folder.
"print"Prints the document file specified by sFile. If sFile is not a document file, the function will fail.
"properties"Displays the file or folder's properties.

There can occur another actions. They specifically depend on file type.

Return value of the function matches with the return value of the function Win32 API GetLastError. If successful, the return value is 0 (zero), otherwise numeric error code.
Example
  ENTRY GO_OnClick
  INT _retCode
 ; Opens menu to select some browser of pdf documents

 _retCode := %HI_ShellExecute("openas", "d:\work\Hoard\asplos2000.pdf")
 ; Opens a default browser of pdf documents

 _retCode := %HI_ShellExecute("open", "d:\work\Hoard\asplos2000.pdf")
 END GO_OnClick 
  • Žiadne štítky