ShareShortcuts

Shortcuts Coding Language (BETA)

coltensus
Fork “Shortcuts Coding Language (BETA)”

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 coltensus 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
7K
Saved
0
Actions
177
Category
Utilities
Version
1.5
Language
EN

Ever wanted to type in text like coding instead of using blocks to create shortcuts well now you can

Credits:

Nacho_Libre/Cost_Internal (https://www.reddit.com/u/Cost_Internal) - Helped me remodified the shortcut, and added If, Show Notification, and Show Alert

What's New

Version 1.5

Bug Fixes

Version History
1.291 Mar 24, 2026

Fixed Start Workout | Nacho_Libre/Cost_Internal (https://www.reddit.com/u/Cost_Internal)

1.289 Mar 24, 2026

Fixed Credits

1.281 Mar 23, 2026

Removed Ask for Text

1.277 Mar 23, 2026

Bug Fixes

1.271 Mar 23, 2026

Updated Instructions

1.27 Mar 23, 2026

Updated Instructions

1.21 Mar 23, 2026

Bug Fixes and Improvements

1.5 Mar 24, 2026

Bug Fixes

1.4 Mar 24, 2026

Fixed

1.3 Mar 24, 2026

Added 2 New Actions

1.2 Mar 23, 2026

Added 5 New Actions and fixed Number Action

1.1 Mar 22, 2026

Fixed Credits

1.0 Mar 22, 2026

First release

What it does

177 actions
  1. Text
  2. Text
  3. Text
  4. Split Text
  5. Repeat with Each
  6. If
  7. Split Text
  8. Get Item from List
  9. Split Text
  10. Get Item from List
  11. Text
  12. Run Shortcut
    Condensed Shortcuts Coding Language (ALPHA)
  13. Get Item from List
  14. If
  15. Get Item from List
  16. If
  17. Get Item from List
  18. Text
  19. Run Shortcut
    Condensed Shortcuts Coding Language (ALPHA)
  20. Split Text
  21. Trim Whitespace
  22. Get Item from List
  23. Set Variable
    Function
  24. Count
  25. If
  26. Get Item from List
  27. Set Variable
    Condition
  28. If
  29. Set Variable
    Condition
  30. If
  31. Get Item from List
  32. Get Item from List
  33. If
  34. Show Notification
    …
  35. If
  36. Show Alert
    …
  37. If
  38. Get Item from List
  39. If
  40. Get Item from List
  41. Get Item from List
  42. If
  43. Set Focus
  44. If
  45. If
  46. Get Item from List
  47. Get Item from List
  48. If
  49. Adjust Date
  50. If
  51. Adjust Date
  52. Set Focus
  53. If
  54. Set Focus
  55. If
  56. Stop This Shortcut
  57. If
  58. If
  59. Get Item from List
  60. Wait
  61. If
  62. Wait
  63. If
  64. Wait to Return
  65. If
  66. Get Item from List
  67. Number
  68. If
  69. Get Clipboard
  70. If
  71. Dismiss Siri
  72. If
  73. Scan QR/Barcode
  74. If
  75. Support
    com.apple.store.Jolly
  76. If
  77. Reset Cellular Data Statistics
    com.apple.ShortcutsActions
  78. If
  79. Get Hotspot Password
  80. If
  81. Go to Home Screen
  82. If
  83. Lock Screen
  84. If
  85. Take Screenshot
  86. If
  87. Nothing
  88. If
  89. Get Orientation
    com.apple.ShortcutsActions
  90. If
  91. Vibrate Device
  92. If
  93. A X Start Guided Access
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  94. If
  95. A X Start Magnifier
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  96. If
  97. Get Current Focus
  98. If
  99. A X Start Remote Watch Screen
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  100. If
  101. A X Start Speak Screen
    com.apple.AccessibilityUtilities.AXSettingsShortcuts
  102. If
  103. Workout End
  104. If
  105. Open Reader
    com.apple.Magnifier
  106. If
  107. C O S Get Current Gizmo Face
    com.apple.PBBridgeSupport.BridgeIntents
  108. If
  109. Track Order
    com.apple.store.Jolly
  110. If
  111. Recommended I Phone
    com.apple.store.Jolly
  112. If
  113. Compare I Phone
    com.apple.store.Jolly
  114. If
  115. Open Sleep Schedule
    com.apple.Health
  116. If
  117. Get Physical Activity
    com.apple.ShortcutsActions
  118. If
  119. Refresh All Widgets
    dk.simonbs.Scriptable
  120. If
  121. Add Quick Reminder
  122. If
  123. Get On-Screen Content
  124. If
  125. View Air Pods
    com.apple.store.Jolly
  126. If
  127. Upgrade I Phone
    com.apple.store.Jolly
  128. If
  129. Get Item from List
  130. If
  131. Get Item from List
  132. Run Shortcut
  133. If
  134. Run Shortcut
  135. If
  136. Posters Get
  137. If
  138. Posters Get
  139. If
  140. Get Item from List
  141. If
  142. Get Item from List
  143. Get Item from List
  144. If
  145. Workout Start
  146. If
  147. If
  148. Workout Start
  149. If
  150. Workout Start
  151. If
  152. Workout Start
  153. If
  154. Text
  155. Quick Look
  156. If
  157. Get Item from List
  158. Get Device Details
  159. If
  160. Get Item from List
  161. Trim Whitespace
  162. If
  163. Get Item from List
  164. Extract Text from Image
  165. If
  166. Get Item from List
  167. Date
  168. If
  169. Text
  170. Quick Look
  171. If
  172. Get Item from List
  173. AirDrop
  174. If
  175. Get Item from List
  176. Set AirDrop
  177. Get Item from List

View as code
Beta

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

#define mac false
#include 'actions/text'
#define color darkgray

const Text = "{ShortcutInput}"
const SplitText = splitText(Text)

for _ in SplitText {
	if @RepeatItem beginsWith "If/" {
		const SplitText1 = splitText(@RepeatItem, "/")
		const ItemFromList = getListItem(SplitText1, 2)
		const SplitText2 = splitText(ItemFromList, "-")
		getRandomItem(SplitText2)
		const Text1 = "{}"
		const ShortcutResult = runSelf(Text1)
		getLastItem(SplitText2)
		if ShortcutResult contains  {
			getListItem(SplitText1, 3)
		} else {
			getListItem(SplitText1, 4)
		}
		const Text2 = "{}"
		runSelf(Text2)
	}
	splitText(@RepeatItem, "-")
	const UpdatedText = trimWhitespace()
	getListItems(UpdatedText, 0, 0)
	@Function
	const Count = count(UpdatedText)
	if Count > 1 {
		getListItems(UpdatedText, 2, 0)
		@Condition
	} else {
		@Condition = nil
	}
	if @Function == "Show Notification" || @Function == "Show Alert" {
		const Title = getLastItem(@Condition)
		const Message = getListItems(@Condition, 0, 0)
		if @Function == "Show Notification" {
			showNotification(Message, Title)
		} else {
			alert(Message, Title)
		}
	}
	if @Function == "Text" {
		getLastItem(@Condition)
	}
	if @Function == "Set Focus" {
		const FocusName = getFirstItem(@Condition)
		const Boolean = getListItem(@Condition, 2)
		if Boolean == "Off" {
			toggleFocusMode()
		} else {
			if Count > 3 {
				const Duration = getListItem(@Condition, 3)
				const HoursMinutes = getListItem(@Condition, 4)
				if HoursMinutes == "Minutes" {
					adjustDate(CurrentDate, "")
				} else {
					adjustDate(CurrentDate, "")
				}
				setFocusMode(, "Time")
			} else {
				toggleFocusMode()
			}
		}
	}
	if @Function == "Stop this shortcut" {
		stop()
	}
	if @Function == "Wait" {
		if @Condition {
			const ItemFromList1 = getLastItem(@Condition)
			wait(ItemFromList1)
		} else {
			wait(0)
		}
	}
	if @Function == "Wait for return" {
		waitToReturn()
	}
	if @Function == "Number" {
		const ItemFromList2 = getFirstItem(@Condition)
	}
	if @Function == "Get clipboard" {
		getClipboard()
	}
	if @Function == "Dismiss Siri and Continue" {
		dismissSiri()
	}
	if @Function == "Scan QR or barcode" {
		rawAction("is.workflow.actions.scanbarcode", {})
	}
	if @Function == "Get Support" {
		rawAction("com.apple.store.Jolly.SupportIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Reset the cellular data usage statistics" {
		rawAction("com.apple.ShortcutsActions.ResetCellularDataStatisticsAction", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Get Personal Hotspot password" {
		getHotspotPassword()
	}
	if @Function == "Go to Home Screen" {
		returnToHomescreen()
	}
	if @Function == "Lock the screen" {
		lockScreen()
	}
	if @Function == "Take Screenshot" {
		takeScreenshot()
	}
	if @Function == "Nothing" {
	}
	if @Function == "Get Orientation" {
		getOrientation()
	}
	if @Function == "Vibrate device" {
		vibrate()
	}
	if @Function == "Start Guided Access" {
		rawAction("com.apple.AccessibilityUtilities.AXSettingsShortcuts.AXStartGuidedAccessIntent", {})
	}
	if @Function == "Open Magnifier" {
		rawAction("com.apple.AccessibilityUtilities.AXSettingsShortcuts.AXStartMagnifierIntent", {})
	}
	if @Function == "Get Current Focus" {
		getFocusMode()
	}
	if @Function == "Start Apple Watch remote screen" {
		rawAction("com.apple.AccessibilityUtilities.AXSettingsShortcuts.AXStartRemoteWatchScreenIntent", {})
	}
	if @Function == "Start Speak Screen" {
		rawAction("com.apple.AccessibilityUtilities.AXSettingsShortcuts.AXStartSpeakScreenIntent", {})
	}
	if @Function == "End workout" {
		rawAction("is.workflow.actions.workout.end", {
			"IntentAppDefinition": ""
		})
	}
	if @Function == "Open Reader" {
		magnifierReader()
	}
	if @Function == "Get currently active face on Apple Watch" {
		rawAction("com.apple.PBBridgeSupport.BridgeIntents.COSGetCurrentGizmoFaceIntent", {})
	}
	if @Function == "Track Order" {
		rawAction("com.apple.store.Jolly.TrackOrderIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Get iPhone Recommendation" {
		rawAction("com.apple.store.Jolly.RecommendedIPhoneIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Compare iPhones" {
		rawAction("com.apple.store.Jolly.CompareIPhoneIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Open Sleep Schedule" {
		rawAction("com.apple.Health.OpenSleepScheduleIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Get Physical Activity" {
		rawAction("com.apple.ShortcutsActions.GetPhysicalActivity", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Refresh all widgets" {
		rawAction("dk.simonbs.Scriptable.RefreshAllWidgetsIntent", {})
	}
	if @Function == "Show Quick Reminder" {
		addQuickReminder()
	}
	if @Function == "Get what's on screen" {
		getOnScreenContent()
	}
	if @Function == "View AirPods" {
		rawAction("com.apple.store.Jolly.ViewAirPodsIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Upgrade iPhone" {
		rawAction("com.apple.store.Jolly.UpgradeIPhoneIntent", {
			"AppIntentDescriptor": ""
		})
	}
	if @Function == "Run Shortcut" {
		const ShortcutName = getFirstItem(@Condition)
		if Count > 2 {
			const VariableInput = getRandomItem(@Condition)
			run(ShortcutName, VariableInput)
		} else {
			run(ShortcutName, nil)
		}
	}
	if @Function == "Get All wallpapers" {
		getAllWallpapers()
	}
	if @Function == "Get Current wallpaper" {
		getAllWallpapers()
	}
	if @Function == "Start Workout" {
		const WorkoutType = getListItems(@Condition, 0, 0)
		if Count > 2 {
			const GoalDuration = getListItem(@Condition, 2)
			const GoalValue = getListItem(@Condition, 3)
			if GoalValue == "cal" {
				rawAction("is.workflow.actions.workout.start", {
					"IntentAppDefinition": "",
					"WorkoutGoal": "",
					"isOpenEnded": 0,
					"workoutName": "WorkoutType"
				})
			} else {
				if GoalValue == "min" {
					rawAction("is.workflow.actions.workout.start", {
						"IntentAppDefinition": "",
						"WorkoutGoal": "",
						"isOpenEnded": 0,
						"workoutName": "WorkoutType"
					})
				} else {
					rawAction("is.workflow.actions.workout.start", {
						"IntentAppDefinition": "",
						"WorkoutGoal": "",
						"isOpenEnded": 0,
						"workoutName": "WorkoutType"
					})
				}
			}
		} else {
			rawAction("is.workflow.actions.workout.start", {
				"IntentAppDefinition": "",
				"WorkoutGoal": "",
				"workoutName": "WorkoutType"
			})
		}
	}
	if @Function == "Credits" {
		const Text3 = "Credits:\nNacho_Libre/Cost_Internal (https://www.reddit.com/u/Cost_Internal) - Remodified the shortcut, and added If, Show Notification, and Show Alert"
		quicklook(Text3)
	}
	if @Function == "Get Device Details" {
		const ItemFromList3 = getFirstItem(@Condition)
		getDeviceDetail(ItemFromList3)
	}
	if @Function == "Trim whitespace from" {
		getListItems(@Condition, 0, 0)
		trimWhitespace()
	}
	if @Function == "Extract text from" {
		const ItemFromList4 = getFirstItem(@Condition)
		extractImageText(ItemFromList4)
	}
	if @Function == "Date of" {
		const ItemFromList5 = getFirstItem(@Condition)
		currentDate()
	}
	if @Function == "About" {
		const Text4 = "Credits:\nNacho_Libre/Cost_Internal (https://www.reddit.com/u/Cost_Internal) - Helped me remodified the shortcut, and added If, Show Notification, and Show Alert"
		quicklook(Text4)
	}
	if @Function == "AirDrop" {
		const ItemFromList6 = getFirstItem(@Condition)
		airdrop(ItemFromList6)
	}
	if @Function == "Set AirDrop Receiving to" {
		const ItemFromList7 = getListItems(@Condition, 0, 0)
		setAirdropReceiving(ItemFromList7)
	}
}
getFirstItem(RepeatResults)
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 coltensus

See All

You Might Also Like

See All
Advertisement