Variables are extremely simple in the Jelly language, however they do have some quirks inherited from Shortcuts.
Referencing Variables
airdrop(file: Shortcut Input)
// Here we used a Global variable for the parameter.
airdrop(file: MyFilteredImage)
// Here we are using a local variable for the parameter.
var •var name• = •magic variable | global variable•
function() ->[name]
->[•name•]
${Variable Name}
within any string that excepts in text variables." Hello ${world name}!"
A Jellycut is just a shortcut written in the Jelly Language
import Shortcuts 1090.2
to the top of your file.import Shortcuts 1090.2
var sc = Shortcut input
setClipboard(variable: sc)
import Shortcuts 1090.2
var sc = Shortcut input
if(sc .contains " Hello World" ) {
setClipboard(variable: sc)
}
import Shortcuts 1090.2
var sc = Shortcut input
if(sc .contains " iCloud" ) {
setClipboard(variable: sc)
} else {
alert(message: " Your clipboard does not contain the phrase Hello World" )
}
import Shortcuts 1090.2
var sc = Shortcut input
if(sc .contains " iCloud" ) {
setClipboard(variable: sc)
sendNotification(body: "${sc} copied to clipboard" , title: " Successfully copied to clipboard" )
} else {
alert(message: " Your clipboard does not contain the phrase Hello World" )
}