ShareShortcuts

Virtual Clipboard

A virtual clipboard, as said in the title

daboy
Fork “Virtual Clipboard”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so daboy gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
50K
Saved
2
Actions
40
Category
Productivity
Version
1.0
Language
EN

Preview

A virtual clipboard, as said in the title. You can save text or your clipboard to this shortcut and it will save, almost like you have two clipboards! More in the tutorial. This is a BETA version, it will be updated. Currently v1.1. Read my comment below if you don’t understand.

What's New

Version 1.0

First release

Version History
1.0 Jun 14, 2021

First release

What it does

40 actions
  1. Number
  2. Get File
  3. Count
  4. If
  5. Show Alert
  6. Text
  7. Save File
  8. If
  9. Text
  10. Set Variable
    VirCli
  11. Choose from Menu
    Do you want to save your clipboard, save custom text or not save at all?
  12. Choose from Menu
    Save clipboard
  13. Save File
  14. Choose from Menu
    Save custom text
  15. Ask for Input
    What do you want to save?
  16. Save File
  17. Choose from Menu
    Don’t save
  18. Nothing
  19. Count
  20. If
  21. Choose from Menu
    The text saved earlier is too long to be displayed here. You can view it in a .txt file, copy it, or just exit the shortcut.
  22. Choose from Menu
    Copy
  23. Copy to Clipboard
  24. Choose from Menu
    View
  25. Quick Look
  26. Show Alert
  27. Copy to Clipboard
  28. Choose from Menu
    Exit
  29. Stop This Shortcut
  30. If
  31. Choose from Menu
    The text you saved earlier is "…". You can copy this text, view it in a .txt file, or exit the shortcut.
  32. Choose from Menu
    Copy
  33. Copy to Clipboard
  34. Quick Look
  35. Choose from Menu
    View
  36. Show Alert
  37. Copy to Clipboard
  38. Choose from Menu
    Exit
  39. Stop This Shortcut
  40. Stop This Shortcut

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#include 'actions/sharing'
#include 'actions/documents'
#define color purple
#define glyph walletPass

const MaximumCharacters = 30
const File = getFileFromFolder(, "VirtualClipboard.txt", false)
const Count = count(File)

if Count == 0 {
	alert("Hi, I see you're new to this shortcut (or deleted the data.) It simply gets your clipboard, and then it saves that text so that you can almost have two clipboards! \nThis is BETA, it will be updated. Currently v1.1. 📋", "")
	const Text = "Text"
	saveFile("VirtualClipboard.txt", Text, true)
} else {
	@VirCli = "{File}"
	menu "Do you want to save your clipboard, save custom text or not save at all? " {
	item "Save clipboard":
		saveFile("VirtualClipboard.txt", true)
	item "Save custom text":
		const ProvidedInput = prompt("What do you want to save?")
		saveFile("VirtualClipboard.txt", ProvidedInput, true)
	item "Don’t save":
	}
	const Count1 = count(@VirCli, "Characters")
	if Count1 >= MaximumCharacters {
		menu "The text saved earlier is too long to be displayed here. You can view it in a .txt file, copy it, or just exit the shortcut." {
		item "Copy":
			setClipboard(@VirCli)
		item "View":
			quicklook(@VirCli)
			confirm("Copy?")
			setClipboard(@VirCli)
		item "Exit":
			stop()
		}
	} else {
		menu "The text you saved earlier is \"{@VirCli}\". You can copy this text, view it in a .txt file, or exit the shortcut." {
		item "Copy":
			setClipboard(@VirCli)
			quicklook(@VirCli)
		item "View":
			confirm("Copy?")
			setClipboard(@VirCli)
		item "Exit":
			stop()
		}
	}
}
stop()
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by daboy

See All

You Might Also Like

See All
Advertisement