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

Notification

Icon
Error

Options
Go to last post Go to first unread
Aquamarine  
#1 Posted : Friday, April 12, 2024 9:29:41 AM(UTC)
Aquamarine

Rank: Newbie

Reputation:

Groups: Approved
Joined: 4/11/2024(UTC)
Posts: 2

Thanks: 1 times
I'm trying to register a conditional statement gesture and I'm looking for advice on how to write a script. If I import what's in the old version as it is, I get an error..
How do I set the "^%{pgdn}" combination key if it's 150 or higher when I draw a downward vertical stroke, and "^v" if it's 150 or lower?
If you look at the control & flow tab in the steps step, there are many different types of ifs. I was wondering if it was related to adding something like this
Rob  
#2 Posted : Friday, April 12, 2024 12:27:35 PM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 28 times
Was thanked: 420 time(s) in 357 post(s)
Code:
if(action.Start.Y > 150) {
    // Ctrl + Alt + Page Down)
    sp.SendModifiedVKeys([vk.LCONTROL,vk.LMENU], [vk.NEXT]);
} else {
    // Ctrl + V
    sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_V]);
}

I used the Insert Hotkey button in the script editor to add the keystrokes.

Edited by user Friday, April 12, 2024 5:06:36 PM(UTC)  | Reason: Not specified

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.