zaxxon Posted November 9, 2016 Share Posted November 9, 2016 Hello all, I have searched the web and the forum but didn't find an answer. I am new to AutoIt (using v3.3.14.2) and have a very basic questions: #Include <IE.au3> Local $oIE = _IECreate("someurl.org") ConsoleWrite(@CRLF & "oIE: " & $oIE & @CRLF & @CRLF) _IELoadWait($oIE) WinMove($oIE, "", 0, 0, 1000, 600) When I run it, it opens the IE, but when I check the console, the variable $oIE is empty. No object handle seems to be assigned to it. The following WinMove() doesn't work since there is no object to use. When I use additionaly _IEPropertyGet() to explicit get the handle and write it to a variable and write it to the console, it works. I can see the hex handle. What am I doing wrong? Thanks in forward! Link to comment Share on other sites More sharing options...
zaxxon Posted November 9, 2016 Author Share Posted November 9, 2016 So far I found out that an object has been assigned to $oIE when I use a _IENavigate() just after the _IECreate(). Seems my error is, that this object can not just be used in another type of functions like WinMove() for example, unless I got it from _IEPropertiesGet()? Thanks in forward for an enlightment. Link to comment Share on other sites More sharing options...
j0kky Posted November 9, 2016 Share Posted November 9, 2016 _IECreate returns an object variable, not an handle, this is because WinMove doesn't work with it. Also, ConsoleWrite doesn't see the content of object variables and has a strange behavior with them (but it can print handles). zaxxon 1 Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
JohnOne Posted November 9, 2016 Share Posted November 9, 2016 #Include <IE.au3> Local $oIE = _IECreate("someurl.org") ConsoleWrite(@CRLF & "oIE: " & $oIE & @CRLF & @CRLF) _IELoadWait($oIE) $hWnd = _IEPropertyGet($oIE, "hwnd") WinMove($hWnd, "", 0, 0, 1000, 600) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
zaxxon Posted November 9, 2016 Author Share Posted November 9, 2016 Thanks guys! Link to comment Share on other sites More sharing options...
j0kky Posted November 9, 2016 Share Posted November 9, 2016 26 minutes ago, JohnOne said: ConsoleWrite(@CRLF & "oIE: " & $oIE & @CRLF & @CRLF) @JohnOne: Does this string print only "oIE: " in your system too? Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
Juvigy Posted November 9, 2016 Share Posted November 9, 2016 $oIE is an object. It is normal to show empty string. You can do : ConsoleWrite(@CRLF & "oIE: " & _IEPropertyGet($oIE, "addressbar") & @CRLF & @CRLF) 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