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

Notification

Icon
Error

Options
Go to last post Go to first unread
tefo_d  
#1 Posted : Sunday, December 5, 2021 10:02:26 AM(UTC)
tefo_d

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/5/2021(UTC)
Posts: 6
Germany

Thanks: 3 times
Hi,
thanks for this great piece of program. Playing around with scripts and try to implement my workflow (currently with Displayfusion) into StrokesPlus :)

Can it be evaluated in Global Actions\Mouse Events\Release - if there was no gesture has been detected?
Background:
I want to 'abuse' the stroke button for a default action (e.g. center window to middle of screen),
if there was no gesture has been detected (while keeping the existing gestures).

I know, that this can be done with easily with a gesture - but just click/release is much easier instead.
Greetings..

Edited by user Sunday, December 5, 2021 12:37:43 PM(UTC)  | Reason: added: keeping the gestures

randomConstant  
#2 Posted : Sunday, December 5, 2021 2:09:18 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Hi, I'm no expert but here's what I think..

It might be technically possible with some tweaks/settings but that will most likely come with serious performance and usability issues, every time mouse button is clicked (which is many many times for a normal user), that action will be triggered which seems redundant.

Here are my tips which might help:
  1. If every button click is going to trigger that action and those clicks are most likely going to be at random intervals then its better to create a loop or a timer for that action at that point.
  2. If effort-to-draw-gesture is the issue then even a simple drag-mouse-down gesture or a rocker combination (click left then right mouse button in a flow or vice versa, see sample rocker script for details) will be better, two clicks instead of one.


I do not know which use case might end up needing a default or fallback action but most likely that will end up getting triggered more than required and depending on the action might hinder whatever the user is doing.

Welcome to S+ community and congrats on having a usable Windows now BigGrin
thanks 1 user thanked randomConstant for this useful post.
tefo_d on 12/5/2021(UTC)
tefo_d  
#3 Posted : Sunday, December 5, 2021 3:16:01 PM(UTC)
tefo_d

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/5/2021(UTC)
Posts: 6
Germany

Thanks: 3 times
I am using the X1/X2 Buttons for the primary/secondary strike buttons. I guess, that this will not lead to an performance issue - due I am not using the usual mouse buttons.
As mentioned in another topic, the rocker thing helps here as well - with the capture modifier "either" - i can combine my strike with the right button etc. This is handsome and fast.
Thanks!
randomConstant  
#4 Posted : Sunday, December 5, 2021 4:17:35 PM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Glad to know, although the discussion is now split in two posts much like rockers Laugh I am curious about what kind of action needed to be performed so often Mellow

Also just a personal taste thing, I've found using X1/X2 or other non-traditional buttons for gestures can be tricky. They can cause unusual stress on thumb or create usability issues when, lets say you are working on another machine with a traditional mouse. and if you think working without S+ will be manageable on other machines wait till you need to quickly copy and paste or switch applications on them LOL

If you're used to them then its best but I would personally recommend sticking to right mouse button when introducing S+ to new comers.

Enjoy S+ Laugh
thanks 1 user thanked randomConstant for this useful post.
tefo_d on 12/6/2021(UTC)
tefo_d  
#5 Posted : Monday, December 6, 2021 5:46:35 AM(UTC)
tefo_d

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/5/2021(UTC)
Posts: 6
Germany

Thanks: 3 times
Quote:
I am curious about what kind of action needed to be performed so often

I am an efficiency freak. On a 43" 4k Monitor the most often performed thing is moving and resizing of application windows.
Besides of moving the windows top bottom-left, bottom-right, upper-left etc. the most common thing is centering a
window to the middle of the screen and resizing it. If I need to be focused to a web page for example, it helps if this
windows stays in the middle of the screen with an appropriate size.

The last years I used DisplayFusion and shortcuts for that. But I missed this feature with mouse-only.
I am happy, that this can now done with StrokesPlus.

Centering & Resizing can be done without script and with the steps easily.
This one I am going to place to the double click rocker thing for example
Code:
//this script divides the monitor screen into 4 areas
//it checks where the center of the focused window is currently located
//and resizes and moves it to the corresponding next area

// Split screen into 2 columns, 1 row (50/50 in the middle)
var screenRegions = sp.GetRegions(action.Window.Screen.WorkingArea, 2, 2);
// Get the column Rectangles of two columns and two rows
var leftColTop = Rectangle.Round(screenRegions.First(r => r.Column == 1 && r.Row == 1).Rect);
var rightColTop = Rectangle.Round(screenRegions.First(r => r.Column == 2 && r.Row == 1).Rect);
var leftColBottom = Rectangle.Round(screenRegions.First(r => r.Column == 1 && r.Row == 2).Rect);
var rightColBottom = Rectangle.Round(screenRegions.First(r => r.Column == 2 && r.Row == 2).Rect);

var appWnd = sp.ForegroundWindow();
var appRect = appWnd.Rectangle;
var appWidthCenter = appRect.X + Math.round(appRect.Width / 2);
var appHeightCenter = appRect.Y + Math.round(appRect.Height / 2);
var screenWidthCenter = Math.round(action.Window.Screen.Bounds.Width / 2);
var screenHeightCenter = Math.round(action.Window.Screen.Bounds.Height / 2);

switch (true) {
    case (appWidthCenter <= screenWidthCenter && appHeightCenter < screenHeightCenter):
        action.Window.Rectangle = rightColTop;
        break;
    case (appWidthCenter >= screenWidthCenter && appHeightCenter <= screenHeightCenter):
        action.Window.Rectangle = rightColBottom;
        break;
    case (appWidthCenter >= screenWidthCenter && appHeightCenter >= screenHeightCenter):
        action.Window.Rectangle = leftColBottom;
        break;
    case (appWidthCenter <= screenWidthCenter && appHeightCenter >= screenHeightCenter):
        action.Window.Rectangle = leftColTop;
        break;
}


Quote:
I would personally recommend sticking to right mouse button when introducing S+ to new comers.


You are right. Right button is more comfortable and better for the thumb than X1 or X2; but the right button is been used as well for drag & drop in windows or in some applications.
randomConstant  
#6 Posted : Monday, December 6, 2021 8:57:28 AM(UTC)
randomConstant

Rank: Advanced Member

Reputation:

Groups: Translators, Approved
Joined: 7/17/2021(UTC)
Posts: 135

Thanks: 35 times
Was thanked: 18 time(s) in 15 post(s)
Blink

Makes sense, especially since X1/X2 are not used anywhere else that often.

Glad you got it working with S+ :)
Users browsing this topic
Guest
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.