Sign in to follow this  
Followers 0
john_qa

Set cursor icon

4 posts in this topic

I want to set the cursor icon, for an Internet Explorer page, but it seems like it is imposible.

Can you help me with this?

Here is the code I used:

$oIE=ObjCreate("InternetExplorer.Application.1")
With $oIE
    .Visible=1
    .Top = (@DesktopHeight-400)/2
    .Height=400     ; Make it a bit smaller than our GUI.
    .Width=600
    .Silent=1         ; Don't show IE's dialog boxes
    $IEWnd=HWnd(.hWnd) ; Remember the Window, in case user decides to close it
EndWith

$sUrl = "http://www.google.com"
$oIE.Navigate( $sUrl ) 
            ; Set up an event sink so that we can trigger on page loads
                $oEvent = ObjEvent($oIE.document.parentWindow, "IE_Evt_")
            ; The inital page load is already done... refresh so that event fires
                _IEAction($oIE, "refresh")
GUISetCursor ( 0,1, $IEWnd)

Don't be afraid of tomorrow, because today is the day you were afraid yesterday.

Share this post


Link to post
Share on other sites



GUISetCursor is for GUIs that AutoIt creates, not other windows. But with IE, you are in luck!

#include <ie.au3>
$oIE=_IECreate("about:blank")
With $oIE
    .Visible=1
    .Top = (@DesktopHeight-400)/2
    .Height=400        ; Make it a bit smaller than our GUI.
    .Width=600
    .Silent=1          ; Don't show IE's dialog boxes
    $IEWnd=HWnd(.hWnd) ; Remember the Window, in case user decides to close it
EndWith

$sUrl = "http://www.google.com"
_IENavigate($oIE, $sUrl )


$oIE.document.body.style.cursor="crosshair";


[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites

Thanks a lot. it's exactly what i wanted.


Don't be afraid of tomorrow, because today is the day you were afraid yesterday.

Share this post


Link to post
Share on other sites

Hm... I can't set cursor for all windows? I work about color picker, and wont to set the cursor cross (3) for all windows.

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  
Followers 0