Tony,
Here is the code I use to get the command line parameters.
SET VAR vCompiled TEXT = NULL
GETPROPERTY Application ISCOMPILED vCompiled
IF vCompiled = 'YES' THEN
SET VAR vCommandLine TEXT
IF (CHKFUNC('GetCommandLineA')) = 0 THEN
STDCALL FUNCTION 'GetCommandLineA' ALIAS 'GetCommandLine' () : TEXT
ENDIF
SET VAR vCommandLine = (DLCALL('Kernel32', 'GetCommandLineA'))
--Remove double quotes from string
SET VAR vCommandLine = (SRPL(.vCommandLine,'"','',0))
--Remove exe name from string
SET VAR vPos INTEGER = (SLOC(.vCommandLine,'.exe'))
SET VAR vParms = (SGET(.vCommandLine,SLEN(.vCommandLine),(.vPos+4)))
SET VAR vParms = (TRIM(.vParms))
--parse out parameters as needed
ENDIF
Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of Tony IJntema
Sent: Saturday, November 16, 2013 9:57 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - passing a variable when compiled application is started
Hi,
A long time ago, using the first compiler of R:base, I was able to pass a
variable when I started a compiled application
Something like this:
Testapp.exe testvariable
The value 'testvariable' was stored in a variable and could be used in the
program.
I cannot find anything in the help files.
A similar command is described in the run-command, but I don't see how I can
use this in a compiled environment
Tony
--- RBASE-L
=======================3D=======================3
D=
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
=======================3D=======================3
D=
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
=======================3D=======================3
D=
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
=======================3D=======================3
D=
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
=======================3D=======================3
D=