Title

Message

Confirm

Want to earn a free ClipboardFusion Pro license? We're looking for ClipboardFusion translators!
<< DiscussionsReply

How to make a Macro paste a pinned item

Avatar from Gravatar.com
Leon André Bergman
41 discussion posts
I am in the process of setting up macros that navigate between text boxes.
Most of them I can use the BFS.Clipboard.PasteText for, but I have 1 field that changes, and it's a date/time field.
So I decided to set up a pinned item in the #1 slot, with the date and time I want to use every time the macro is run.
So if the date changes, I just change the pinned item, not the macro.

I assumed I could use one of the BFS.ClipboardFusion statements to do this, but if I use BFS.ClipboardFusion.GetLocalPinnedText(1); my current clipboard item is not updated. When I try to paste, it just pastes what ever I had copied before I ran the macro.

How can I make this work?

Alternatively, is there a way where I can just get the date, and set it to say 4 days from now, and paste that?
Jan 16, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
To get the pinned text in the first slot you need to use index 0, and you have to call BFS.Clipboard.SetText, like so:

BFS.Clipboard.SetText(BFS.ClipboardFusion.GetLocalPinnedText(0));


You can get the date in a macro as well. What format do you need the date to be in?
Jan 16, 2019  • #2
Avatar from Gravatar.com
Leon André Bergman
41 discussion posts
dd.mm.yy and if possible hh:mm:ss but not essential.
29 days ago  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, try this out:

Code

29 days ago  • #4
Avatar from Gravatar.com
Leon André Bergman
41 discussion posts
Nice. This works. Thank you for your help.
29 days ago  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, glad we could help!
29 days ago  • #6
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply