Home > Language Reference > System Functions > GetWindowsList

GetWindowsList

The GetWindowsList function returns the list of parent window names.

Syntax

ret = GetWindowsList(<tab_window>, <tab_instance>, <tab_handle>, <tab_status>)

Parameters

<tab_window>, array of strings, contains the list of top-level window names.

<tab_instance>, array of integers, contains the instance number of the top-level window names.

<tab_handle>, array of integers, contains the handles of the top-level window names.

<tab_status>, array of strings, two characters containing the status of the application or of the window. The first character is 1 if the status is "running", 0 if not. The second character is 1 if the application is enabled (it can receive actions), 0 if disabled.

Return value

ret, integer. If the function succeeds, the return value is the number of windows found. If the function fails, the return value is a negative nonzero value (see System Functions Error Codes).

See also

GetProcessList

Example

dim namewin$(210)
dim numinst(210)
dim handlewin(210)
dim winflag$(210)
'Create a txt file which receives the GetProcessList results
proc$="c:\wttest\namewin.txt"
create(proc$)

p=GetWindowsList(namewin$(),numinst(),handlewin(),winflag$())
'Write in the first record of namewin.txt file the number of windows found
write(proc$,str$(p),CRLF)

i=0
repeat
'The list is written to the file
write(proc$,namewin$(i)+","+str$(numinst(i))+","+str$(handlewin(i)) +"," +winflag$(i),CRLF)
i=i+1
until i=p

pause 1
' the list is displayed
shell("notepad "+proc$)