‘get every window’ and its variations don’t work for me either. I looked in the dictionary, and see the reference is by id. So
‘name of window 1’ works, and so on.
A simple list-building-repeat loop will return all open windows, and you could insert your conditions into it:
try
set counter to 1
set Winnames to {}--initiate the list
repeat
tell application "FileMaker Pro"
set thisWinname to name of window (counter as integer)--get the name of each window using increasing count
end tell
set Winnames to Winnames & thisWinname--build your list of window names
set counter to counter + 1--increase your counter to get next win name
end repeat
end try--terminates repeat loop when no more windows are found
return Winnames