Jump to content

how to hilite searched for text using FF.


tommytx
 Share

Go to solution Solved by JohnOne,

Recommended Posts

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
Link to comment
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

Link to comment
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
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...