Jump to content

Getting the Value of popup.


Recommended Posts

I tried get value but i have no success.

Example

If Microsoft Internet Explorer <---- POP exist then

GetValue of Visible Text and save it to a txt file.

>>>> Window <<<<

Title: Microsoft Internet Explorer

Class: #32770

Position: 261, 218

Size: 176, 116

Style: 0x94C801C5

ExStyle: 0x00010101

>>>> Control <<<<

Class:

Instance:

ID:

Text:

Position:

Size:

ControlClick Coords:

Style:

ExStyle:

>>>> Mouse <<<<

Position: 312, 234

Cursor ID: 2

Color: 0x0059EF

>>>> StatusBar <<<<

>>>> Visible Text <<<<

OK

hi

>>>> Hidden Text <<<<

Thanks for your help

Link to comment
Share on other sites

WinGetText?

Opt("WinTitleMatchMode", 4)

While 1
    If WinExists("[CLASS:#32770;TITLE:Microsoft Internet Explorer]", "") Then
        $sText = WinGetText("[CLASS:#32770;TITLE:Microsoft Internet Explorer]", "")
        MsgBox(64, "Text", $sText)
        ExitLoop
    EndIf
    Sleep(20)
WEnd

:)

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
Link to comment
Share on other sites

There was one popup that value only appear "Ok" but it have a long msg in the center so it didnt gettext all of them

CODE

>>>> Window <<<<

Title: Card Information

Class: ThunderRT6FormDC

Position: 210, 210

Size: 616, 363

Style: 0x16C40000

ExStyle: 0x00000100

>>>> Control <<<<

Class:

Instance:

ID:

Text:

Position:

Size:

ControlClick Coords:

Style:

ExStyle:

>>>> Mouse <<<<

Position: 584, 338

Cursor ID: 0

Color: 0xC6C3C6

>>>> StatusBar <<<<

>>>> Visible Text <<<<

OK

>>>> Hidden Text <<<<

The thing is it got more of information contain that pop like cards info beside just pressing okie... all i get as return value is Ok there still missing

Link to comment
Share on other sites

There was one popup that value only appear "Ok" but it have a long msg in the center so it didnt gettext all of them

The thing is it got more of information contain that pop like cards info beside just pressing okie... all i get as return value is Ok there still missing

If the app is drawing the text as a graphic, all you can do is OCR, which is problematic. AutoIt works to pull text from standard windows controls that contain actual ANSI or Unicode text strings. It can't OCR a graphical image into text.

:)

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
Link to comment
Share on other sites

How about

I would like to Alt+Printscreen to a pop up window title name Microsoft Internet Explorer like ControlSend take snapshot and paste it on ini.rtf wordpad to have my imagine i took save in there? is't possible?

>>>> Window <<<<

Title: Microsoft Internet Explorer

Class: #32770

Position: 475, 374

Size: 176, 116

Style: 0x94C801C5

ExStyle: 0x00010101

>>>> Control <<<<

Class:

Instance:

ID:

Text:

Position:

Size:

ControlClick Coords:

Style:

ExStyle:

>>>> Mouse <<<<

Position: 541, 400

Cursor ID: 2

Color: 0x0061FF

>>>> StatusBar <<<<

>>>> Visible Text <<<<

OK

hi

>>>> Hidden Text <<<<

CODE

If WinExists("Microsoft Internet Explorer", "") Then

ControlSend("Microsoft Internet Explorer", "", "", "!{PRINTSCREEN}")

$file = FileOpen("ini.rtf", 1)

; Check if file opened for writing OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

FileWrite($file, "Popup: " & "Error: " & send("^{v}") & @CRLF & @CRLF)

FileClose($file)

EndIf

Link to comment
Share on other sites

How about

I would like to Alt+Printscreen to a pop up window title name Microsoft Internet Explorer like ControlSend take snapshot and paste it on ini.rtf wordpad to have my imagine i took save in there? is't possible?

>>>> Window <<<<

Title: Microsoft Internet Explorer

Class: #32770

Position: 475, 374

Size: 176, 116

Style: 0x94C801C5

ExStyle: 0x00010101

CODE

If WinExists("Microsoft Internet Explorer", "") Then

ControlSend("Microsoft Internet Explorer", "", "", "!{PRINTSCREEN}")

$file = FileOpen("ini.rtf", 1)

; Check if file opened for writing OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

FileWrite($file, "Popup: " & "Error: " & send("^{v}") & @CRLF & @CRLF)

FileClose($file)

EndIf

Are you looking for text from a web page in MS IE? That would be much easier using Dale Hohm's IE.au3 UDF. Even if it is a pop up, it might actually be an instance of IE presenting it, I guess.

On the screen shot, I don't think your code will work that, but I haven't tested it. You need to open an instance of WordPad to paste the text string and image into, then save it from there to a file. Your technique doesn't format the data as and .rtf.

Another way is PaulIA's AU3 library, which includes several _ScreenCap_Capture() functions that will save to BMP, JPG, or TIFF.

:)

Edited by PsaltyDS
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...