MIAMEX 103: Get / Set cmd line flags

Updated October 2020

xcall MIAMEX, MX_CLFLAGS, opcode, clflags1 {,clflags2}

MX_CLFLAGS allows you to determine which command line switches were specified when A-Shell was launched, and to effectively set the flags that are associated with these switches.

Parameters

opcode  (Num)  [in]

0 to query the current command line flags or 1 to set them.

clflags1  (Num)  [in/out]

will either return the current command line flags (if opcode is 0) or supply the new switch settings (if opcode is 1). The flags and corresponding switches are listed in the following tables. Omitted values have been reserved for internal use and are of no interest to applications. Switches that make no sense to set at runtime (i.e. most of them) are marked "RO" for "read only". Note that there are two sets of flags (clflags1, clflags2) because there were too many to fit in one set.

Symbol

Value

Switch

Meaning

CLF_VER

&h00000001

-v

Display version on A-Shell startup. (RO)

CLF_EXIT

&h00000002

-e

Force A-Shell to exit when current command or command file is complete.

CLF_DEV

&h00000008

-d

Display A-Shell console device name on startup. (RO)

CLF_INI

&h00000010

-i

Specify miame.ini name.

CLF_NOHANG

&h00000100

-h

Ignore hangup signal.

CLF_PSHELL

&h00000200

-p

Running under PolyShell. (RO)

CLF_HANGDELAY

&h00000400

-hd

Delay processing of hangup signal.

CLF_HANGPARENT

&h00000800

-hp

Send hangup signal to parent on exit.

CLF_QUIET

&h00001000

-q

Quiet mode. (RO)

CLF_SUBMIT

&h00002000

-t

Simulate slave task mode. (RO)

CLF_SETTINGS

&h00004000

-o

Specific windows settings file specified. (RO)

CLF_CHILD

&h00008000

-2

Child session. (RO)

CLF_NOPSH

&h00010000

-1

Disallow use of PolyShell job switching. (RO)

CLF_HIDE

&h00020000

-z

Hide window. (RO)

CLF_SNAPSHOTS

&h00040000

-ba

Append auto-snaphots to specified buffer. (RO)

CLF_MAXFOCUS

&h00080000

-m

Force maximized window. (RO)

CLF_NOX

&h00100000

-mx

Remove "X" and system menu. (RO)

CLF_CGI

&h00200000

-cgi

CGI mode. (RO)

CLF_ATS

&h00800000

-awts

ATS (A-Shell Telnet Server) mode. (RO)

CLF_HEI

&h01000000

-hei

Generate error 250 immediately on hangup.

CLF_HETCKI

&h02000000

-hetcki

Treat tcki like kbd wait after hangup

CLF_LITE

&h04000000

-lite

AshLite mode. (RO)

CLF_MIN

&h10000000

-min

Start minimized. (RO)

CLF_SYSTRAY

&h20000000

-tray

Like –z but with icon in system tray. (RO)

CLF_ATE

&h40000000

-ate or -atecfg

Used internally by TELNET and ATE to signify ATE mode.

CLF_NOMENU

&h80000000

-nm

No menus (menu bar hidden).

Definition file: ashell.def

Hex-Decimal Values

 

clflags2  (Num)  [in/out]

(see notes for clflags1)

Symbol

Value

Switch

Meaning

CLF2_PREVIEW

&h00000001

 

preview mode (RO)

CLF2_NOCAPTION

&h00000002

-nc

no main window caption (RO)

CLF2_NORESIZE

&h00000004

-nrs

no resizing border (RO)

CLF2_CGIP

&h00000008

-cgip

persistent cgi (RO)

CLF2_CGIFAST

&h00000010

-cgifast

(FastCGI) (RO)

CLF2_UA

&h00000020

-ua

(unattended) (RO)

CLF2_SILO

&h00000040

-silo

(docker container mode) (RO)

CLF2_NTTS

&h00000080

-ntts

Force OPTIONS=NTTS on  (RO)

CLF2_DPM

&h00000100

-dpm

DPI hi-res awareness mode (RO)

CLF2_ZATE

&h00000200

-zate

(ATE) Hide ATE main window after connect  (RO)

Definition file: ashell.def

Hex-Decimal Values

 

Comments

Note that when setting the command line flags, you have to set them all at once. To set just one, first retrieve the current flags and then OR in the flag you want to set, and then use opcode 1 to set the entire collection of flags. Note that when updating the flags (opcode 1), if the clflags2 parameter is not specified, those flags are left untouched.

Refer to the documentation on the Command Line Switches for more information about what these switches do.

History

2020 March, A-Shell 6.5.1677  Add -zate switch

2019 September, A-Shell 6.5.1666  Add -dpm switch

2018 June, A-Shell 6.5.1639  Add -ntts switch