Screenshot created using this code in <OnGlobalPaneInit>

					(dbgOutput (cat "aScreen: " aScreen))
					(dbgOutput (cat "gScreen: " gScreen))
					(dbgOutput "scrGetScreen gScreen:")
					(dbgOutput (scrGetScreen gScreen))
					(dbgOutput " ")

Screens I visited in the example include dsShipInterior, dsShipConfig, dsCargoHold, dsRPGJettison, and dsRPGAbandonedStation (docked with a cargo crate).

Edit: I understand a little better now. There are three pieces of information needed to define the current screen: the UNID of the type that defines it, the name of the screen (if the type is not a DockScreen), and the pane.

In dockscreen events, aScreen is "hexUNID[/ScreenName]", aScreenUNID is the UNID as an integer, and aPane is the pane.

It seems like (@ (scrGetScreen screen) 'screen) is the screen name if applicable, and the integer UNID or blank otherwise. And (@ (scrGetScreen screen) 'pane) is the pane or blank.

Instead, the type UNID, screen name, and pane should each have their own field. The UNID and pane should always be filled, and the screen name should be nil if the type is a DockScreen.

Also, it would be nice if there were a variable set to the screen name in the events, so we wouldn't have to use (@ (split aScreen '/) 1) to get it.

scrGetScreen.PNG
scrGetScreen.PNG
relanat 10 Feb 2017:

Instead, the type UNID, screen name, and pane should each have their own field. The UNID and pane should always be filled, and the screen name should be nil if the type is a DockScreen.

I agree. This would make it a lot easier. ATM it is very confusing.

george moromisato 14 Nov 2018:

Fixed in 1.8 Beta 4.

(scrGetScreen ...) ->

{
type: The root UNID, either a <DockScreen> or some other type.
screenName: The screen name, if type is NOT a <DockScreen> (Nil otherwise).
pane: The current pane.
data: Current data.
}

[Other fields still there for backwards compatibility.]

<OnGlobalPaneInit> ->

aType: The root UNID
aScreenName: The screen name, if type is NOT a <DockScreen>
aPane: The current pane
gData: Current data

[Other fields still defined for backwards compatibility.]
0xabcdef 14 Nov 2018:

Fun fact: I've long been aware of the purpose of aScreen because long ago I found a single reference to a station-bound screen buried in some Benedict Story Arc code.