Rank: Newbie
Groups: Approved
Joined: 9/18/2018(UTC) Posts: 7
|
Hi. Can someone write a script to search selected text? I dont know anything about scripts, but i believe its possible. For example, here is a search string for youtube: Quote:http://www.youtube.com/results?search_query=text So what i want - is when i select some text, then draw U stroke and new browser tab opens with search string with text replaced with my text. Also when new tab with search results on youtube is closed, the text remain selected and for example it is possible to search the same text on google, with stroke "G" and line: Quote:https://www.google.com/search?q=text Please if it is not hard for you, create such useful script
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Sorry, I somehow missed your post. These both work for me: Code://YouTube
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_C]);
sp.Sleep(50);
sp.Run(`http://www.youtube.com/results?search_query=${encodeURI(clip.GetText())}`);
//Google
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_C]);
sp.Sleep(50);
sp.Run(`https://www.google.com/search?q=${encodeURI(clip.GetText())}`);
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Newbie
Groups: Approved
Joined: 1/5/2021(UTC) Posts: 2
Thanks: 1 times
|
I just like that. And that's what i want SP to do. Thanks for Rob. It woooooooork on my computer now, Thank you so much~~~
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 9/18/2018(UTC) Posts: 7
|
Originally Posted by: Rob Sorry, I somehow missed your post. These both work for me:
Hey, don't be sorry, and thank you so much for this! It is something pleasant to search anything with just gesture, loved it from the first try. Btw, where should i ask such questions about scripts - in this section or in "Scripts"?
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Quote:where should i ask such questions about scripts It doesn't really matter, I just need to have multiple forum categories so it doesn't look empty on the main page
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
Originally Posted by: Rob Quote:where should i ask such questions about scripts It doesn't really matter, I just need to have multiple forum categories so it doesn't look empty on the main page Hi, is there a way to judge whether is there a selection context in the globe windows? Like window.getSelection().toString().trim() by Javascript in a webpage.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Not really (there are a few exceptions) - for most applications, an application cannot access data inside another application. Which is why we need to use other allowed methods, like copying to the clipboard, then examining.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close