Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Haitham
12 discussion posts
Hi,
I made this custom script here, the problem is that I have to release the key combination which is (Win+/) to execute the script, But when I use the built in function (Move Window to Next Monitor) with the same key combination which is (Win+/) I can keep holding (Win) key and only release (/) key and it will work, Also, while holding (Win) key and keep pressing (/) key again and again the script will execute each time.

Why is it not doing that with my custom script?

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Trigger target when run by a Trigger rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        BFS.Input.SendKeys("+({WIN}({VK_37}))");

    }
}
• Attachment: Annotation 2020-04-30 230611.jpg [124,213 bytes]
Annotation 2020-04-30 230611.jpg
Annotation 2020-04-30 230611.jpg
Apr 30, 2020  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I think we may do this intentionally so that the held modifier key doesn't mess up the SendKeys. I will check in with our developers though and keep you posted on what I find out.
May 1, 2020  • #2
User Image
Haitham
12 discussion posts
Yes please, Thank you for the fast response :)
May 2, 2020  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Quick update here. This is indeed intentional, so that the held keys don't mess up the sendkeys in the script. We're looking to see if we can add a new function, something like "SendKeysNoWait" that would allow you to override that functionality.
May 8, 2020  • #4
User Image
Haitham
12 discussion posts
Quote:
Quick update here. This is indeed intentional, so that the held keys don't mess up the sendkeys in the script. We're looking to see if we can add a new function, something like "SendKeysNoWait" that would allow you to override that functionality.


Looking forward to it, Thanks :)
May 8, 2020  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We've just released a new DisplayFusion beta version and it now includes a BFS.Input.SendKeysWithoutWait function for this :)

Thanks!
May 15, 2020  • #6
User Image
Haitham
12 discussion posts
Thank you so much :)
May 15, 2020  • #7
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)