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

Notification

Icon
Error

Options
Go to last post Go to first unread
ligang  
#1 Posted : Saturday, December 5, 2020 4:16:53 PM(UTC)
ligang

Rank: Newbie

Reputation:

Groups: Approved
Joined: 4/18/2019(UTC)
Posts: 1
China

I am a loyal fan. I used Strokesplus before. First switch to Strokesplus.net. I found that secondary gestures are a very good feature. I really like it. I defined the middle mouse button. But there are some problems. For example, some software needs to move with the middle mouse button.
This will draw the secondary gesture. And this is not what I need. The current method is after opening the specific software. Disable secondary gestures first. After the software is used up, turn on the secondary gestures. Is there any way to disable secondary gestures in some specific applications.
Rob  
#2 Posted : Saturday, December 5, 2020 5:10:44 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
You can use the Global Actions > Window Events > Foreground Window Change to control things based on the application which gains focus.

For example, this disabled the secondary stroke button if Chrome is the foreground window, otherwise the middle button is set to the secondary stroke button.
Code:
//If Chrome is the foreground (active) window, 
//disable secondary, otherwise set middle mouse as secondary stroke button
if(sp.ForegroundWindow().Process.MainModule.ModuleName == "chrome.exe"){
    sp_config.SecondaryStrokeButton = MouseButtons.None;
} else {
    sp_config.SecondaryStrokeButton = MouseButtons.Middle;
}
Kenqr  
#3 Posted : Wednesday, January 12, 2022 3:29:58 AM(UTC)
Kenqr

Rank: Newbie

Reputation:

Groups: Approved
Joined: 1/11/2022(UTC)
Posts: 3

Thanks: 2 times
This works, but I get this error dialog every time I minimize any window or unlock windows:


Quote:


Scripting Engine Failure

Script execution failed.

Error: Unable to enumerate the process modules.
at Script [18]:7:33 -> if(sp.ForegroundWindow().Process.MainModule.ModuleName == "edge.exe"){



Since disabling right key gesture in games is a common usage, can you add an per application setting to disable one of the stroke buttons?

Edited by user Wednesday, January 12, 2022 3:33:18 AM(UTC)  | Reason: Not specified

Rob  
#4 Posted : Wednesday, January 12, 2022 2:36:03 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Try 0.5.5.6 - I added new properties (.ExecutableName & .ExecutablePath) which use the internal methods for getting EXE name/path.
These methods are more resilient and try more than one approach to obtaining the EXE name/path.

Note that there can still be instances where S+ cannot obtain the EXE info due to security, in that case these properties will just return an empty string (but no error).
Code:
//If Chrome is the foreground (active) window, 
//disable secondary, otherwise set middle mouse as secondary stroke button
if(sp.ForegroundWindow().ExecutableName == "chrome.exe"){
    sp_config.SecondaryStrokeButton = MouseButtons.None;
} else {
    sp_config.SecondaryStrokeButton = MouseButtons.Middle;
}
thanks 1 user thanked Rob for this useful post.
Kenqr on 1/19/2022(UTC)
Kenqr  
#5 Posted : Wednesday, January 19, 2022 3:04:37 AM(UTC)
Kenqr

Rank: Newbie

Reputation:

Groups: Approved
Joined: 1/11/2022(UTC)
Posts: 3

Thanks: 2 times
There are no error dialogs now, thanks.

Quote:
Since disabling right key gesture in games is a common usage, can you add an per application setting to disable one of the stroke buttons?

Did you see this part of my previous post?
When I was using the old (not .net) version, I used to add every single game to the ignore list.
I can use the script to change the stroke buttons now, but it would be nice if we can configure the stroke buttons for each application.
Rob  
#6 Posted : Thursday, January 20, 2022 7:02:04 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
I did see it, but it's not something I'll be adding soon, since it's a bit complicated internally and my time is limited.
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.