boy233

Object CLASS:#32770 - Read popup

17 posts in this topic

#1 ·  Posted (edited)

People, 

I need to read the contents of a popup, How can I make the reading can not see the html?

Can someone help me?

Edited by Jos
spelling

Share this post


Link to post
Share on other sites



Class#32770 is a generic form, what application is it from? When you use the AutoIt Window Info Tool (in the same directory where you installed AutoIt) what does it return?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Yes is a application .NET  (asp).

See information

>>>> Window <<<<
Title:  Message from webpage
Class:  #32770
Position:   508, 308
Size:   358, 161
Style:  0x94C801C5
ExStyle:    0x00010101
Handle: 0x00120454

>>>> Control <<<<
Class:  Static
Instance:   2
ClassnameNN:    Static2
Name:   
Advanced (Class):   [CLASS:Static; INSTANCE:2]
ID: 65535
Text:   Check Digit Invalid!
Position:   65, 34
Size:   250, 17
ControlClick Coords:    112, 8
Style:  0x50022080
ExStyle:    0x00000004
Handle: 0x000C03D0

>>>> Mouse <<<<
Position:   688, 375
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
OK
Check Digit Invalid!


>>>> Hidden Text <<<<

 

Share this post


Link to post
Share on other sites

You can use _WinAPI_GetWindow with option 6, which is Enabled Popup:

; note: popup is present at this point:
$hIE = _IEPropertyGet($oIE,"HWND")
$hPopup = _WinAPI_GetWindow($hIE,6)
$s = WinGetText($hPopup)
ConsoleWrite($s & @CRLF)

 


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

I added include...

#include <WinAPI.au3>

See how was my code:

Local $btnConf = _IEGetObjByName ($oIE, "btnConfirms")
      _IEAction ($btnConf, "click")
      Sleep(500)

      $oIE2 = _IEAttach("Message from webpage")
      $hIE = _IEPropertyGet($oIE2,"HWND")
      $hPopup = _WinAPI_GetWindow($hIE,6)
      $s = WinGetText($hPopup)
      ConsoleWrite("Result - " & $s & @CRLF)

Presents nothing, I do something wrong?

Share this post


Link to post
Share on other sites

It did not work how can I solve the problem?

Share this post


Link to post
Share on other sites

@boy233 Please wait at least 24 hours before bumping your own threads, to give others a chance to look over the issue. We have volunteers from all corners of the globe; the person who can best answer your question may not be online at the moment.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I can not continue my script because of the popup, need to click the button. How can I do it?

Local $btnConf = _IEGetObjByName ($oIE, "btnConfirms")
_IEAction ($btnConf, "click")
Sleep(500)

Send("{ENTER}")

 

Share this post


Link to post
Share on other sites

boy233,

Please stick to just the one thread at a time.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

You can't use _IEAction to perform the click.  When the popup opens, the browser will hold you hostage until the popup is manually close.  That means your script is also deadlocked until that popup is closed.

Instead, do an _IEAction($oIE,"focus"), and then send {ENTER} at the browser.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Look what I did and did not work ...

_IEAction($oIE3,"focus")
Local $btnConfirms = _IEGetObjByName ($oIE3, "btnConfirms")
_IEAction($btnConfirms, "click")
Sleep(1000)

Send("{ENTER}")

I tried that way too ...

Local $btnConfirms = _IEGetObjByName ($oIE3, "btnConfirms")
_IEAction($btnConfirms, "click")
Sleep(1000)

_IEAction($oIE3,"focus")
Send("{ENTER}")

Is there any other way to run? And read the contents of the popup?

Thanks for everyone's help!

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Please post a reproducer script.

Edited by AutoBert

Share this post


Link to post
Share on other sites
6 minutes ago, AutoBert said:

 

I did that right? Does not run ...

Local $btnConfirms = _IEGetObjByName ($oIE3, "btnConfirms")
_IEAction($btnConfirms, "click")
Sleep(1000)

;~ It appears popup
_IEAction($oIE3,"focus")
Send("{ENTER}")

what am I doing wrong? thank you

Share this post


Link to post
Share on other sites

This script snippets aren't runable, so make a runable reproducer. Have you testet example 2 to _IEAction in help?

Share this post


Link to post
Share on other sites

@boy233, not sure how many members you PMed, but it seems you are having some "patience issues" with this topic as @Melba23 also warned you about posting multiple threads.

So consider this the last warning to behave in a normal fashion.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
41 minutes ago, AutoBert said:

This script snippets aren't runable, so make a runable reproducer. Have you testet example 2 to _IEAction in help?

Saved.... \0/ :D :D :D 
I used the ControlGetText the sample also....
Topic closed was what I needed... I'm learning a lot from everyone!

Thank you help everyone!

Share this post


Link to post
Share on other sites

Hopefully one of the things you've learned is a little patience....


√-1 2^3 ∑ π, and it was delicious!

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