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

Notification

Icon
Error

Options
Go to last post Go to first unread
mesersmith  
#1 Posted : Wednesday, November 2, 2022 2:53:45 PM(UTC)
mesersmith

Rank: Member

Reputation:

Groups: Approved
Joined: 2/8/2022(UTC)
Posts: 18
Romania
Location: calarasi

Thanks: 2 times
In old SP i use this code:


--acSendKeys("^{PLUS}")
local WM_MOUSEWHEEL = 0x20A
local WHEEL_POS = 0x00780000 --standard 120 tick of a mouse wheel scroll up, pre-left-shifted for simplifying usage below
local WHEEL_NEG = 0xff880000 --standard -120 tick of a mouse wheel scroll down, pre-left-shifted for simplifying usage below
local MK_CONTROL = 0x08
--Control + Scroll Up
acPostMessage(acGetWindowByPoint(gsx, gsy), WM_MOUSEWHEEL, WHEEL_POS+MK_CONTROL, bit32.lshift(gsy,16)+gsx)


--acSendKeys("^{SUB}")

local WM_MOUSEWHEEL = 0x20A
local WHEEL_POS = 0x00780000 --standard 120 tick of a mouse wheel scroll up, pre-left-shifted for simplifying usage below
local WHEEL_NEG = 0xff880000 --standard -120 tick of a mouse wheel scroll down, pre-left-shifted for simplifying usage below
local MK_CONTROL = 0x08
--Control + Scroll Up
acPostMessage(acGetWindowByPoint(gsx, gsy), WM_MOUSEWHEEL, WHEEL_NEG+MK_CONTROL, bit32.lshift(gsy,16)+gsx)



Can anybody help me with a script for new SP?
The gesture is: Z with right click pressed and weel up or down.
Rob  
#2 Posted : Thursday, November 3, 2022 1:02:38 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)
These would be the equivalent scripts:
Code:
//Control + Scroll Up
var WM_MOUSEWHEEL = 0x20A;
var WHEEL_POS = 0x00780000; //standard 120 tick of a mouse wheel scroll up, pre-left-shifted for simplifying usage below
var WHEEL_NEG = 0xff880000; //standard -120 tick of a mouse wheel scroll down, pre-left-shifted for simplifying usage below
var MK_CONTROL = 0x08;
sp.WindowFromPoint(action.Start, false)
    .PostMessage(WM_MOUSEWHEEL, 
                 new System.IntPtr(WHEEL_POS+MK_CONTROL), 
                 new System.IntPtr((action.Start.Y << 16) + action.Start.X));



//Control + Scroll Down
var WM_MOUSEWHEEL = 0x20A;
var WHEEL_POS = 0x00780000; //standard 120 tick of a mouse wheel scroll up, pre-left-shifted for simplifying usage below
var WHEEL_NEG = 0xff880000; //standard -120 tick of a mouse wheel scroll down, pre-left-shifted for simplifying usage below
var MK_CONTROL = 0x08;
sp.WindowFromPoint(action.Start, false)
    .PostMessage(WM_MOUSEWHEEL, 
                 new System.IntPtr(WHEEL_NEG+MK_CONTROL), 
                 new System.IntPtr((action.Start.Y << 16) + action.Start.X));
thanks 1 user thanked Rob for this useful post.
mesersmith on 11/3/2022(UTC)
mesersmith  
#3 Posted : Thursday, November 3, 2022 1:38:14 PM(UTC)
mesersmith

Rank: Member

Reputation:

Groups: Approved
Joined: 2/8/2022(UTC)
Posts: 18
Romania
Location: calarasi

Thanks: 2 times
Zoom+ works great, zoom- does not work at all.
Rob  
#4 Posted : Thursday, November 3, 2022 1:59:27 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)
Weird, it works for me.

Are you on a 64-bit system?
mesersmith  
#5 Posted : Thursday, November 3, 2022 2:03:29 PM(UTC)
mesersmith

Rank: Member

Reputation:

Groups: Approved
Joined: 2/8/2022(UTC)
Posts: 18
Romania
Location: calarasi

Thanks: 2 times
I figure it out. Thank you!
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.