Commands & Syntax > Commands > File Mainpulation >

OPEN - < fileopen >() ... [Free]

www.perfectkeyboard.com

 

File OPEN
<fileopen>("File",Window state)
Available in: Free edition

Opens file within the associated application.

 

#

Parameter name

Parameter description

1

File

Full path to the file to open (e.g., "c:\mydocuments\letter1.doc"). Can be a static text or variable containing text.

2

Window state

The state of the window:
0 - Normal
1 - Maximized
2 - Minimized

 

Example (Macro Steps):

 

1

<#> <#> This command opens file user selects

2

Macro execution: ONLY COMMANDS

3

Variable OPERATION "SELECT_FILE" (Variable for result = vFile, Input text/variable = , Parameter 1 = Select File, Parameter 2 = , Parameter 3 = 0)

4

IF STRING _vCanceled==1

5

Macro EXIT

6

ENDIF

7

File OPEN open file "vFile" in system default viewer.

Example (Plain Text):

 

<#> This command opens file user selects

<#>

<cmds>

<var_oper>(vFile,"",SELECT_FILE,"Select File","", "0")

<if_str>("_vCanceled==1") <exitmacro> <endif>

<fileopen>("vFile",0)