Jump to content

Posible to make AutoIt Search for Flash objects?


Qvintus
 Share

Recommended Posts

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

  • 2 weeks later...

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

  • 1 month later...

#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 by cageman
Link to comment
Share on other sites

  • 4 weeks later...

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. :mellow:

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 by Weasly
Link to comment
Share on other sites

  • 4 weeks later...

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 by Plummet
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...