StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 General Action Scripts
 selected text search by engine
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

leecy1901

7 Posts

Posted - 04/20/2016 :  08:12:42  Show Profile  Reply with Quote
Hi , rob

i made a code for searching selected text dircetly

here is my code

the code below write in globa lua
----------------------------------------------------
function Menu(id)
if id == 1 then
acSendKeys("{DELAY=100}^c")
local s = acGetClipboardText()
local s = 'http://search.naver.com/search.naver?where=nexearch&sm=osd&ie={inputEncoding}&query=' .. s
acShellExecute("open",s, "", "", 1)
elseif id == 2 then
acSendKeys("{DELAY=100}^c")
local s = acGetClipboardText()
local s = 'https://www.google.com/#newwindow=1&q=' .. s
acShellExecute("open",s, "", "", 1)
elseif id == 3 then
acSendKeys("{DELAY=100}^c")
local s = acGetClipboardText()
local s = 'https://www.baidu.com/s?wd=' .. s
acShellExecute("open",s, "", "", 1)
end
--------------------------------------------------------------


and the code below is write in configure actions

------------------------------------------------------------------
acSendKeys("{DELAY=100}^c")
local swnd = acFindWindow("STROKESPLUS",nil)
acActivateWindow(swnd)
acCreatePopupMenu(acGetMouseLocationX()-90, acGetMouseLocationY()-15, "searching by NAVER,searching by Google,searching by Baidu,searching by Bing,searching by Daum,I'm feeling Lucky,-,Close", ",", "Menu")

----------------------------------------------------------------------

and here is the problem i faced.

i use 4 language , english , korean , chinese , japanese

when i search in english and korean , its working normally

but when i search in chinese and japanese , it shows different words for result

for example , i searched "大规", it shows as result is "大?"

i think its unicode problem.

let me know how can i solve this problem .

thanks! rob!

Rob

USA
2573 Posts

Posted - 04/20/2016 :  18:30:42  Show Profile  Visit Rob's Homepage  Reply with Quote
It is a unicode problem. When I built S+ I had no knowledge or experience with unicode and I built it in ANSI. I tried to convert to unicode, but encountered nothing but problems.

The new rewrite of S+ I'm working on will fully support unicode.
Go to Top of Page

leecy1901

7 Posts

Posted - 04/20/2016 :  22:51:18  Show Profile  Reply with Quote
Thanks! rob! i always support you
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000