Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
a380330520
32 discussion posts
I want to use the trigger to trigger a certain condition after a condition, automatically perform macros to trigger the combination shortcut.

Ctrl + O
Shift + z This kind of combination shortcut button, how do you want to get the macro? I still don't understand this post.
Ask the developer to help me thank you

https://www.clipboardfusion.com/Discussions/View/how-to-create-macros-that-emulate-keystrokes/?ID=30539153-9084-46dc-b0d4-80e1fb9e860ahttps://www.clipboardfusion.com/Discussions/View/how-to-create-macros-that-emulate-keystrokes/?ID=30539153-9084-46dc-b0d4-80e1fb9e860a
Sep 20, 2021 (modified Sep 20, 2021)  • #1
User Image
a380330520
32 discussion posts
using System;
using System.Collections.Generic;

// The 'text' parameter will contain the text from the:
// - Current Clipboard when run by HotKey
// - History Item when run from the History Menu
// The returned string will be:
// - Placed directly on the Clipboard
// - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
//for more key codes, check out this website:
//https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys(v=vs.110).aspx


BFS.Input.SendKeys("{ctrl}");
BFS.Input.SendKeys("{o}");

//tell ClipboardFusion to ignore the result of this macro
return null;
}
} I copied the code in that post and then this change didn't take effect.
Sep 20, 2021  • #2
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Holding modifier keys is a little bit different. Relevant text from the article that's linked in the macro comment:

Quote:
To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".


So if you want to do Ctrl + O, you can do this:
BFS.Input.SendKeys("^O")


And Shift + Z would be:
BFS.Input.SendKeys("+Z")


Hope that helps!
Sep 20, 2021  • #3
User Image
a380330520
32 discussion posts
Quote:
Holding modifier keys is a little bit different. Relevant text from the article that's linked in the macro comment:
Quote:
To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".

So if you want to do Ctrl + O, you can do this:
BFS.Input.SendKeys("^O")

And Shift + Z would be:
BFS.Input.SendKeys("+Z")

Hope that helps!

Hey I love you Dear developer
thank you very much
Perfect
Sep 24, 2021  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Glad to hear that worked for you!
Sep 24, 2021  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)