john_qa Posted November 7, 2006 Share Posted November 7, 2006 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. Link to comment Share on other sites More sharing options...
lod3n Posted November 7, 2006 Share Posted November 7, 2006 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] Link to comment Share on other sites More sharing options...
john_qa Posted November 8, 2006 Author Share Posted November 8, 2006 Thanks a lot. it's exactly what i wanted. Don't be afraid of tomorrow, because today is the day you were afraid yesterday. Link to comment Share on other sites More sharing options...
littleclown Posted December 9, 2006 Share Posted December 9, 2006 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. 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