AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IfWinExists Shockwave Flash Child Window

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ecksphore



Joined: 21 Nov 2006
Posts: 191

PostPosted: Sat Dec 26, 2009 4:36 am    Post subject: IfWinExists Shockwave Flash Child Window Reply with quote

I'm trying to detect if a shockwave flash 'child window' exists with the name of "private". If so - close it.

The normal command (IfWinExists) does not detect it - anyone have a solution to this issue?
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Sat Dec 26, 2009 5:34 am    Post subject: Reply with quote

Is the window standalone flash movie or embedded in a webpage?
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
ecksphore



Joined: 21 Nov 2006
Posts: 191

PostPosted: Sat Dec 26, 2009 7:42 am    Post subject: Reply with quote

It's a standalone window flash game (sorry, forgot to mention that)
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Sat Dec 26, 2009 3:59 pm    Post subject: Reply with quote

Ok now that we've figured that out you should probably figure out if its a swf or a projector (I know tedious Rolling Eyes, but may be important later on). A projector is a sa flash exe.

Next, If it is a sa swf, the window title is always the player version (I think).
Under that premise, run this to determine the player version (while the window is open ofcourse).
Code:
Process, Exist, SAFlashPlayer.exe
   WinGetTitle, winTtl, % "ahk_pid " safpPid := ErrorLevel
   Msgbox, % Clipboard := winTtl
It will copy the version to the clipboard which you can paste back here.


On a side note, are you sure the movie is opening a child window?

afaict sa flash movies cannot use actionscript to open child windows unless they are embedded in html and use javascript commands. I could be wrong though as I only know actionscript up to flash 7.
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
ecksphore



Joined: 21 Nov 2006
Posts: 191

PostPosted: Sat Dec 26, 2009 6:45 pm    Post subject: Reply with quote

Quote:
afaict sa flash movies cannot use actionscript to open child windows unless they are embedded in html and use javascript commands



I'm sorry .. your absolutely right - this game is loaded and plays in a IE7 / FF browser window. It does not load any external SAFlashPlayer.exe to play the game.

Here is some extra information I've dug up :

ahk_class : IEFrame
ClassNN : MacromediaFlashPlayerActiveX1
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Sun Dec 27, 2009 1:46 pm    Post subject: Reply with quote

I was also able to find the flash control in IE.
For starters, this was able to hide it on XP SP2 ran virtually.
Code:
Control, Hide,, MacromediaFlashPlayerActiveX1, ahk_class IEFrame


The script hides the flash control/movie

If I 'select all' in IE I get that blue box otherwise its blank.

I havent tried this in FF yet, (dont have it the above virtual machine Wink).
I get the feeling that it may not work though as FF will probably present the flash control as a randomly numbered MozillaWindowClass[n].

Will try it out later and report back anyway.
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
ecksphore



Joined: 21 Nov 2006
Posts: 191

PostPosted: Tue Dec 29, 2009 3:18 am    Post subject: Reply with quote

Ok, Thanks!
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Tue Dec 29, 2009 11:10 am    Post subject: Reply with quote

Well it at least allows you to detect and close a flash control in an IE browser. Whether or not it will find the name 'private' is another question Laughing

You may be able to use a combination of ControlGet HWND then use that HWND with WinGetTitle to possibly see if you can find that particular title/name.

Oh and using the same method in FF is probably out of the question. The simplest workaround imo would be to use the OutputVarControl used in MouseGetPos.


Anyway, feel free to post if you have any problems.
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group