Cicode Programming Reference > Cicode Function Categories > Super Genie Functions Introduction > AssWin

AssWin

Associates up to eight variable tags with a Super Genie, and displays the Super Genie in a new window. This function has the same effect as calling the Ass() or AssTag() function eight times, and then calling the WinNewAt() function. The AssWin() function is a quick way of associating eight Super Genie variables and creating a new window - at the same time.

If you want to associate more than eight tags with the Super Genie you need to call the AssVarTags(), AssTag(), or Ass() function to create the associations before you call this function.

Syntax

AssWin(sPage, X, Y, Mode, sTag1, [sTag2..8] )

sPage:

The page name of the Super Genie. If you prefixed your Super Genie page name with an exclamation mark (!), remember to include it here.

X - The x pixel coordinate of the top left corner of the window.

Y - The y pixel coordinate of the top left corner of the window.

Mode:

The mode of the window:

0 - Normal page.

1 - Page child window. The window is closed when a new page is displayed, for example, when the PageDisplay() or PageGoto() function is called. The parent is the current active window.

2 - Window child window. The window is closed automatically when the parent window is freed with the WinFree() function. The parent is the current active window.

4 - No re-size. The window is displayed with thin borders and no maximize/minimize icons. The window cannot be re-sized.

8 - No icons. The window is displayed with thin borders and no maximize/minimize or system menu icons. The window cannot be re-sized.

16 - No caption. The window is displayed with thin borders, no caption, and no maximize/minimize or system menu icons. The window cannot be re-sized.

32 - Echo enabled. When enabled, keyboard echo, prompts, and error messages are displayed on the parent window. This mode should only be used with child windows (for example, Mode 1 and 2).

64 - Always on top.

128 - Open a unique window. This mode stops this window from being opened more then once.

256 - Display the entire window. This mode commands that no parts of the window will appear off the screen

512 - Open a unique Super Genie. This mode stops a Super Genie from being opened more than once (at the same time). However, the same Super Genie with different associations can be opened.

1024 - Disables dynamic resizing of the new window, overriding the setting of the [Page]DynamicSizing parameter.

You can select multiple modes by adding modes together (for example, set Mode to 9 to open a page child window without maximize, minimize, or system menu icons).

sTag1..8:

The first eight physical tags to be associated with the Super Genie. For any given Super Genie, the variable tags will replace the Super Genie substitution strings as follows:

Variable tag...

replaces substitution string...

sTag1

1

sTag2

2

sTag3

3

sTag4

4

sTag5

5

sTag6

6

sTag7

7

sTag8

8

Because there is a strict correlation between the variable tag numbers and the substitution string numbers, you need to know how your Super Genie substitutions are numbered. For example, if your Super Genie has three unique substitution strings, numbered 1, 3, & 4, you need to enter a blank ("") for sTag2.

The variable tags that you specify here need to be the same data type as that specified by the relevant Super Genie substitution strings. For example, only a digital tag could replace the substitution string ?DIGITAL 4?. If the substitution string does not specify a type (for example, ?5?), you can use any type except STRING.

The name of the tag can be prefixed by the name of the cluster for example, "ClusterName.Tag".

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

Ass, AssChain, AssMetadata, AssMetadataPage, AssMetadataPopup, AssMetadataWin, AssChainPage, AssChainPopUp, AssChainWin, AssChainWinFree, AssGetProperty, AssGetScale, AssInfo, AssInfoEx, AssPage, AssPopUp, AssScaleStr, AssTag, AssTitle, AssVarTags

Example

// Associate 3 tags with the Super Genie
// then display the new window at (100,200) in mode 9
AssWin("!MyGenie", 100, 200, 1 + 8, "PV123", "OP123", "SP123");

See Also

Super Genie Functions