Rank: Newbie
Groups: Approved
Joined: 5/22/2023(UTC) Posts: 3  Location: Taiwan
|
the window.selection method of JS only apply for the browsers I am quite confused about the difference between clearscript and the common JS,and if other language can also be uesd in this environment. The claude ai give me the sp.editor and sp.Win32.SendMessage(handle, 0xD, 0, 0) both of them seem not existed. So the main question is what am suppoesed I do to add prefix&suffix to the selection text ???
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,308  Location: Tampa, FL Thanks: 28 times Was thanked: 410 time(s) in 351 post(s)
|
Can you give me a little more details regarding what you're trying to accomplish? Like a step-by-step breakdown.
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 5/22/2023(UTC) Posts: 3  Location: Taiwan
|
//clip.Clear //sp.Sleep(20) //sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_C]); //sp.Sleep(20) //var s=clip.GetText() //var prefix='{{c::' //var suffix='}}' //var result=prefix+s+suffix //sp.SendString(result)
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,308  Location: Tampa, FL Thanks: 28 times Was thanked: 410 time(s) in 351 post(s)
|
This seems to work fine for me, what issue are you having? Code:sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_C]);
sp.Sleep(20)
var s=clip.GetText()
var prefix='{{c::'
var suffix='}}'
var result=prefix+s+suffix
sp.SendString(result)
|
|
|
|
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