Sign in to follow this  
Followers 0
trandatnh

autoit with IE problem

17 posts in this topic

I have a big problem when working with IE.au3 , INet.au3 and some IE support lib. So I can't read source code from a new pop-up created by wicketajack. And then I how to control those pop-up?

Thanks for read.

Share this post


Link to post
Share on other sites



I have a big problem when working with IE.au3 , INet.au3 and some IE support lib. So I can't read source code from a new pop-up created by wicketajack. And then I how to control those pop-up?

Thanks for read.

I have no idea what you are talking about, but many web pages trigger ordinary Windows API popups, which you can handle with the regular AutoIt functions(i.e. WinWaitActive(), ControlClick(), etc.). Look at the popup window with AU3Info.exe to be sure.

:)


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

So unlucky that AU3Info.exe can't show info of these popup. I have a wonder that I can use ControlClick on the popup with 'Text' and 'Title' and ControlClick Coords of parent IE instance. Of course ControlID is ''Internet Explorer_Server1".

But I can't use another Control* functions. And Win* functions is not work too.

TT_TT

Share this post


Link to post
Share on other sites

So unlucky that AU3Info.exe can't show info of these popup. I have a wonder that I can use ControlClick on the popup with 'Text' and 'Title' and ControlClick Coords of parent IE instance. Of course ControlID is ''Internet Explorer_Server1".

But I can't use another Control* functions. And Win* functions is not work too.

TT_TT

The control type ''Internet Explorer_Server1" indicates that the popup is in fact an IE document. So you would use _IEAttach() to get a reference to the new instance and then use _IE* functions on it.

:)


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

#5 ·  Posted (edited)

I had tried _IEAttach before but still not work, It can attach on parent IE instance only!

:)

Edited by trandatnh

Share this post


Link to post
Share on other sites

I had tried _IEAttach before but still not work

:)

Wost case, you should be able to ControlSend() tabs, text, and enter to the window.

If you are having trouble IDing the window, post the summary tab of AU3Info on your popup.

:)


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

#7 ·  Posted (edited)

I'm trying but I think it not work and can not be satisfy my job. I need to get handle or object attach.

This is summary of the popup

>>>> Window <<<<
Title:  Binh trường: Xuất binh - Microsoft Internet Explorer
Class:  IEFrame
Position:   58, 58
Size:   768, 527
Style:  0x16CF0000
ExStyle:    0x00000100
Handle: 0x012A098A

>>>> Control <<<<
Class:  Internet Explorer_Server
Instance:   1
ClassnameNN:    Internet Explorer_Server1
Advanced (Class):   [CLASS:Internet Explorer_Server; INSTANCE:1]
ID: 
Text:   
Position:   0, 86
Size:   760, 384
ControlClick Coords:    443, 279
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x000D09B4

>>>> Mouse <<<<
Position:   505, 453
Cursor ID:  2
Color:  0xFFFFFF

>>>> StatusBar <<<<
1:  200
2:  
3:  
4:  
5:  
6:  
7:  
8:  Internet

>>>> Visible Text <<<<
http://s5.dequoc.webgame.vn/fbms5/do/?x=OZtgpX9-pOlGKxpH0UsQIA
http://s5.dequoc.webgame.vn/fbms5/do/?x=OZtgpX9-pOlGKxpH0UsQIA
200


>>>> Hidden Text <<<<
ĄЃ

And the summary of parent IE instance

>>>> Window <<<<
Title:  Binh trường: Xuất binh - Microsoft Internet Explorer
Class:  IEFrame
Position:   58, 58
Size:   768, 527
Style:  0x16CF0000
ExStyle:    0x00000100
Handle: 0x012A098A

>>>> Control <<<<
Class:  Internet Explorer_Server
Instance:   1
ClassnameNN:    Internet Explorer_Server1
Advanced (Class):   [CLASS:Internet Explorer_Server; INSTANCE:1]
ID: 
Text:   
Position:   0, 86
Size:   760, 384
ControlClick Coords:    409, 358
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x000D09B4

>>>> Mouse <<<<
Position:   471, 532
Cursor ID:  2
Color:  0xFFFFFF

>>>> StatusBar <<<<
1:  200
2:  
3:  
4:  
5:  
6:  
7:  
8:  Internet

>>>> Visible Text <<<<
http://s5.dequoc.webgame.vn/fbms5/do/?x=OZtgpX9-pOlGKxpH0UsQIA
http://s5.dequoc.webgame.vn/fbms5/do/?x=OZtgpX9-pOlGKxpH0UsQIA
200


>>>> Hidden Text <<<<
ĄЃ

P/S: it really is not work. And two summary is the same >"<!

Edited by trandatnh

Share this post


Link to post
Share on other sites

Did you try the "dialogbox" parameter with _IEAttach?

Show your code!

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Yes, I did try with 'dialogbox' parameter.

But how can I get handle or title sub-string of the popup?

here is my code

$title = 'Binh trường: Xác nhận xuất binh'

$oIe = _IEAttach($title, 'Dialogbox')

ConsoleWrite(IsObj($oIe) & @CRLF)

but return = 0

The $title that I use is the title I can see on popup by myself.

Edited by trandatnh

Share this post


Link to post
Share on other sites

Try using WinList() to examine the window titles or use "AutoIt Window Info" tool to verify what you are using.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I tried with WinList but it still not work.

#include <IE.au3>
$var = WinList()

For $i = 1 to $var[0][0]
;If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then
    If $var[$i][0] = "" AND IsVisible($var[$i][1]) Then
        MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1])
        $oIE = _IEAttach($var[$i][1],'dialogbox')
        ConsoleWrite(IsObj($oIE) & @CRLF)
    EndIf
Next

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
  Else
    Return 0
  EndIf

EndFunc

First, I get handle of visible windows that have a title, but it don't show the title of popup I need.

Then, I get handle of visible windows and don't have a title, _IEAttach it with 'dialogbox' parameter but IsObject return = 0

:)

Can u advice for me a new way, thank Mr Dale so much!

Trandatnh

Edited by trandatnh

Share this post


Link to post
Share on other sites

I tried with WinList but it still not work.

#include <IE.au3>
$var = WinList()

For $i = 1 to $var[0][0]
;If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then
    If $var[$i][0] = "" AND IsVisible($var[$i][1]) Then
        MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1])
        $oIE = _IEAttach($var[$i][1],'dialogbox')
        ConsoleWrite(IsObj($oIE) & @CRLF)
    EndIf
Next

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
  Else
    Return 0
  EndIf

EndFunc

First, I get handle of visible windows that have a title, but it don't show the title of popup I need.

Then, I get handle of visible windows and don't have a title, _IEAttach it with 'dialogbox' parameter but IsObject return = 0

:)

Can u advice for me a new way, thank Mr Dale so much!

Trandatnh

Try this, and post the window class you get for your window:
#include <IE.au3>
#include <Array.au3>
#include <WinAPI.au3>

$var = WinList()
ReDim $var[UBound($var)][3]

For $i = $var[0][0] To 1 Step -1
    If BitAND(WinGetState($handle), 2) Then
        $var[$i][2] = _WinAPI_GetClassName($var[$i][1])
    Else
        _ArrayDelete($var, $i)
    EndIf
Next

_ArrayDisplay($var, "Visible Window Classes")

:)


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

#13 ·  Posted (edited)

#include <IE.au3>
#include <Array.au3>
#include <WinAPI.au3>

$var = WinList()
ReDim $var[UBound($var)][3]

For $i = $var[0][0] To 1 Step -1
    $handle = $var[$i][1]
    If BitAND(WinGetState($handle), 2) Then
        $var[$i][2] = _WinAPI_GetClassName($var[$i][1])
    Else
        _ArrayDelete($var, $i)
    EndIf
Next

_ArrayDisplay($var, "Visible Window Classes")

[0]|184||

[1]||0x0001013C|Shell_TrayWnd

[2]|C:\Documents and Settings\LeTranDat\My Documents\auto dcqk\lab\3.au3 - SciTE [2 of 5]|0x00160420|SciTEWindow

[3]|Đế Chế Quật Khởi - Microsoft Internet Explorer|0x000C052A|IEFrame

[4]|Program Manager|0x0001016A|Progman

number 3 is the parent IE instance, I need the popup created by this IE instance. But your func still can't show it.

Edited by trandatnh

Share this post


Link to post
Share on other sites

#include <IE.au3>
#include <Array.au3>
#include <WinAPI.au3>

$var = WinList()
ReDim $var[UBound($var)][3]

For $i = $var[0][0] To 1 Step -1
    $handle = $var[$i][1]
    If BitAND(WinGetState($handle), 2) Then
        $var[$i][2] = _WinAPI_GetClassName($var[$i][1])
    Else
        _ArrayDelete($var, $i)
    EndIf
Next

_ArrayDisplay($var, "Visible Window Classes")

[0]|184||

[1]||0x0001013C|Shell_TrayWnd

[2]|C:\Documents and Settings\LeTranDat\My Documents\auto dcqk\lab\3.au3 - SciTE [2 of 5]|0x00160420|SciTEWindow

[3]|Đế Chế Quật Khởi - Microsoft Internet Explorer|0x000C052A|IEFrame

[4]|Program Manager|0x0001016A|Progman

number 3 is the parent IE instance, I need the popup created by this IE instance. But your func still can't show it.

Really? The popup was visible, but that didn't catch info for it? I wasn't expecting that.

:)


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

#15 ·  Posted (edited)

yep, :)

Can you give me an another advice?

Edited by trandatnh

Share this post


Link to post
Share on other sites

yep, :)

Can you give me an another advice?

Not without a method to duplicate the symptoms. IE popup windows are visible to the tools on my system, so I can't reproduce the problem.

:)


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
:D Share em ban auto dai ca, dat hang dai ca cai auto cho volam web day!

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