Sign in to follow this  
Followers 0
tommytx

how to hilite searched for text using FF.

5 posts in this topic

Using FF I am calling for ctrl+F which will open the windows search box.

then i use send "Exported:" which dumps it in the search box and searches for it..

When it finds it it will hilite that text.. but when I look under the edit drop down ctrl+c is not an option..

So apparently the search hiliting the text does not count as being hilited for copy..

so of course sending ctrl+c wil not help since it is truly not hilited.. even though I  can see it is hilite..

Is the any way to get a signal back to my probram that the search was successful...

As you can see I tried to search then copy into the cliipboard to use clipget to compare to the text to see if success.

can anyone see what I am doing wrong...

IT is searching the page for "Exported:" and finds it no problem.. but my program does not know that it was a successful find...

Send("^f")
Sleep(1000)
Send("Exported:")

Sleep(1000)
Send("^c")
Sleep(1000)

Local $sData = ClipGet()
ConsoleWrite($sData & @CRLF)
Exit

Share this post


Link to post
Share on other sites



I think there is no way to get what you want using search box because the browser search underlining is different from double-click underlining.

The best way to accomplish it is working with html, for example with IE, WinHTTP or INET UDF

Share this post


Link to post
Share on other sites

Thanks for your  input JOkky... I think you are right.. but what Johnone offered worked perfect...which i assume is similar to what you suggested..

but seems so unnecessary to have to hilite the entire page to get one word... the CTRL+f works fine for me.. but once the seached term is located and hiliited... its not the same hilite that can be ctrl+c to get onto the clipboard..

I don't even need the text, just some feedback that says seach found it... like is there anything to read to see if the search was successful?

Below is the code that worked.. its just keeps copying and checking the page till the word "Exported:" appears on the page then continues..

My idea was to search the page 3 times with 5 second delay and when found all done.. but have found no way for the program to detect success of the find.... anyone have any ideas.. it would simplify my problem as I have many instances where I need this..

for $i = 1 to 3
Send("^a")
Sleep(500)
Send("^c")
Sleep(500)
Local $sData = ClipGet()
$find = StringInStr($sData, "Exported: " & $url)
if $find then
   MsgBox(0, "5 Second Delay.", "Found it round " & $i, 5)
Else
   MsgBox(0, "5 Second Delay.", "NOT FOUND round " & $i, 5)
EndIf
Next

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