Arbortext Command Language > Functions by Alphabetical Listing > window_id
  
window_id
window_id ([class_or_index_or_title])
This function returns different values in the following situations:
If class_or_index_or_title is a number n, window_id returns the identifier of the nth subwindow in the main window associated with the current document. For example, if the current document is displayed in an edit class window, window_id(1) would return the identifier of the edit subwindow and window_id(2) would return the associated command subwindow identifier.
If class_or_index_or_title is one of the classes helpwin1 through helpwin4, or msgwin1 through msgwin4, window_id returns the window identifier of the corresponding predefined window, or -1 if it does not exist. window_id never returns a window of one of these classes created by window_create, only built-in windows.
If class_or_index_or_title is edit or cmd, window_id returns the identifier of the window of the specified class that last had focus. If the current document is associated with a window of one of these classes, window_id returns that window.
class_or_index_or_title may also be one of the following predefined modeless dialog class names:
Class
Dialog Box
bookmark
Bookmarks
detail
Collapse/Expand Divisions
fileent
File Entities
find
Find/Replace
findent
Find Text or File Entity
findms
Find Marked Section
findpi
Find Processing Instruction
findtag
Find Tag/Attribute
graphent
Graphic Entities
modattrs
Modify Attributes
msp
Marked Section Parameters
notation
Notations
pgsetuped
Page Setup Editor View
spell
Spelling
styler
Arbortext Styler
tag
Insert Markup
tagtmpl
Tag Templates
textent
Text Entities
class_or_index_or_title may also specify a string to match either the title of a window or the name of a document open in a window. For example, window_id("Document1") returns the window identifier of the window displaying the document named “Document1”. If the string does not match a document name, the string is matched against the titles of all open windows. For example, window_id(window_get(0,"title")) would return the id of the current window, the same as window_id(0).
Related Topics
doc_name function
window_class function
window_get function
window_list function