I’ve run into a small oddity. I open, say, 5 Script Editor windows and run the following script (by way of a keyboard shortcut):
tell application "Script Editor"
display dialog "Window count: " & (count windows)
close front window
end tell
Each time I run the script, one Script Editor window is closed but the window count remains at 5. If I do this with Safari rather than Script Editor, the script runs as expected and the window count is reduced by one each time the script is run. Anyone know why this happens? Thanks.
Thanks for the quick response. It’s good to know that I wasn’t missing something, and saves me some time. I’ve edited my original post and changed window to windows.