AutoHotkey Community

It is currently May 27th, 2012, 12:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: December 26th, 2009, 5:36 am 
Offline

Joined: November 21st, 2006, 9:00 pm
Posts: 210
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 26th, 2009, 6:34 am 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
Is the window standalone flash movie or embedded in a webpage?

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 26th, 2009, 8:42 am 
Offline

Joined: November 21st, 2006, 9:00 pm
Posts: 210
It's a standalone window flash game (sorry, forgot to mention that)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 26th, 2009, 4:59 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
Ok now that we've figured that out you should probably figure out if its a swf or a projector (I know tedious :roll:, 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.

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 26th, 2009, 7:45 pm 
Offline

Joined: November 21st, 2006, 9:00 pm
Posts: 210
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 27th, 2009, 2:46 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
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

Image
The script hides the flash control/movie
Image
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.

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 4:18 am 
Offline

Joined: November 21st, 2006, 9:00 pm
Posts: 210
Ok, Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 12:10 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
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 :lol:

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.

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot], Google Feedfetcher, WillTroll, XstatyK and 25 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group