boy233 Posted February 3, 2016 Share Posted February 3, 2016 (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 February 5, 2016 by Jos spelling Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 3, 2016 Moderators Share Posted February 3, 2016 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? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
boy233 Posted February 3, 2016 Author Share Posted February 3, 2016 Yes is a application .NET (asp). See information expandcollapse popup>>>> 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 <<<< Link to comment Share on other sites More sharing options...
jdelaney Posted February 4, 2016 Share Posted February 4, 2016 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. Link to comment Share on other sites More sharing options...
boy233 Posted February 4, 2016 Author Share Posted February 4, 2016 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? Link to comment Share on other sites More sharing options...
boy233 Posted February 4, 2016 Author Share Posted February 4, 2016 It did not work how can I solve the problem? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 4, 2016 Moderators Share Posted February 4, 2016 @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. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
boy233 Posted February 4, 2016 Author Share Posted February 4, 2016 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}") Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 4, 2016 Moderators Share Posted February 4, 2016 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jdelaney Posted February 5, 2016 Share Posted February 5, 2016 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. Link to comment Share on other sites More sharing options...
boy233 Posted February 5, 2016 Author Share Posted February 5, 2016 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! Link to comment Share on other sites More sharing options...
AutoBert Posted February 5, 2016 Share Posted February 5, 2016 (edited) Please post a reproducer script. Edited February 5, 2016 by AutoBert Link to comment Share on other sites More sharing options...
boy233 Posted February 5, 2016 Author Share Posted February 5, 2016 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 Link to comment Share on other sites More sharing options...
AutoBert Posted February 5, 2016 Share Posted February 5, 2016 This script snippets aren't runable, so make a runable reproducer. Have you testet example 2 to _IEAction in help? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 5, 2016 Developers Share Posted February 5, 2016 @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 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
boy233 Posted February 5, 2016 Author Share Posted February 5, 2016 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/ I used the ControlGetText the sample also.... Topic closed was what I needed... I'm learning a lot from everyone! Thank you help everyone! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 5, 2016 Moderators Share Posted February 5, 2016 Hopefully one of the things you've learned is a little patience.... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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