Jump to content

Need help interacting w/embedded IE


Recommended Posts

I am trying to automate stuff in Rhapsody but like most music apps, iTunes, WindowsMediaPlayer they've got the Music Stores. AutoIt doesn't like these too well.

WinSpy shows these as Internet Explorer_Server class.

I've tried digging through the forums and have played around with beta and the com objects. But everything I've read so far have been about stand alone Internet Explorer.

I am a noob to com and have been toying w/AutoIt for a few days now. Can a pro point me to some example code or give some search phrase to continue my search. How do you automate a web page that is inside an application?

Thanks,

Gnomy

Link to comment
Share on other sites

You could try this... to make an automation program

http://www.autoitscript.com/forum/index.php?showtopic=13024#

***** or.. to make your own

Use AU3info ( This maybe the WinSpy you referred to)

*** then use (from Help)

ControlCommand

--------------------------------------------------------------------------------

Sends a command to a control.

ControlCommand ( "title", "text", controlID, "command", "option" )

*** or one of the related controls on this help page

good luck

8)

NEWHeader1.png

Link to comment
Share on other sites

You could try this... to make an automation program

http://www.autoitscript.com/forum/index.php?showtopic=13024#

***** or..  to make your own

Use AU3info ( This maybe the WinSpy you referred to)

*** then use (from Help)

ControlCommand

--------------------------------------------------------------------------------

Sends a command to a control.

ControlCommand ( "title", "text", controlID, "command", "option" )

*** or one of the related controls on this help page

good luck

8)

<{POST_SNAPBACK}>

The problem with ControlCommand is that it requires a ControlID.

The AutoIt Active WindowInfo reports no ID but offers a class name.

Is there another control where I can pass the classname or Handle

for situations like this?

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Rhapsody

Class: TEST_WIN32WND

Size: X: 18 Y: 58 W: 987 H: 766

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 546 Y: 479

Cursor ID: 0

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xDEE7F0 Dec: 14608368

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 434 Y: 256 W: 539 H: 463

Control ID:

ClassNameNN: MFCReportCtrl5

Text: searchresults.external

Style: 0x5210282A

ExStyle: 0x00000000

(Control is hidden)

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

Link to comment
Share on other sites

I've been trying a number of stuff Namely

AutoItSetOption("WinTitleMatchMode", 4)

WinActivate ( "Rhapsody")
;$var = ControlFocus("Rhapsody", "", "ClassNameNN=TEST_WIN32WND55")
;$var=ControlCommand("Rhapsody", "", "ClassName=TEST_WIN32WND55", "IsEnabled", "")
;$var = ControlFocus("Rhapsody", "", "ClassNameNN=TEST_WIN32WND85")
;$var = ControlClick("ClassNameNN=TEST_WIN32WND85")
;$var = ControlClick('ClassNameNN=TEST_WIN32WND85', "")
$var = ControlClick("Rhapsody", "", "ClassNameNN=TEST_WIN32WND85")

MsgBox(0, "Control Focus", $var)
;Returns 0 :(

;ControlCommand("Rhapsody", "", "ClassName=TEST_WIN32WND55", "EditPaste", 'Sum 41')

The problem is that I am unable to click on controls based on the ClassNameNN.

Am I doing this right? I tried looking in the help and forums. The help only infers that ClassNameNN can be used to identify a window. But there's nothing for it in controls. I want to be able to ControlFocus, ControlClick, Send and all the normal stuff.

But using the ClassName as an ID isn't working for me :)

BTW Thanks for your help it's much appreciated.

Link to comment
Share on other sites

heres an example that clicks... (not mine)

sorry i dont know who the author is

Run('control inetcpl.cpl')

WinWait('Internet Properties')

ControlClick('Internet Properties', '', 'Button6')

WinWait('Delete Cookies')

ControlClick('Delete Cookies', '', 'Button1')

If Not WinWaitActive('Internet Properties') Then WinActivate('Internet Properties')

ControlClick('Internet Properties', '', 'Button7')

WinWait('Delete Files')

ControlClick('Delete Files', '', 'Button2')

If Not WinWaitActive('Internet Properties') Then WinActivate('Internet Properties')

ControlClick('Internet Properties', '', 'Button10')

WinWait('Internet Options')

ControlClick('Internet Options', '', 'Button1')

WinWait('Internet Properties')

ControlClick('Internet Properties', '', 'Button15')

hope it helps

8)

NEWHeader1.png

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