StrokesPlus.net Forum
»
General Discussion
»
General Discussion
»
How to set the translate program on top again when I click the Chrome
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)
|
Hi, I use a Copytranslate program to show the translation of the word I selected. when I draw a gesture to copy the selected word, the program will automatically check the clipboard and show the translation on top, after this, I do not click the minimize button of the program, and I click the Chrome page. But when I select another word again and draw the gesture, the translate window does not show on top anymore. The following is the code. Code:sp.SendKeys("^c");
var hCMD = sp.WindowFromClassOrTitle('Copytranslator', '')
if (hCMD !== 0){
action.Window.Activate();
// action.Window.BringToFront();
action.Window.TopMost;
}else{
sp.RunProgram("D:\\下载\\Compressed\\copytranslator-9.0.2-win\\copytranslator.exe", "", "open", "normal", true, false, false);
}
Edited by user Sunday, April 26, 2020 1:21:35 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
action.Window.TopMost = true; 为置顶
|
|
|
|
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: liuxilu# action.Window.TopMost = true; 为置顶 只是想让翻译软件前置显示呢,不是要一直置顶显示,试了一堆函数,可能可数使用错误 现在就是点了Chrome,第二次划词,翻译软件就不再前置显示了,软件自带监控剪切板,翻译内容已经显示在后置界面 另外,使用了下面的函数,划词使用手势了,一次都不会前置显示 action.Window.BringToFront();
|
|
|
|
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
action.Window 是手势开始的窗口,你应该用 hCMD.BringToFront();
|
1 user thanked liuxilu for this useful post.
|
|
|
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: liuxilu# action.Window 是手势开始的窗口,你应该用 hCMD.BringToFront(); 感谢大佬解决了 看上一般的这样调值acRestoreWindow(hCMD,0,0),还以为S+Net也是这样,试过在括号里面输入值,写在前面.Restore();都没反应,以为是错的,改成action.Window,一直没变过了 作者没空来论坛,大佬替代作者解决了好多问题呀
|
|
|
|
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
|
|
|
|
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: liuxilu# 很多窗口函数在S+.Net里都写成方法了 大佬,求分享你自用的脚本导出文件学习 刚才重新看了卡饭大佬分享strokesplus的脚本,都是简单的用手势调用快捷键 我强烈认为大佬你的脚本一定吊炸天,想参考学习
|
|
|
|
Rank: Advanced Member
Groups: Translators, Moderators, Approved Joined: 4/6/2020(UTC) Posts: 79 Thanks: 1 times Was thanked: 21 time(s) in 21 post(s)
|
|
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
General Discussion
»
How to set the translate program on top again when I click the Chrome
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