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 3:58:28 AM(UTC)
lyscop

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 4/23/2020(UTC)
Posts: 39
China

Thanks: 5 times
Was thanked: 1 time(s) in 1 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 Saturday, April 25, 2020 7:21:35 PM(UTC)  | Reason: Not specified

liuxilu  
#2 Posted : Saturday, April 25, 2020 11:03:13 PM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/5/2020(UTC)
Posts: 67
China

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

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 4/23/2020(UTC)
Posts: 39
China

Thanks: 5 times
Was thanked: 1 time(s) in 1 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 6:31:59 AM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/5/2020(UTC)
Posts: 67
China

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

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 4/23/2020(UTC)
Posts: 39
China

Thanks: 5 times
Was thanked: 1 time(s) in 1 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 7:04:55 AM(UTC)
liuxilu

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/5/2020(UTC)
Posts: 67
China

Was thanked: 15 time(s) in 15 post(s)
很多窗口函数在S+.Net里都写成方法了
lyscop  
#7 Posted : Thursday, May 14, 2020 8:44:56 PM(UTC)
lyscop

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 4/23/2020(UTC)
Posts: 39
China

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


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

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

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

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/5/2020(UTC)
Posts: 67
China

Was thanked: 15 time(s) in 15 post(s)
值得参考的会发在论坛上,其它的也就是按键之类…
lyscop  
#9 Posted : Wednesday, May 20, 2020 1:32:36 AM(UTC)
lyscop

Rank: Advanced Member

Reputation:

Groups: Approved
Joined: 4/23/2020(UTC)
Posts: 39
China

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: liuxilu# Go to Quoted Post
值得参考的会发在论坛上,其它的也就是按键之类…


我分上下左右、不同程序了,发现手势还是不够用ε=(´ο`*)))唉

UserPostedImage
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.