| View previous topic :: View next topic |
| Author |
Message |
ecksphore
Joined: 21 Nov 2006 Posts: 191
|
Posted: Sat Dec 26, 2009 4:36 am Post subject: IfWinExists Shockwave Flash Child Window |
|
|
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 |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
|
| Back to top |
|
 |
ecksphore
Joined: 21 Nov 2006 Posts: 191
|
Posted: Sat Dec 26, 2009 7:42 am Post subject: |
|
|
| It's a standalone window flash game (sorry, forgot to mention that) |
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
Posted: Sat Dec 26, 2009 3:59 pm Post subject: |
|
|
Ok now that we've figured that out you should probably figure out if its a swf or a projector (I know tedious , 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 |
|
 |
ecksphore
Joined: 21 Nov 2006 Posts: 191
|
Posted: Sat Dec 26, 2009 6:45 pm Post subject: |
|
|
| 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 |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
Posted: Sun Dec 27, 2009 1:46 pm Post subject: |
|
|
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 ).
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 |
|
 |
ecksphore
Joined: 21 Nov 2006 Posts: 191
|
Posted: Tue Dec 29, 2009 3:18 am Post subject: |
|
|
| Ok, Thanks! |
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
Posted: Tue Dec 29, 2009 11:10 am Post subject: |
|
|
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
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 |
|
 |
|