Jump to content

Recommended Posts

Posted (edited)

I want to find a text in Mozilla an i use WinGetText. The Code looks so:

$text = 0

If $text = WinGetText("Google", "Web ") THEN

MsgBox(0, "Text read was:", $text)

EndIf

I don't understand why it's not function :)

How can help me?

Edited by gloop
Posted

Hello,

I'm not using Mozilla, but have you verify that "www.google.de" is the exact title of the window.

For example, with SlimBrowser, it display "Google - SlimBrowser", but the real title of the window is "SlimBrowser - [Google]" (use Autoit Window info to check it)

But really, the return value is not the same with different browsers (I have tested your example with IE and SlimBrowser)

Posted (edited)

Ive declared $text

but not in the sample ... its not function with IE and with mozilla :)

Edit:

Google.de was a sample. I dont look with the correct title ...

Edited by gloop
Posted

but not in the sample ... its not function with IE

Strange, can you try with this code (it returns a value for me) :

WinWaitActive("Google - Microsoft Internet Explorer")
$text = WinGetText("Google - Microsoft Internet Explorer", "")

MsgBox(0, "Text read was:", $text)
Posted (edited)

Now ive this code:

$text = 0

Run("C:\Programme\Internet Explorer\IEXPLORE.EXE", "", @SW_MAXIMIZE)

If WinWaitActive("Google - Microsoft Internet Explorer") THEN

    $text = WinGetText("Google - Microsoft Internet Explorer", "Web")

        MsgBox(0, "Text read was:", $text)

Endif

and it comes the messagebox and $text is 1 ...why not the text?

When i gave a invalid text its the same result :) $text = 1

Edited by gloop
Posted

But i will look if a word exist in the Browser.

In the example i will search for "Web"

:-/

<{POST_SNAPBACK}>

This should definitely work. Post your current script.
Posted (edited)

I beleive "WinGetText" in mozilla will always return "" not the page contents.

<{POST_SNAPBACK}>

Checked it on my machine, and yea there's no text to be returned w/ Mozilla and WinGetText

Do you have:

Opt("WinTitleMatchMode",2) ? Made finding windows much easier for me

FYI: WinGetText() returns 1 if it doesnt find the window

Edited by Ejoc
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Posted

But i will look if a word exist in the Browser.

In the example i will search for "Web"

:-/

<{POST_SNAPBACK}>

Are you laboring under the impression that WinGetText will return with the entire contents of the webpage? I think that it will only return what can be seen via the AU3Info tools as

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

or

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

if the correct option is set.

Maybe I'm wrong about the function WinGetText.....

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Find text in a Browser or find text on a webpage ?

A browser is only a program to view webpages.

<{POST_SNAPBACK}>

Find a text on a homepage :)
Posted

Find a text on a homepage :)

<{POST_SNAPBACK}>

WinGetText will not work.

You have two options that I can think of.

1. Download page with InetGet then open the file and search for your text.

2. I beleive the is a com related function that can do this but I can' think of it.

Posted

what is that for a crap function (WinGetText) ...

i cant save all the time the website to search for a word :-/

it's not gave a function for that?

Posted

what is that for a crap function (WinGetText) ...

i cant save all the time the website to search for a word :-/

it's not gave a function for that?

<{POST_SNAPBACK}>

:) What do you want a function for every browser since they all differ ?

:D Get real, you have all the functions you need now.

:D Use InetGet to save, then read the file.

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
×
×
  • Create New...