StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
lyscop  
#1 Posted : Saturday, April 25, 2020 9:58:28 AM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

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

liuxilu  
#2 Posted : Sunday, April 26, 2020 5:03:13 AM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
action.Window.TopMost = true;
为置顶
lyscop  
#3 Posted : Monday, April 27, 2020 11:52:05 AM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
Originally Posted by: liuxilu# Go to Quoted Post
action.Window.TopMost = true;
为置顶




只是想让翻译软件前置显示呢,不是要一直置顶显示,试了一堆函数,可能可数使用错误

现在就是点了Chrome,第二次划词,翻译软件就不再前置显示了,软件自带监控剪切板,翻译内容已经显示在后置界面

另外,使用了下面的函数,划词使用手势了,一次都不会前置显示

action.Window.BringToFront();
liuxilu  
#4 Posted : Monday, April 27, 2020 12:31:59 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
action.Window 是手势开始的窗口,你应该用 hCMD.BringToFront();
thanks 1 user thanked liuxilu for this useful post.
soooulp on 4/27/2020(UTC)
lyscop  
#5 Posted : Monday, April 27, 2020 12:49:00 PM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
Originally Posted by: liuxilu# Go to Quoted Post
action.Window 是手势开始的窗口,你应该用 hCMD.BringToFront();




感谢大佬解决了

看上一般的这样调值acRestoreWindow(hCMD,0,0),还以为S+Net也是这样,试过在括号里面输入值,写在前面.Restore();都没反应,以为是错的,改成action.Window,一直没变过了

作者没空来论坛,大佬替代作者解决了好多问题呀
liuxilu  
#6 Posted : Monday, April 27, 2020 1:04:55 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
很多窗口函数在S+.Net里都写成方法了
lyscop  
#7 Posted : Friday, May 15, 2020 2:44:56 AM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

Thanks: 46 times
Was thanked: 23 time(s) in 17 post(s)
Originally Posted by: liuxilu# Go to Quoted Post
很多窗口函数在S+.Net里都写成方法了


大佬,求分享你自用的脚本导出文件学习

刚才重新看了卡饭大佬分享strokesplus的脚本,都是简单的用手势调用快捷键

我强烈认为大佬你的脚本一定吊炸天,想参考学习
liuxilu  
#8 Posted : Monday, May 18, 2020 3:18:31 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Translators, Moderators, Approved
Joined: 4/6/2020(UTC)
Posts: 79
China

Thanks: 1 times
Was thanked: 21 time(s) in 21 post(s)
值得参考的会发在论坛上,其它的也就是按键之类…
Users browsing this topic
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.