Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v1) • Trying to improve this ctrl F search function

$
0
0
I use this search function to jump to specific text on chrome pages. Works great for jumping to a specific button to press after with enter or to paste into an edit box or whatever. Looking for ways to improve it though. I noticed ctrl f will open with preset text based on whatever is highlighted. Does anyone know if there is a way to set that highlighted text variable so I can open ctrl f with preselected text so that I don't have to paste it in after? Or any other suggestions would be great. This function works fine as is, just looking for a way to make it faster without errors. I do not use it as an instr(), this is specifically for jumping to that particular spot on a page to perform an action. I only use Chrome so cant COM connect easily and I don't want to, adds too much complexity to be worth it for something this simple.

CODE:

Jump_To( Search ){
SendEvent, {Ctrl Down}{f}{Ctrl Up}
Sleep, 100
Paste_Var( Search )
sleep, 50
SendEvent, {Esc 2}
sleep, 50
}

Paste_Var( Var ){
Clipboard := Var
Sleep, 10
SendEvent, {Ctrl Down}{v}{Ctrl Up}
}

Statistics: Posted by The_One_True_Rick — Today, 10:43



Viewing all articles
Browse latest Browse all 579

Trending Articles