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

Notification

Icon
Error

Options
Go to last post Go to first unread
Alan123  
#1 Posted : Wednesday, February 5, 2020 1:05:31 PM(UTC)
Alan123

Rank: Newbie

Reputation:

Groups: Approved
Joined: 2/5/2020(UTC)
Posts: 4
Hong Kong

Thanks: 1 times
Hi Rob

Struggling with the new version.

I am trying to use function keys, for instance - GOTO A5 in Excel

I tried this but doesn't seem to work:
sp.SendKeys("{F5}");
sp.SendString("F5");

I've also tried sp.SendVKey(vk.F5)

Thanks
Rob  
#2 Posted : Wednesday, February 5, 2020 2:31: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)
Hmm, I just put this into an action an drew the gesture on Excel, it opened the Go To dialog:
Code:
sp.SendVKey(vk.F5);

Is Excel the active window?
Are you using a keyboard language/layout other than English?
Can you test F5 in another application, like a web browser?
thanks 1 user thanked Rob for this useful post.
Alan123 on 2/6/2020(UTC)
Alan123  
#3 Posted : Thursday, February 6, 2020 1:32:28 AM(UTC)
Alan123

Rank: Newbie

Reputation:

Groups: Approved
Joined: 2/5/2020(UTC)
Posts: 4
Hong Kong

Thanks: 1 times
Thanks for the quick reply!
Also, very many thanks for producing StrokesPlus. I have been using v1 for many years and it (along with AHK) has greatly improved productivity.

I wasn't thinking through the whole gesture action!

I realised that Excel took note of the modifier!!!
I changed the gesture, which used modifier like SHIFT or ALT to without.

BTW why does using the gesture on the desktop send some beep along with pop up with the right-click menu?
Right-click on its own doesn't beep.

Another thing, it's an annoyance due to scaling by Windows 10 on my Surface Pro 7 and some items are unreadable - e.g. in Steps. I can't read the hotkey in the box "Press Key(s) below".

Edited by user Thursday, February 6, 2020 1:35:00 AM(UTC)  | Reason: Not specified

Rob  
#4 Posted : Thursday, February 6, 2020 3:50:54 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)
Ah yeah, having a modifier key can affect things like that. Note that you can also try leaving the modifier and before you send F5, send the appropriate up key event, e.g. sp.SendVKeyUp(vk.SHIFT); (you may need to try vk.LSHIFT and/or vk.RSHIFT). This often works fine as then Excel wouldn't see the key as being pressed, not currently at my computer to test that, though. Might also need to add a sp.Sleep(20) call before F5 to give it some time to process.

Re: beep - Check Options > Advanced > Play Sound on No Match - that's likely what you're hearing. It also means there's no match found, so you might look into what you're trying to draw and why it's not matching.

Re: Scaling - Yeah, DPI sucks and I naively thought WinForms would gracefully handle it when I first started the rewrite; I never thought to check it. Apparently, WPF will handle this gracefully but over 60% of the StrokesPlus.net code is actually the UI, so it's a gargantuan effort to essentially rewrite the app again. But I can revisit the Steps UI and see if there are any hacks I can put in place to at least make it useable.

Edited by user Thursday, February 6, 2020 3:51:41 AM(UTC)  | Reason: Not specified

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.