4-5 Macros
4-20
4-5-2 Details of the Functions
This section describes details of standard functions used in macro programming.
EXEC Application Startup
Applicable versions System Version 6.6 or higher
Format EXEC(S1,S2,S3)
Function
Executes the command specified with S1 and displays at S2 window title
and in S3 window style.
S1: Specify a startup file and a startup argument with S1.
(Separate a startup file and a startup argument with a space)
Note: Set Unicode when using variables to specify text strings for S1 and
S2. Up to 255 characters can be specified for S1 or S2. The
argument depends on the application that is being started. Refer to
the manual for the application that is being started for details.
S2: Window title after a startup (“ ” displays the default title at startup)
Note: If the application being started specifies a window title. the window
title specified for S2 will be ignored.
S3: Windows size at startup (0=normal, 1=Minimize, 2=Maximize,
3=Hide)
Note: Use Unicode if you use symbols to specify strings with S1 and S2.
If the application to be started specifies a window title, the window
title specified with S2 will be disabled.
Return Value 0: Completed normally
-1: Startup failed
EXEC("CMD.EXE","ABC", 2);
'Execute CMD.EXE and maximize a window titled ABC.
Example
EXEC("C:\Program Files\Microsoft Office\Office10\EXCEL.EXE
C:\NSR\NScomp.xls","",0);
‘Open the Nscomp.xls file with Excel and display it in a window of the
normal size.
STRCAT(W) String Concatenation
Applicable versions System Version 6.6 or higher
Format
STRCAT(D, S) --- ASCII code
STRCATW(D, S) --- Unicode
Function Connects the string S to the string D.
Return Value None
Example
STRCPY($W0, "ABC"); 'Set ABC to $W0 to $W1.
STRCPY($W10, "DEF"); 'Set DEF to $W10 to $W11.
STRCAT($W0, $W10); 'Set ABCDEF to $W0 to $W3.