Rank: Newbie
Groups: Approved
Joined: 8/7/2019(UTC) Posts: 6 Thanks: 4 times
|
我有新问题 I have new questions.
全屏游戏时,禁用手势功能,如何设置 Disable gesture function in full-screen games and how to set it up
忽略一个游戏,多个游戏,忽略一个应用,多个应用 Ignore one game, multiple games, one application, multiple applications
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
You can use a regular expression (Use Regex) in the definition of an Ignored Application to handle multiple applications. For example:
(wow\.exe|winword\.exe|game\.exe)
That would match wow.exe, winword.exe, or game.exe and ignore all of them.
I recommend checking the "Disable S+ if this App Gains Focus" box for the ignored application. Then under "Options > Advanced" check the box "Enable on No Ignore App Match".
This way, when a defined game becomes the foreground window, S+ will completely disable itself. When a non-ignored app becomes the foreground window, S+ will enable itself.
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Newbie
Groups: Approved
Joined: 8/7/2019(UTC) Posts: 6 Thanks: 4 times
|
我有个新想法 我现在的设置 只能禁用一个或多个EXE 这个是在程序名称设置的 soft1.exe 这没问题 soft1.exe|soft2.exe|soft3.exe 这没问题
我想在一个目录下所有EXE都被禁止使用S+ 这个是在程序路径设置 d:\soft\game\gamename1 这没问题,可以禁用 d:\soft\game\gamename1\app.exe
d:\soft\game 为什么这个设置不生效,求解决方法
S+可以使用键盘启用,或者禁用吗
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
This works for me:
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
You can disable by making a hot key for example:
sp.Disable();
But once S+ is disabled, it not longer watches the keyboard and mouse, so you have to enable it manually by clicking the tray icon.
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
我想要不管任何软件,只要时全屏就会自动禁用手势,StrokesPlus.net好像没有这个功能。
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Quote:I want to disable gestures whenever I want to use any software, and StrokesPlus.net doesn't seem to have this feature. I am not sure that I understand your request. What are the situations which you want StrokesPlus.net disabled? Certain applications? A single application? Something else?
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
Originally Posted by: Rob Quote:I want to disable gestures whenever I want to use any software, and StrokesPlus.net doesn't seem to have this feature. I am not sure that I understand your request. What are the situations which you want StrokesPlus.net disabled? Certain applications? A single application? Something else? 我希望能实现一个忽略全屏的功能,也就是当窗口全屏状态时无法使用手势,但是退出全屏就可以使用了。 就像图中这样
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Okay. The easiest way to achieve this is to define one or more Ignored windows in S+ as shown here:
Note the checkbox at the top, labeled "Disable S+ is this App Gains Focus" - this is what disables S+ when that app is the active window. Also, under Options > Advanced you can check the "Enable on No Ignore App Match" box. That will re-enable S+ if it is disabled and the active window is not an ignored window.
I have this configuration for remote control programs and games. So when I am in one of those apps, S+ is disabled, but when I switch to a different program S+ automatically enables itself.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
You also create a script under Window Events > Foreground Window Change.
You should be able to test the window size against the screen's total size, then disable S+ if they are the same, for example.
But that will require some advanced scripting and logic to make it work right under various scenarios. Using the ignored windows is easier.
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
Originally Posted by: Rob You also create a script under Window Events > Foreground Window Change.
You should be able to test the window size against the screen's total size, then disable S+ if they are the same, for example.
But that will require some advanced scripting and logic to make it work right under various scenarios. Using the ignored windows is easier. 在窗口事件中可以通过识别窗体大小应该是能实现我需要的功能的,但是这需要一定的学习成本,希望您能为StrokesPlus.net添加这一选项,我需要了解,在脚本中是否能直接能判断windows窗口是否全屏,而不是自己去定义窗体大小决定事件。 效果就如图中这样。
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
So this script in the window foreground change will work, but it only executes when the foreground window changes, not if the same app is the foreground but is now taking up the full screen:Code:var fgWindow = sp.ForegroundWindow();
var screen = fgWindow.Screen;
if(screen.Bounds.Left == fgWindow.Rectangle.Left
&& screen.Bounds.Right == fgWindow.Rectangle.Right
&& screen.Bounds.Top == fgWindow.Rectangle.Top
&& screen.Bounds.Bottom == fgWindow.Rectangle.Bottom) {
sp.DisableCapture();
} else {
sp.EnableCapture();
}
So based on your example, that might not work the best.
Instead of the above script, you can create a timer script in Global Actions > Load/Unload Scripts > Load Script:Code:sp.CreateTimer("Full Screen Check",
0, //start delay (immediate)
500, //interval, checks every 500 milliseconds
`var fgWindow = sp.ForegroundWindow();
var screen = fgWindow.Screen;
if(screen.Bounds.Left == fgWindow.Rectangle.Left
&& screen.Bounds.Right == fgWindow.Rectangle.Right
&& screen.Bounds.Top == fgWindow.Rectangle.Top
&& screen.Bounds.Bottom == fgWindow.Rectangle.Bottom) {
sp.DisableCapture();
} else {
sp.EnableCapture();
}`
);
This script will run while S+ is running and if the active window rectangle matches the screen's rectangle, then it assumes it is full screen and disables S+ capture, otherwise it enables S+ capture.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Also, I will look into adding it as an option, as long as it doesn't have an impact on mouse hook performance, since it would have to check this each time you pressed a stroke button.
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
Originally Posted by: Rob Also, I will look into adding it as an option, as long as it doesn't have an impact on mouse hook performance, since it would have to check this each time you pressed a stroke button. Very good, almost perfect.
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
Originally Posted by: Rob Also, I will look into adding it as an option, as long as it doesn't have an impact on mouse hook performance, since it would have to check this each time you pressed a stroke button. 还是出现了不好的现象,也许应该更改判断全屏的方式,目前发现使用脚本之后桌面无法使用手势。
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Yes, it is likely that you will run into edge cases which need to be accounted for. This excludes the desktop window, desktop listview, and program manager from being disabled. Code:sp.CreateTimer("Full Screen Check",
0, //start delay (immediate)
500, //interval, checks every 500 milliseconds
`var fgWindow = sp.ForegroundWindow();
var screen = fgWindow.Screen;
if(fgWindow.HWnd != sp.DesktopWindow().HWnd
&& fgWindow.HWnd != sp.DesktopWindowListView().HWnd
&& fgWindow.ClassName != "Progman"
&& screen.Bounds.Left == fgWindow.Rectangle.Left
&& screen.Bounds.Right == fgWindow.Rectangle.Right
&& screen.Bounds.Top == fgWindow.Rectangle.Top
&& screen.Bounds.Bottom == fgWindow.Rectangle.Bottom) {
sp.DisableCapture();
} else {
sp.EnableCapture();
}`
);
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
Originally Posted by: Rob Yes, it is likely that you will run into edge cases which need to be accounted for. This excludes the desktop window, desktop listview, and program manager from being disabled. Code:sp.CreateTimer("Full Screen Check",
0, //start delay (immediate)
500, //interval, checks every 500 milliseconds
`var fgWindow = sp.ForegroundWindow();
var screen = fgWindow.Screen;
if(fgWindow.HWnd != sp.DesktopWindow().HWnd
&& fgWindow.HWnd != sp.DesktopWindowListView().HWnd
&& fgWindow.ClassName != "Progman"
&& screen.Bounds.Left == fgWindow.Rectangle.Left
&& screen.Bounds.Right == fgWindow.Rectangle.Right
&& screen.Bounds.Top == fgWindow.Rectangle.Top
&& screen.Bounds.Bottom == fgWindow.Rectangle.Bottom) {
sp.DisableCapture();
} else {
sp.EnableCapture();
}`
);
Ok, now almost all the problems are solved.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
You might want to try this, just as a safety precaution due to some transitional periods between apps or apps which are closed just at a time before the script runs. This adds a try/catch, so if there is any script failure, it defaults to enabling capture. Code:sp.CreateTimer("Full Screen Check",
0, //start delay (immediate)
500, //interval, checks every 500 milliseconds
`var fgWindow = sp.ForegroundWindow();
var screen = fgWindow.Screen;
try {
if(fgWindow.HWnd != sp.DesktopWindow().HWnd
&& fgWindow.HWnd != sp.DesktopWindowListView().HWnd
&& fgWindow.ClassName != "Progman"
&& screen.Bounds.Left == fgWindow.Rectangle.Left
&& screen.Bounds.Right == fgWindow.Rectangle.Right
&& screen.Bounds.Top == fgWindow.Rectangle.Top
&& screen.Bounds.Bottom == fgWindow.Rectangle.Bottom) {
sp.DisableCapture();
} else {
sp.EnableCapture();
}
} catch(err) {
sp.EnableCapture();
}`
);
|
|
|
|
Rank: Newbie
Groups: Approved
Joined: 10/21/2019(UTC) Posts: 7 Location: 湖北
|
Originally Posted by: Rob You might want to try this, just as a safety precaution due to some transitional periods between apps or apps which are closed just at a time before the script runs. This adds a try/catch, so if there is any script failure, it defaults to enabling capture. Code:sp.CreateTimer("Full Screen Check",
0, //start delay (immediate)
500, //interval, checks every 500 milliseconds
`var fgWindow = sp.ForegroundWindow();
var screen = fgWindow.Screen;
try {
if(fgWindow.HWnd != sp.DesktopWindow().HWnd
&& fgWindow.HWnd != sp.DesktopWindowListView().HWnd
&& fgWindow.ClassName != "Progman"
&& screen.Bounds.Left == fgWindow.Rectangle.Left
&& screen.Bounds.Right == fgWindow.Rectangle.Right
&& screen.Bounds.Top == fgWindow.Rectangle.Top
&& screen.Bounds.Bottom == fgWindow.Rectangle.Bottom) {
sp.DisableCapture();
} else {
sp.EnableCapture();
}
} catch(err) {
sp.EnableCapture();
}`
);
ok!
|
|
|
|
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)
|
Does it update to the vision 0.3.8.9? I find a selection box to disable the gesture if full-screen.
|
|
|
|
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