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

Notification

Icon
Error

Options
Go to last post Go to first unread
Zorglub  
#1 Posted : Monday, July 5, 2021 11:49:30 AM(UTC)
Zorglub

Rank: Newbie

Reputation:

Groups: Approved
Joined: 11/5/2020(UTC)
Posts: 2
Canada
Location: Toronto

Thanks: 1 times
Hi S+ skilled users,
I've been using S+ basic functions for a while and there is something I can't get to work :

I would like to have [PAGE DOWN] virtual key continuously pressed while I keep the X1 mouse button down, for instance.

Some sort of :

While( sp.ConsumePhysicalInput(true); )
{
sp.SendVKeyDown(vk.NEXT);
sp.Sleep(87);
sp.SendVKeyUp(vk.NEXT);
}
} else {
sp.ConsumePhysicalInput(false);
}

Please, whoever answers, be clear (for all beginners !) about what to fill :
Steps ? Script ?
As I didn't quite clear things up...

Thank you !
Rob  
#2 Posted : Monday, July 5, 2021 12:41:35 PM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 22 times
Was thanked: 284 time(s) in 247 post(s)
Try this.
Code:
// I have this under Global Actions > Mouse Events > X1 Click
// I also have the Consume Click Event box checked so the button
// doesn't get sent to applications
if(click.Down)
{
    // If this is the X1 button down event (not up/release)
    // 0 = start immediately
    // 100 = execute the script (Page Down) every 100 milliseconds
    sp.CreateTimer("PageDown", 0, 100, `sp.SendVKey(vk.NEXT);`); 
}
else
{
    //Release, stop timer
    sp.DeleteTimer("PageDown"); 
}
thanks 1 user thanked Rob for this useful post.
Zorglub on 7/5/2021(UTC)
Zorglub  
#3 Posted : Monday, July 5, 2021 1:32:47 PM(UTC)
Zorglub

Rank: Newbie

Reputation:

Groups: Approved
Joined: 11/5/2020(UTC)
Posts: 2
Canada
Location: Toronto

Thanks: 1 times
Oh man thank you !!!
I dare not say for how long I've been trying...

A little note for Logitech users: we have to install the 'kind of mandatory' Logi Options software.
=> to have the scripts to work you must keep defaults settings.
X1 and X2 to back / forward for instance.

Will keep fooling around scripts, hope I will publish something useful here someday.

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