Rank: Member
Groups: Approved
Joined: 9/3/2021(UTC) Posts: 12 Location: 北京
|
I hope I can get help to modify it on the basis of my current situation.I wrote a script that uses a click-and-click interaction method. But there is no way to support interactive methods such as mouse hovering to display secondary directories. Code:
//选择搜索引擎搜索选中文字
sp.Sleep(10); //To allow caret position update in active control
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_C]);
sp.Sleep(50);
s=clip.GetText();
keyword = s.trim();
var n = /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/i;
var match = n.exec(keyword);
var items =
[
["搜索 >", "", false, [
["┍┥全开┆", "sp.RunProgram('https://www.google.com.hk/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.bing.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.sogou.com/web?query='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://so.toutiao.com/search?dvpf=pc&source=input&keyword='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.so.com/s?ie=utf-8&fr=so.com&src=home_so.com&q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝必应", "sp.RunProgram('https://www.bing.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝搜狗", "sp.RunProgram('https://www.sogou.com/web?query='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝头条", "sp.RunProgram('https://so.toutiao.com/search?dvpf=pc&source=input&keyword='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┕360", "sp.RunProgram('https://www.so.com/s?ie=utf-8&fr=so.com&src=home_so.com&q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
]],
[" ┕百度", "sp.RunProgram('https://www.baidu.com/s?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕谷歌", "sp.RunProgram('https://www.google.com.hk/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕知乎搜索", "sp.RunProgram('https://www.zhihu.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕微信搜索", "sp.RunProgram('https://weixin.sogou.com/weixin?type=2&query='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕茶杯狐搜索", "sp.RunProgram('https://www.cupfox.com/search?key='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕网盘搜索", "sp.RunProgram('https://ujuso.com/#/main?kw='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕豆瓣搜索", "sp.RunProgram('https://www.douban.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕ICON库", "sp.RunProgram('https://www.iconfont.cn/search/index?searchType=icon&q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["视频 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('https://www.agefans.vip/search?query='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('http://aiktv.vip/search/?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://dsjmm.com/vodsearch/?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.ak1080.me/vodsearch/-------------.html?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.dilidili8.cc/public/api.php?app=video&do=search&q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝AGE动漫", "sp.RunProgram('https://www.agefans.vip/search?query='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝爱看啦", "sp.RunProgram('http://aiktv.vip/search/?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝看剧迷", "sp.RunProgram('https://dsjmm.com/vodsearch/?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝闪电影视", "sp.RunProgram('https://www.ak1080.me/vodsearch/-------------.html?wd='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝嘀哩嘀哩", "sp.RunProgram('https://www.dilidili8.cc/public/api.php?app=video&do=search&q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝豆瓣", "sp.RunProgram('https://www.douban.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┕vip解析", "sp.RunProgram('https://z1.m1907.cn/?jx='+keyword, '', 'open', 'normal', true, false, false);"],
]],
[" ┝哔哩", "sp.RunProgram('https://search.bilibili.com/video?keyword='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
[" ┕番计", "sp.RunProgram('https://bangumi.tv/subject_search/='+keyword, '', 'open', 'normal', true, false, false);"],
[" ┕解析1", "sp.RunProgram('http://jx2.zhiaiyy.top/?url='+keyword, '', 'open', 'normal', true, false, false);"],
[" ┕解析2", "sp.RunProgram('https://jx.yunboys.cn/?url='+keyword, '', 'open', 'normal', true, false, false);"],
[" ┕解析3", "sp.RunProgram('https://api.okjx.cc:3389/jx.php?url='+keyword, '', 'open', 'normal', true, false, false);"],
[" ┕解析4", "sp.RunProgram('https://www.qianyicp.com/vip/vip_g.php?url='+keyword, '', 'open', 'normal', true, false, false);"],
[" ┕解析5", "sp.RunProgram('https://www.1717yun.com/beiyong/?url='+keyword, '', 'open', 'normal', true, false, false);"],
["软件 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('http://www.mpyit.com/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.yijingying.com/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.weidown.com/search/?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.yxssp.com/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝老殁", "sp.RunProgram('http://www.mpyit.com/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝乐园", "sp.RunProgram('https://www.yijingying.com/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝微当", "sp.RunProgram('https://www.weidown.com/search/?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┕异星", "sp.RunProgram('https://www.yxssp.com/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
]],
//["翻译", "sp.RunOrActivate('F:\\\\Install\\\\copytranslator\\\\copytranslator.exe');"],
//["翻译", "var hCMD = sp.WindowFromClassOrTitle('', 'Copytranslator') ; if (hCMD !== null){hCMD.Activate();hCMD.BringToFront();}else{ sp.RunProgram('F:\\\\Install\\\\copytranslator\\\\copytranslator.exe', '', 'open', 'normal', true, false, false);}"],
//*["翻译 >", "", false, [
//["┍━━┥全开┆", "sp.RunProgram('https://translate.google.cn/?sl=en&tl=zh-CN&text='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://fanyi.baidu.com/#vie/zh/'+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('http://dict.youdao.com/search?q='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('http://www.iciba.com/word?w='+keyword, '', 'open', 'normal', true, false, false);"],
//["┝谷歌翻译", "sp.RunProgram('https://translate.google.cn/?sl=en&tl=zh-CN&text='+keyword, '', 'open', 'normal', true, false, false);"],
//["┝百度翻译", "sp.RunProgram('https://fanyi.baidu.com/#vie/zh/'+keyword, '', 'open', 'normal', true, false, false);"],
//["┝有道词典", "sp.RunProgram('http://dict.youdao.com/search?q='+keyword, '', 'open', 'normal', true, false, false);"],
//["┕金山词霸", "sp.RunProgram('http://www.iciba.com/word?w='+keyword, '', 'open', 'normal', true, false, false);"],
//]],
["百科 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('https://baike.baidu.com/item/'+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://zh.moegirl.org.cn/index.php?search='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://zh.wikipedia.org/wiki/'+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.baike.com/search?keyword='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://wapbaike.baidu.com/search/none?word='+keyword, '', 'open', 'normal', true, false, false);"],
["┝百度百科", "sp.RunProgram('https://baike.baidu.com/item/'+keyword, '', 'open', 'normal', true, false, false);"],
["┝维基百科", "sp.RunProgram('https://zh.wikipedia.org/wiki/'+keyword, '', 'open', 'normal', true, false, false);"],
["┝萌娘百科", "sp.RunProgram('https://zh.moegirl.org.cn/index.php?search='+keyword, '', 'open', 'normal', true, false, false);"],
["┝互动百科", "sp.RunProgram('https://www.baike.com/search?keyword='+keyword, '', 'open', 'normal', true, false, false);"],
["┕词条查询", "sp.RunProgram('https://wapbaike.baidu.com/search/none?word='+keyword, '', 'open', 'normal', true, false, false);"],
]],
["音乐 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('https://www.cocomanga.com/search?searchString='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('http://www.99wushu.com/statics/search.aspx?key='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.x18mh.com/statics/search.aspx?key='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.zerobyw3ds.com/plugin.php?id=jameson_manhua&a=search&c=index&keyword='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.xd5s.com/search/?keywords='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝QQ音乐", "sp.RunProgram('https://y.qq.com/n/ryqq/search?w='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝网易云音乐", "sp.RunProgram('https://music.163.com/#/search/m/?s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
]],
["购物 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('http://s.taobao.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://search.jd.com/Search?keyword='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.etao.com/search.htm?nq='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝淘宝", "sp.RunProgram('http://s.taobao.com/search?q='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝京东", "sp.RunProgram('https://search.jd.com/Search?keyword='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝值得", "sp.RunProgram('https://search.smzdm.com/?c=home&s='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┕一淘", "sp.RunProgram('https://www.etao.com/search.htm?nq='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
]],
["文献 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('sp.RunProgram('http://kns.cnki.net/kns/brief/default_result.aspx?txt_1_value1='+keyword+'&dbPrefix=SCDB&db_opt=CJFQ%2CCJFN%2CCDFD%2CCMFD%2CCPFD%2CIPFD%2CCCND%2CCCJD%2CHBRD&singleDB=SCDB&action=scdbsearch', '', 'open', 'normal', true, false, false);sp.RunProgram('https://pubmed.ncbi.nlm.nih.gov/?term='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.semanticscholar.org/search?q='+keyword, '', 'open', 'normal', true, false, false);"],
["┝中国知网", "sp.RunProgram('http://kns.cnki.net/kns/brief/default_result.aspx?txt_1_value1='+keyword+'&dbPrefix=SCDB&db_opt=CJFQ%2CCJFN%2CCDFD%2CCMFD%2CCPFD%2CIPFD%2CCCND%2CCCJD%2CHBRD&singleDB=SCDB&action=scdbsearch', '', 'open', 'normal', true, false, false);"],
["┝PubMed", "sp.RunProgram('https://pubmed.ncbi.nlm.nih.gov/?term='+keyword, '', 'open', 'normal', true, false, false);"],
["┝谷歌学术", "sp.RunProgram('https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q='+keyword, '', 'open', 'normal', true, false, false);"],
["┕Semantic Scholar", "sp.RunProgram('https://www.semanticscholar.org/search?q='+keyword, '', 'open', 'normal', true, false, false);"],
]],
["小说 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('sp.RunProgram('http://noveless.com/?S='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);sp.RunProgram('m.qishu.me/search/'+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┝书荒部落", "sp.RunProgram('http://noveless.com/?S='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["┕奇书网", "sp.RunProgram('http://www.qishu.me/search.asp?word='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
["优书网", "sp.RunProgram('https://www.yousuu.com/search/?search_type=title&search_value='+keyword+'&ie=utf-8&oe=utf-8', '', 'open', 'normal', true, false, false);"],
]],
["地图 >", "", false, [
["┍━━┥全开┆", "sp.RunProgram('https://www.google.com.hk/maps/place/'+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://www.amap.com/search?query='+keyword, '', 'open', 'normal', true, false, false);sp.RunProgram('https://map.baidu.com/search/'+keyword+'@12734981.99158243,4548667.775,13z?querytype=s&da_src=shareurl&wd='+keyword, '', 'open', 'normal', true, false, false);"],
["┝谷歌地图", "sp.RunProgram('https://www.google.com.hk/maps/place/'+keyword, '', 'open', 'normal', true, false, false);"],
["┝高德地图", "sp.RunProgram('https://www.amap.com/search?query='+keyword, '', 'open', 'normal', true, false, false);"],
["┕百度地图", "sp.RunProgram('https://map.baidu.com/search/'+keyword+'@12734981.99158243,4548667.775,13z?querytype=s&da_src=shareurl&wd='+keyword, '', 'open', 'normal', true, false, false);"],
]],
["工具 >", "", false, [
["快递查询", "sp.RunProgram('https://www.kuaidi100.com/chaxun?com=&nu='+keyword, '', 'open', 'normal', true, false, false);"],
["百度识图", "sp.RunProgram('https://graph.baidu.com/details?isfromtusoupc=1&tn=pc&carousel=0&promotion_name=pc_image_shituindex&extUiData%5bisLogoShow%5d=1&image='+keyword, '', 'open', 'normal', true, false, false);"],
["生成二维码", "sp.RunProgram('https://api.qrserver.com/v1/create-qr-code/?size=150x150&data='+keyword, '', 'open', 'normal', true, false, false);"],
]],
]
sp.PopupList(items);
Edited by user Friday, December 3, 2021 3:17:10 PM(UTC)
| Reason: Not specified
|