Jump to content
Sign in to follow this  
civilcalc

Help with an embedded IE

Recommended Posts

civilcalc

hey guys,

I have an embedded IE within a gui and the script seems to pause until the mouse is not over the window, any ideas why this happens?

thanks in advance :-)

Share this post


Link to post
Share on other sites
civilcalc

#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
Opt("PixelCoordMode", 1)
Opt("GUIOnEventMode", 1)

Local $oIE = _IECreateEmbedded()
GUICreate("Embedded Web control Test", @DesktopWidth, @DesktopHeight, 0, 0,$WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 0, 0, 1200, @DesktopHeight-10)

Global $g_idError_Message = GUICtrlCreateLabel("", 100, 500, 500, 30)
GUICtrlSetColor(-1, 0xff0000)

$ticker = GUICtrlCreateLabel("ticker",1200,400,100,20)
$go = GUICtrlCreateButton("Go!",1310,130,30,20)
GUICtrlSetOnEvent(-1,"GO")

GUISetState(@SW_SHOW) ;Show GUI

_IENavigate($oIE, "http://www.bbc.co.uk")
;_IEAction($oIE, "stop")


While 1
    Sleep (100)
WEnd

Func GO()
    GUICtrlSetData($ticker,"clicking link")
    clicklink()
Endfunc

Func clicklink()
         MouseClick("left",IniRead("links.ini","news","news1x",0),IniRead("links.ini","news","linky",0),1,0)
Endfunc

Share this post


Link to post
Share on other sites
computergroove

Is this what it is supposed to look like?

YnuO5IQ.jpg

When I click go it moves the mouse to the upper left corner of my screen and that's it. Can you add the links.ini? I need to see it in action.

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites
civilcalc

ah not really, the site is different from the UK.

but basically, all the time the mouse is over the ie window, the script is paused

Share this post


Link to post
Share on other sites
computergroove

The script isnt doing anything because it does not have the ini file for it to call from. It stops doing anything after the mouse moves to the top left corner of the screen.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites
civilcalc

the mouse is only moving to the top left, because the defaut coords are 0,0 if the ini is not found. even with the ini file, the script is paused whilst the mouse is over the ie window, ive tried using blur and giving focus to something else, but you have to move the mouse away from the window for the script to continue

Share this post


Link to post
Share on other sites
computergroove

When I am in the script and I click GO then the mouse moves to 0,0. If I move the mouse over the embedded webpage window, the autoit icon in the taskbar doesn't change to paused. If I click on the white space in the webpage the script icon in the taskbar still does not change. I am running Windows 7 x64 as an administrator account.

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
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
Sign in to follow this  

×