Count windows in Firefox

I am trying to create a script that either counts the visible windows in Fireworks or it checks to see if a modal window is open. I can’t seem to get either to work. Here is what I have:


	
set allWindows to the count (the windows of application "Adobe Fireworks CS4" where modal is true)
	


	
set allWindows to the count (the windows of application "Adobe Fireworks CS4" where visible is true)
	

It returns and error Adobe Fireworks CS4 got an error: Can’t get every window whose modal = true.

If I remove the modal properties it works. Fireworks doesn’t seem to want to take any properties for the window class

Also, as a side note, Frireworks returns 46 windows when I don’t specify a property of visible or model. It seems as every open, visible window is 3 windows. So I could figure it out that way but that just seems ridiculous.

Any help would be appreciated.

Thanks
Jesse

Model: Mac Pro
AppleScript: 2.1.2
Browser: Safari 533.16
Operating System: Mac OS X (10.6)