At 02:53 AM 11/19/2013, Tony IJntema wrote:

I must admit I did not have a look into the getproperty module of R:Docs.
The example is great.

Tony,

More examples of GETPROPERTY commands specific to APPLICATION are defined
under GETPROPERTY section of R:Docs 9.5.

Here's how ...

R:Docs 9.5 | GETPROPERTY Command ...

Category: Application
Control: Application Properties
Property: at least 32 options ...

Have fun!

Very Best R:egards,

Razzak


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: maandag 18 november 2013 16:50
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: passing a variable when compiled
applicationisstarted

Super,  Razzak,

I had forgotten about that enhancement, since my code was written before it
was available.
I'll put  a note in my code to that effect so I don't make this mistake
again!

Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Monday, November 18, 2013 9:18 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: passing a variable when compiled applicationis
started

At 10:56 AM 11/16/2013, Tony IJntema wrote:

>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,

The ability to pass parameters to any R:BASE instance, Runtime, and compiled
application is possible using the "STARTUPPARAMSTRnnn" and
"StartupParamCount" parameters of the GETPROPERTY command.

STARTUPPARAMSTRnnn - Returns the startup parameter value by the number
specified, where "NNNN" in StartupParamStrNNNN is the a number from
0 to STARTUPPARAMCOUNT.

Notes:

. This parameter is used with STARTUPPARAMCOUNT

. If NNNN = 0 (GETPROPERTY APPLICATION StartupParamStr0 VarName),
   then VarName will always contain the executable name with path

. If NNNN > STARTUPPARAMCOUNT then VarName will contain the text:
   "-ERROR-"

-- Example to Display Parameters:

Desktop Shortcut Target contains:
   C:\RBTI\CompApp_ABC.EXE "-v" "-boss"

CLEAR VAR vCount,vParamStr0,vParamStr1,vParamStr2
GETPROPERTY Application StartupParamCount vCount GETPROPERTY Application
StartupParamStr0 vParamStr0 GETPROPERTY Application StartupParamStr1
vParamStr1 GETPROPERTY Application StartupParamStr2 vParamStr2

SET VAR vMessage TEXT = NULL
SET VAR vMessage = +
('EXE NAME:' & .vParamStr0 + (CHAR(13)) ++
  'PARAM 1 :' & .vParamStr1 + (CHAR(13)) ++
  'PARAM 2 :' & .vParamStr2 + (CHAR(13))) CLS PAUSE 2 USING .vMessage
CAPTION 'Results' ICON INFO + BUTTON 'Press any key to continue ...' +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR NAVY +
|MESSAGE_FONT_SIZE 11 +
|THEMENAME Longhorn
RETURN

StartupParamCount - Returns the startup parameter count for the executable.

Notes:

. This parameter is used with STARTUPPARAMSTRnnn

Example:

GETPROPERTY Application StartupParamCount vParamCount

The above examples and many other parameters are available within the
"Application" Category of R:Docs 9.5!

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase
--
30+ years of continuous innovation!
15 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--


Reply via email to