Sign in to follow this  
Followers 0
Bert

WinGetPos issue with IECreate

3 posts in this topic

If the IECreate window is shown, it works. IF it is hidden, it shows the cords for Scite when I test. The example below does it both ways. According to the help file, it should not make a difference. Can someone confirm this before I submit this as a bug? It may be my rig, so I want to be sure first. It seems the WinGetPos will go after the active window instead of the correct window.

#include <IE.au3>
Opt("WinTitleMatchMode", 2)
$oIE = _IECreate("about:blank", 0, 0)
$pos1 = WinGetPos($oIE)
MsgBox(0, "IE hidden",$pos1[0]&'   '&$pos1[1])

$oIE1 = _IECreate("about:blank", 0, 1)
$pos2 = WinGetPos($oIE1)
MsgBox(0, "IE shown",$pos2[0]&'   '&$pos2[1])

Share this post


Link to post
Share on other sites



If the IECreate window is shown, it works. IF it is hidden, it shows the cords for Scite when I test. The example below does it both ways. According to the help file, it should not make a difference. Can someone confirm this before I submit this as a bug? It may be my rig, so I want to be sure first. It seems the WinGetPos will go after the active window instead of the correct window.

#include <IE.au3>
Opt("WinTitleMatchMode", 2)
$oIE = _IECreate("about:blank", 0, 0)
$pos1 = WinGetPos($oIE)
MsgBox(0, "IE hidden",$pos1[0]&'   '&$pos1[1])

$oIE1 = _IECreate("about:blank", 0, 1)
$pos2 = WinGetPos($oIE1)
MsgBox(0, "IE shown",$pos2[0]&'   '&$pos2[1])
The handle to the DOM is not the same thing as the handle to the window. Use _IEPropertyGet() to retrieve the window handle and use that:

#include <IE.au3>

Opt("WinTitleMatchMode", 2)

$oIE1 = _IECreate("about:blank", 0, 0)
$hIE1 = _IEPropertyGet($oIE1, "HWND")
$pos1 = WinGetPos($hIE1)
_IEQuit($oIE1)
MsgBox(0, "IE hidden",$pos1[0]&'   '&$pos1[1])

$oIE2 = _IECreate("about:blank", 0, 1)
$hIE2 = _IEPropertyGet($oIE2, "HWND")
$pos2 = WinGetPos($hIE2)
_IEQuit($oIE2)
MsgBox(0, "IE shown",$pos2[0]&'   '&$pos2[1])

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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