Qvintus Posted March 7, 2010 Share Posted March 7, 2010 Hello I have been looking around for a function, that could search insite the flash, but I can't seem to finde such function. Am I missing something?. No I'm not makeing a bot, I just want to make a script to check if "This flash object" is there it returns true. Do I have to use the PixelSearch function? Link to comment Share on other sites More sharing options...
Qvintus Posted March 15, 2010 Author Share Posted March 15, 2010 I've triet to do this While 1 $flash = ObjCreate("ShockwaveFlash.ShockwaveFlash") $btn = $flash.GetVariable(okButton.visible = True) If IsArray($btn) = True Then MsgBox(1,"Alert", "Btn is on") WEnd But it doesn't seem like it works this way ^^ any one knows how to make this work? Link to comment Share on other sites More sharing options...
cageman Posted May 4, 2010 Share Posted May 4, 2010 (edited) #include <GUIConstants.au3> Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICreate ("Flash", 820, 700, -1, -1) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580) With $oRP .bgcolor = "#ffffff" .Movie = 'flashmovie.swf' .ScaleMode = 2 .Loop = False .wmode = "Opaque" .FlashVars = "" EndWith GUISetState () this is how you can create a flashobject in a gui, maybe that helps. like explained below.. best you can do is try to find the link to the swf and load it like i showed. Then you can get some variable values out of it. Edited May 4, 2010 by cageman Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 4, 2010 Share Posted May 4, 2010 Flash does not expose its internal objects to the host. Link to comment Share on other sites More sharing options...
Weasly Posted May 29, 2010 Share Posted May 29, 2010 (edited) I had the the same issue that failed to create embedded flash player object.I tried to register flash10e.ocx then anything was fine.Hope it's useful for you. 1. Press 'Win' key + 'R' to show run box 2. Execute "regsver32 C:\Windows\System32\Macromed\Flash\flash10e.ocx" 3. Run your AutoIt script again. Edited May 29, 2010 by Weasly Link to comment Share on other sites More sharing options...
Plummet Posted June 25, 2010 Share Posted June 25, 2010 (edited) I would like to know if there's a way to detect a flash objects screen coordinates (top left, etc), knowing that a flash object is on the screen. Is it possible? Edited June 25, 2010 by Plummet Link to comment Share on other sites More sharing options...
Plummet Posted June 25, 2010 Share Posted June 25, 2010 (edited) P.S.: Using pixel/checksum finding to detect the left top corner is not the best soulution since different flash applications require different autoit code and a particular application can change its desing including colors. So the task is pretty important for automating flash applications. Edited June 25, 2010 by Plummet Link to comment Share on other sites More sharing options...
DaleHohm Posted June 25, 2010 Share Posted June 25, 2010 You should be able to use _IETagnameGetCollection($oIE, "object", zero-based-index) and then _IEPropertyGet() to get the screen or client coodinates of the upper-left-corner of the object an then the width and height. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Plummet Posted June 26, 2010 Share Posted June 26, 2010 You should be able to use _IETagnameGetCollection($oIE, "object", zero-based-index) and then _IEPropertyGet() to get the screen or client coodinates of the upper-left-corner of the object an then the width and height.Oh, thanks for the IE solution, Dale! But is there a multibrowser solution?AutoItWindowInfo tool shows the controls coordinates/size properties if it's positioned on a flash object. So if I can get the control by knowing one point on the screen that's within it, it could be useful.Anyway, in this method the coordinates can mismatch with the actual screen coordinates: if I have 2 pixels of my hidden OS toolbar on the left corner, the controls coordinates are 2 pixels less than they are on the screen (the toolbar line increases actual coordinates). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now