### Take Video Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/takeVideo.html This example demonstrates how to use the takeVideo shortcut to record a video. It specifies the camera, quality, and when to start recording. ```applescript takeVideo(camera: Back, quality: Medium, start: Imediately) ``` -------------------------------- ### Start Workout Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/startWorkout.html This example demonstrates how to use the startWorkout shortcut. The 'value' parameter specifies the amount, and 'unit' specifies the type of workout. The 'open' parameter is optional and defaults to true if not provided. ```swift startWorkout(workout: \, open: \, value: "false", unit: 200) ``` -------------------------------- ### Generate Hash (Extended) Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/GizmoPack/hashData.html This example demonstrates how to generate an MD5 hash of the shortcut input using the `hashData` action. Ensure GizmoPack Pro is installed for this functionality. ```javascript hashData(input: ShortcutInput, algorithm: md5, hmacMd5Key: Q348WQAYDUNBQ3RRisd, hmacSha1Key: "", hmacSha224Key: "", hmacSha256Key: "", hmacSha384Key: "", hmacSha512Key: "", outputEncoding: binary) ``` -------------------------------- ### Pick Colour Example Usage Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/pickColour.html Example of how to use the pickColour action with ShortcutInput as the image and a default white starting hex code. ```action pickColour(image: ShortcutInput, startingHex: ""FFFFFF"", postURL: ""shortcuts://"") ``` -------------------------------- ### Get Draft Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Drafts/getDraft.html This example demonstrates how to retrieve an existing draft. It requires a Draft object as input. ```javascript getDraft(draft: Draft(identifier: "F5BD82B1BA4", displayString: "Default Draft", uuid: "F5BD82B1BA4", link: "drafts://open?uuid=F5BD82B1BA4", content: "Some really cool content", title: "Default Draft", tags: ["Default Draft"], folder: inbox, isFlagged: false, grammarType: GrammarType(displayString: "Markdown", identifier: "Markdown"))) ``` -------------------------------- ### Quicklook Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/quicklook.html An example demonstrating how to use the Quicklook shortcut with 'ShortcutInput'. ```swift quicklook(input: ShortcutInput) ``` -------------------------------- ### Play Music Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/play.html This example demonstrates how to use the play shortcut to play music. Ensure the 'Play' behavior is specified. ```shortcut play(behavior: Play, source: iPhone) ``` -------------------------------- ### Make Archive Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/makeArchive.html This example shows how to create a ZIP archive of the shortcut's input. ```javascript makeArchive(input: ShortcutInput, type: .zip) ``` -------------------------------- ### Get Item From List Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getItemFromList.html This example demonstrates how to get the item at a specific index from a list. Ensure the 'options' variable is defined and populated before use. ```applescript getItemFromList(list: options, type: Item at Index, index: "3", startIndex: "", endIndex: "") ``` -------------------------------- ### Get Address From Input Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getAddressFrom.html This example demonstrates how to use the getAddressFrom shortcut to extract an address from a contact email. ```javascript getAddressFrom(input: Contact support@jellycuts.com) ``` -------------------------------- ### Quick Look Extended Example Usage Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/quickLookExtended.html An example demonstrating how to use the quickLookExtended function with specific parameters. This example shows how to set a title, body content, URL handling, theme, image and text alignment, button style, and map properties. ```applescript quickLookExtended(title: "This shortcut's input", body: ShortcutInput, openURL: true, postURL: "shortcuts://", theme: Midnight, imageSize: fullWidth, imageAlignment: Central, imageShadows: true, textAlignment: central, buttonStyle: textOnly, buttonRadius: 15, imageMask: default, imageRadius: 100, mapPin: false, mapZoom: 0.0, mapInteractivity: false, mapSize: Short) ``` -------------------------------- ### Trim Text Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/trimText.html This example demonstrates how to trim 2 characters from the start of the string "ShortcutInput", while also removing whitespace and newlines. ```ToolboxPro trimText(charCount: 2, trimFrom: TrimFromStart, sourceText: "ShortcutInput", removeWhiteSpace: true, removeNewLines: true, emptyLineType: all) ``` -------------------------------- ### Start Focus Session Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/FocusedWork/startFocusSession.html Use this function to initiate a new focus session. Ensure the 'focusSession' parameter is correctly defined and the 'focus' parameter specifies the desired focus state. ```javascript startFocusSession(focusSession: ⚠️ Default for FocusSession needed ⚠️, focus: "Set your focus") ``` -------------------------------- ### Get All Alarms Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getallalarms.html This example shows how to call the getallalarms shortcut to retrieve all alarms, with the 'show' parameter set to false. ```javascript getallalarms(show: false) ``` -------------------------------- ### Generate Thumbnails Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/generateThumbnails.html This example demonstrates how to generate thumbnails from files with specific output settings. Ensure ShortcutInput is correctly defined for the files parameter. ```javascript generateThumbnails(files: ShortcutInput, outputType: Images, withPreviews: false, backgroundColour: clear, hexCode: "#f7f7f7") ``` -------------------------------- ### Get Username Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/getUserDetails.html This example demonstrates how to retrieve the current user's username using the getUserDetails action. Ensure the correct UserDetailsType is specified. ```javascript getUserDetails(type: username) ``` -------------------------------- ### Get Workouts Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getWorkouts.html This example demonstrates how to retrieve workout data using the getWorkouts function. It specifies 'All' workout types and disables date range filtering. Ensure all parameters are correctly set for your desired output. ```javascript getWorkouts(workoutType: "All", useDateRange: false, afterDate: , beforeDate: , units: metric, tempUnits: Farenheit, sort: StartDate, dateOrder: OldestFirst, distanceOrder: FurthestFirst, energyOrder: MostEnergyFirst, durationOrder: LongestFirst, limit: 15) ``` -------------------------------- ### Select Photo Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/selectPhoto.html This is a basic example of how to use the selectPhoto shortcut. No specific types or multiple selection are enforced. ```javascript selectPhoto(types: , multiple: ) ``` -------------------------------- ### Filter Image Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/filterImage.html An example demonstrating how to apply a sepia filter with specific intensity, pixellation, and blur settings, along with image resizing. It's recommended to add a 'wait to return' and 'get contents of clipboard' action after this one. ```swift filterImage(sepia, sepiaIntensity: 0.3, pixellateAmount: 12.0, desatRedTint: 0.0, desatGreenTint: 0.0, desatBlueTint: 0.0, blurStrength: 0.4, blurType: Box, image: [ShortcutInput], resizeImage: true, resizeLongestSideTo: 0) ``` -------------------------------- ### Run Shell Script Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/runShellScript.html This example demonstrates how to use the runShellScript action to echo a string using the zsh shell. ```actions runShellScript(input: ShortcutInput, script: "echo ", shell: , inputMode: /bin/zsh) ``` -------------------------------- ### Markup Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/markup.html An example of how to use the Markup shortcut with ShortcutInput. ```swift markup(input: ShortcutInput) ``` -------------------------------- ### Write Text Action Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/writeText.html Opens a text editor for user input, then copies the edited text to the clipboard. Ensure 'Wait to Return' and 'Get Clipboard' actions follow this one. ```javascript writeText(shouldEdit: true, text: "Jellycuts is awesome!", editorTitle: "Super Document") ``` -------------------------------- ### Move File Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/moveFile.html This example demonstrates how to use the moveFile shortcut. It moves the file provided as input to the folder specified by the clipboard content. ```applescript moveFile(file: ShortcutInput, folder: Clipboard) ``` -------------------------------- ### Smart Crop Action Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/smartCrop.html Use this action to generate an interest heatmap from an image. The result is copied to the clipboard. Consider adding a 'wait to return' and 'get clipboard' action afterward to utilize the output. ```actions smartCrop(image: ShortcutInput, type: objects) ``` -------------------------------- ### Verbatim Text Widget Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/WidgetPack/verbatimText.html An example demonstrating how to use the verbatimText widget with specific text content and styling parameters. ```swift verbatimText(verbatim: "Main Page", font: Font(identifier: "SF Pro", displayString: "SF Pro"), color: View(identifier: "View1", displayString: "View One"), bold: true, italic: false, strikethrough: false, strikethroughColor: View(identifier: "View1", displayString: "View One"), underline: false, underlineColor: View(identifier: "View1", displayString: "View One"), kerning: 0, tracking: 0, baselineOffset: 0) ``` -------------------------------- ### Get Event Detail - Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/eventDetail.html Retrieves the start date of the 'Jellycuts Release Date' event. Ensure the event and detail types are correctly specified. ```applescript eventDetail(detail: Start Date, event: Jellycuts Release Date) ``` -------------------------------- ### Mask Image Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/maskImage.html This example demonstrates how to use the maskImage shortcut. It takes an image, a mode, and an optional mask as input. ```applescript maskImage(image: ShortcutInput, mode: Icon, mask: Clipboard) ``` -------------------------------- ### Send Notification Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/sendNotification.html This example demonstrates how to send a notification with a body, title, and attachment. The 'sound' parameter is optional and defaults to true if not specified. ```jellycuts sendNotification(body: "Hello World!", title: "My First Jellycut", sound: false, attachment: ShortcutInput) ``` -------------------------------- ### Example Menu: Log Water or Workout Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Language_Guide/menus.html An example of a filled-out menu. This menu prompts the user to select between 'Log Water' and 'Workout'. Selecting 'Log Water' runs the 'Log Water' shortcut, and selecting 'Workout' runs the 'Workout' shortcut. ```jelly menu("Select an action", ["Log Water", "Workout"]) { case("Log Water"): runShortcut(Log Water) case("Workout"): runShortcut(Workout) } ``` -------------------------------- ### Get Text From Image Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getTextFromImage.html This example demonstrates how to use the getTextFromImage function. It's recommended to follow this action with 'wait to return' and 'get contents of clipboard' actions in Shortcuts. ```Swift getTextFromImage(image: ShortcutInput, languageCorrection: false, language: "false") ``` -------------------------------- ### Split Text Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/splitText.html This example demonstrates how to split a text using a custom separator. Ensure the text and separator are correctly defined. ```actions splitText(text: [\, separator: , \, customSeparator: "") ``` -------------------------------- ### Reverse List Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/reverseList.html This example demonstrates how to use the reverseList action with a list containing a Shortcut Input, Current Date, and Clipboard content. ```JavaScript reverseList(list: [ShortcutInput, CurrentDate, Clipboard]) ``` -------------------------------- ### Update Widget Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/WidgetPack/updateWidget.html Provides an example of how to use the `updateWidget` function to update a widget named 'Main Widget' with a specific view and a URL. ```swift updateWidget(view: View(identifier: "View1", displayString: "View One"), name: "Main Widget", widgetURL: "https://jellycuts.com") ``` -------------------------------- ### Convert Image Finder Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/convertImageFinder.html This example demonstrates how to use the `convertImageFinder` shortcut with `ShortcutInput` to convert an image. It utilizes a distinct UI for macOS. ```applescript convertImageFinder(image: ShortcutInput) ``` -------------------------------- ### Example of Output Action Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/output.html Demonstrates how to use the output action to set the shortcut's result to 'ShortcutInput' and specify the 'Respond' behavior for the output surface. ```Shortcuts output(notes: "ShortcutInput", folder: Respond) ``` -------------------------------- ### Get File Path Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/getFilePath.html Use this action to get the path of the input file. Ensure the correct FilePathType enumeration is used. ```javascript getFilePath(file: ShortcutInput, type: path) ``` -------------------------------- ### Get Object of Class - Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getClass.html This example demonstrates how to use the getClass shortcut to retrieve an object of the 'NSURL' class. The 'input' parameter is optional. ```applescript getClass(input: ShortcutInput, class: "NSURL") ``` -------------------------------- ### Shuffle List Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/shuffleList.html This example demonstrates how to shuffle a list using the shuffleList action. You can optionally limit the number of items to shuffle. ```javascript shuffleList(limit: true, limitCount: 5, list: ShortcutInput) ``` -------------------------------- ### Run Inline Script Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Scriptable/runScriptInline.html This example demonstrates how to run an inline JavaScript script with various parameters. It logs 'Hello World' and passes clipboard content, a list of texts, a URL, an image, a file, and a boolean for running in-app. ```javascript runScriptInline(script: "console.log('Hello World');", parameter: Clipboard, texts: [Red, Blue, Green], urls: ["https://jellycuts.com"], images: image, files: file, runInApp: false) ``` -------------------------------- ### Change Wallpaper Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/changeWallpaper.html This example demonstrates how to use the changeWallpaper shortcut. Ensure the image input is correctly provided and optional parameters are handled as needed. ```javascript changeWallpaper(image: ShortcutInput, location: , preview: ) ``` -------------------------------- ### Add Music Up Next Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/addUpNext.html This example demonstrates how to add music to the 'up next' queue using the addUpNext shortcut. It specifies the music input and the placement as 'Next'. ```applescript addUpNext(music: ShortcutInput, place: Next) ``` -------------------------------- ### Filter Music Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/filterMusic.html This example demonstrates how to filter all music by a specific artist, sort the results by title in ascending order, and limit the output to 20 items. ```Jellycuts filterMusic(input: All Music, filterType: All, filter: {Artist: == : AJR}, sortBy: Title, order: Ascending, limit: 20) ``` -------------------------------- ### Get Tracker Value Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Progress/getNumberTrackerValue.html Use this function to get the current value of a tracker. You need to provide the tracker object, which includes its identifier and display string. ```javascript getNumberTrackerValue(tracker: Tracker(identifier: "abcde-f", displayString: "Hello World")) ``` -------------------------------- ### Core Jellycuts Actions: text, alert, quicklook, runShortcut Source: https://context7.com/jellycuts/docs.jellycuts.com/llms.txt Demonstrates fundamental Jellycuts actions for creating text, displaying alerts, previewing values, and running other shortcuts. Ensure 'import Shortcuts' is included. ```jelly import Shortcuts #Color: blue, #Icon: shortcuts // text() - creates a text block text(text: "Hello ${Shortcut Input}") >> myText ``` ```jelly // alert() - shows an alert dialog alert(alert: "You said: ${myText}", title: "Result", cancel: false) ``` ```jelly // quicklook() - preview any value getLastPhoto() >> photo quicklook(photo) ``` ```jelly // runShortcut() - run another shortcut and pass input runShortcut(name: "My Other Shortcut", input: myText) >> shortcutResult ``` ```jelly // setClipboard() setClipboard(myText) ``` ```jelly // sendNotification() sendNotification(title: "Done", body: "Script finished at ${Current Date}") ``` ```jelly // saveFile() - save to iCloud Drive saveFile(file: myText, path: "/Jellycuts/output.txt", overwrite: true) ``` ```jelly // urlContents() - fetch URL urlContents(url: "https://api.example.com/data") >> apiResponse ``` ```jelly // dictionary() - create a dictionary dictionary({"key": "value", "count": 42}) >> myDict ``` -------------------------------- ### Get Uniform Type Identifier Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/getUniformTypeIdentifier.html Gets the Uniform Type Identifier (UTI) of the input file. For example, a JPEG file would return “public.jpeg”. ```APIDOC ## getUniformTypeIdentifier ### Description Gets the Uniform Type Identifier (UTI) of the input file. For example, a JPEG file would return “public.jpeg”. ### Syntax ``` getUniformTypeIdentifier(file: <#Variable#>) ``` ### Parameters #### Path Parameters * **file** (Variable) - Required - The input file for which to get the UTI. ### Example ``` getUniformTypeIdentifier(file: ShortcutInput) ``` ``` -------------------------------- ### Show Product in Store Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/showInStore.html Use this shortcut to display a product in the store. It takes a product variable as an argument. ```javascript showInStore(product: Searched App) ``` -------------------------------- ### Tag Files Action Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/tagFiles.html This example demonstrates how to set tags for files using the 'set' mode. It adds 'Red' and 'Green' tags, and the operation is case-sensitive. ```applescript tagFiles(files: ShortcutInput, mode: set, removeTags: , addTags: ["Red", "Green"], appendTags: , caseSensitive: true) ``` -------------------------------- ### Connect to Servers Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/connectToServers.html Use this shortcut to establish connections to servers. Provide an array of server URLs. ```javascript connectToServers(servers: ["https://example.com", "https://anotherserver.net"]) ``` -------------------------------- ### Get Reminder Detail Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/reminderDetail.html This example demonstrates how to retrieve the 'Is Flagged' status of a reminder. Ensure the 'reminders' variable is properly defined and contains the reminder you wish to query. ```applescript reminderDetail(detail: Is Flagged, reminder: reminders) ``` -------------------------------- ### Adjust Date Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/adjustDate.html This example demonstrates how to add 10 minutes to the date '10:30 pm' using the Adjust Date shortcut. No duration is needed for get operations. ```shortcut adjustDate(operation: Add, duration: 10 min, date: "10:30 pm") ``` -------------------------------- ### Show Result Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/showResult.html Demonstrates how to use the showResult shortcut to display a string. Variables are allowed within the text. ```shortcut showResult(text: "Hello there General Kenobi") ``` -------------------------------- ### Get Toolbox Pro Tools by Category Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getTBPTools.html Use the `category` parameter to filter the list of tools. For example, to get only system-related tools, pass `"System"` as the category. ```applescript getTBPTools(category: "System") ``` -------------------------------- ### Run Ruby File Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Rubyist/runFile.html Use this to execute a Ruby file. Specify the input file, an array of arguments, and a boolean to determine if it should run in a separate app. ```ruby runFile(file: inputFile, arguments: [], runInApp: false) ``` -------------------------------- ### Get Match Group Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getMatchGroup.html This example demonstrates how to use the getMatchGroup shortcut to retrieve the second group from a regex match. Ensure the 'matches' variable contains the result of a regex operation. ```applescript getMatchGroup(type: Group At Index, matches: ShortcutInput, index: "2") ``` -------------------------------- ### Get File Of Type Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getFileOfType.html This example demonstrates how to retrieve Rich Text Format (RTF) files using the getFileOfType shortcut. Ensure the input is correctly provided if not using ShortcutInput. ```applescript getFileOfType(input: ShortcutInput, type: "public.rtf") ``` -------------------------------- ### Select File Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/selectFile.html Use this shortcut to open the system file picker. Specify the type of files to pick and whether multiple selections are allowed. ```javascript selectFile(type: Files, multiple: false) ``` -------------------------------- ### Send Message Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/sendMessage.html Demonstrates how to use the sendMessage shortcut to send a message. The 'show' parameter is optional and defaults to true if omitted. ```javascript sendMessage(message: "Hello!", recipient: Recipient, show: false) ``` -------------------------------- ### Filter List Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/filterList.html This example demonstrates how to filter a list of items. It keeps items starting with 'Jellycuts', is case-sensitive, and limits the results to 5. Use this when you need to refine a list based on specific text patterns. ```applescript filterList(list: ShortcutInput, criteria: "Jellycuts", keepOrDiscard: keep, discardEmpty: true, isCaseSensitive: true, limitResults: true, resultCount: 5, mode: starting) ``` -------------------------------- ### Run AppleScript with Basic Logging Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/runAppleScript.html This example demonstrates how to run a simple AppleScript that logs a message. Ensure your script is wrapped in the 'on run {input, parameters}' handler. ```applescript on run {input, parameters} log "Hello from AppleScript!" return input end run ``` -------------------------------- ### Get Contact Detail Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/contactDetail.html Retrieves the first name of a contact. Ensure the 'contact' variable is properly set. ```applescript contactDetail(detail: First Name, contact: ShortcutInput) ``` -------------------------------- ### Resize Window Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/resizeWindow.html Use this shortcut to resize a specified window to a given height and width. The 'bringToFront' parameter is optional and defaults to true if not specified. ```javascript resizeWindow(window: Found Window, config: Dimensions, bringToFront: false, height: 100, width: 100) ``` -------------------------------- ### RoutineHub Link Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/RoutineHubAds/routineHubLink.html An example demonstrating how to import the necessary modules and use the routineHubLink function with a specific affiliate URL and call-to-action text. Requires Jellycuts Premium. ```swift import Shortcuts import RoutineHubAds routineHubLink(url: "https://wildfire.co/aff/abc123", text: "Visit our store") ``` -------------------------------- ### Build URL Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/buildURL.html Constructs a URL using the buildURL function. Specify scheme, host, path, and other optional parameters as needed. ```applescript buildURL(scheme: "https", host: "blog.actuallyzach.com", path: "", queryItems: , user: "", password: "", fragment: "", addPort: , port: ) ``` -------------------------------- ### Get Stock Detail Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/stockDetail.html Retrieves the price detail for a given stock. Ensure the 'stock' variable is properly defined. ```applescript stockDetail(detail: price, stock: stock) ``` -------------------------------- ### Get Last Video Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getLastVideo.html Call the shortcut with the desired number of videos to retrieve. Supports variable input. ```shortcut getLastVideo(count: 1) ``` -------------------------------- ### Encode Media Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/encodeMedia.html This example demonstrates how to use the encodeMedia shortcut with various parameters to customize the output video. It specifies resolution, playback speed, and metadata. ```applescript encodeMedia(media: ShortcutInput, size: 1920x1080, speed: Normal, customSpeed: "0", title: "Awesome Video", artist: "Zachary", album: "Videos", genre: "Indie", year: 2021, artwork: Image) ``` -------------------------------- ### Get Emojis Action Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/getEmojis.html Use this action to retrieve all emojis present in a string. The input text can include variables. ```javascript getEmojis(text: "Hello World 👋") ``` -------------------------------- ### Complete 'Hello World!' Script Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Getting_Started/writing_first_script.html The final 'Hello World!' script combining import, metadata, text block, magic variable, and alert. This script can be exported to Shortcuts. ```jelly import Shortcuts #Color: red, #Icon: shortcuts text(text: "Hello World!") >> introduction alert(alert: "${introduction}") ``` -------------------------------- ### Get Last Bursts Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getLastBurst.html Retrieves the last n bursts you took. Use this when you need to access recent burst photos. ```javascript getLastBurst(count: 1) ``` -------------------------------- ### Get Contacts From Input Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getContactsFrom.html Use this shortcut to retrieve contacts from a specified input. Ensure the input is formatted correctly for contact extraction. ```javascript getContactsFrom(input: Contact support@jellycuts.com) ``` -------------------------------- ### Basic zStack Usage Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/WidgetPack/zStack.html Demonstrates how to use the zStack widget to layer views. Specify the alignment and the content to be stacked. ```Swift zStack(alignment: Alignment(identifier: "Alignment", displayString: "Alignment"), content: My Views) ``` -------------------------------- ### Get Text Detail Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getDetailFromText.html This example demonstrates how to use the getDetailFromText function to extract the language from a given text. Ensure the text input is properly formatted and the detailType is set to 'language'. The includeOriginal parameter is set to true to also return the original input text. ```javascript getDetailFromText(text: "", detailType: language, includeOriginal: true) ``` -------------------------------- ### Overlay Image Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/overlayImage.html This example demonstrates how to overlay a profile image onto a background image. It specifies dimensions, center alignment, full opacity, and a 180-degree rotation for the overlay. ```javascript overlayImage(image1: Profile Image, image2: Background, editor: false, height: "512", width: "512", position: Center, opacity: "1.0", rotation: "180") ``` -------------------------------- ### editText Action Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/editText.html This example demonstrates how to use the editText action to open a text editor with pre-filled text, open a URL, and set a custom title. Ensure 'wait to return' and 'get contents of clipboard' actions follow this one if clipboard content is needed. ```javascript editText(textType: newText, text: ["Cool Text"], openURL: true, postURL: ""shortcuts://"", title: "Editing Text") ``` -------------------------------- ### Create Music Playlist Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/createPlaylist.html Use this function to create a new music playlist. Specify the playlist name, description, how to add songs (e.g., by song, album, or existing playlist IDs), and the IDs of the items to add. ```javascript createPlaylist(name: "Awesome Songs", playlistDescription: "Some of my favorite songs", addType: songs, songIDs: ["0"], albumIDs: ["0"], playlistIDs: ["0"]) ``` -------------------------------- ### Get Reminder ID Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getReminderID.html Use this function to retrieve the unique identifier of a selected reminder. Ensure the reminder name and list are correctly specified. ```javascript getReminderID(reminder: ""Program more!"", list: r-Reminders) ``` -------------------------------- ### Create Quick Menu Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/quickMenu.html Use the `quickMenu` action to create a menu from formatted text. Ensure to add a 'Choose From List' action afterward for user interaction. Refer to the app's tool description for specific formatting rules. ```actions quickMenu(text: "A quick menu") ``` -------------------------------- ### Get URLs From Input Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getURLSFromInput.html Use this shortcut to extract URLs from any given text. It accepts a string as input and returns any URLs found within it. ```JavaScript getURLSFromInput(text: "My favorite site is https://blacklivesmatter.com") ``` -------------------------------- ### Search iTunes Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/searchItunes.html This example demonstrates how to use the searchItunes shortcut to find songs by a specific artist. You can customize the query, category, search attribute, result type, and count. ```Shortcut searchItunes(query: "Rick Astley", category: Music, by: All, results: Songs, count: 5) ``` -------------------------------- ### Get Current Weather Conditions Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getCurrentConditions.html Call this function to retrieve the current weather conditions. No specific setup or imports are required beyond the core library. ```javascript getCurrentConditions() ``` -------------------------------- ### Get Symbol Name Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getSymbolName.html Use this function to retrieve a symbol name. Specify the category, the type of symbol name, and the desired name. Requires iOS 14+. ```javascript getSymbolName(category: "Media", symbolNameType: All, name: "play") ``` -------------------------------- ### Get Music Detail Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/musicDetail.html Use this shortcut to retrieve a specific detail, such as the title, from a given music item. Ensure the music item is correctly provided. ```applescript musicDetail(detail: Title, music: Favorite Song) ``` -------------------------------- ### Play Music Shortcut Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/playMusic.html This example demonstrates how to play music using the Play Music shortcut. It specifies the music input, enables shuffle mode, and sets the repeat option to play a single song repeatedly. ```applescript playMusic(music: ShortcutInput, shuffle: Songs, repeat: One) ``` -------------------------------- ### Trim File Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/GizmoPack/trimFile.html This example demonstrates how to trim the last 2 lines from the ShortcutInput file. Ensure the file variable and enumeration values are correctly set for your use case. ```javascript trimFile(file: ShortcutInput, characterClass: lines, lineCount: 2, position: end) ``` -------------------------------- ### Get Attendee Detail Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/attendeeDetail.html Use this shortcut to retrieve specific details like the attendee's name from an event. Ensure the attendee variable is correctly set. ```javascript attendeeDetail(detail: Name, attendee: ShortcutInput) ``` -------------------------------- ### Get TV Show Details Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getTvShowDetails.html Use this function to retrieve extended information for a specific TV show. Ensure you have a TvShow object and specify the desired provider locale. ```swift getTvShowDetails(tvShow: TvShow(identifier: "Ted_Lasso", displayString: "Ted Lasso", title: "Ted Lasso", overview: "A really good show", firstAirDate: August 14, 2020, tmdb_id: 97456, voteCount: 42, voteAverage: .85, popularity: .85, posterURL: "https://www.themoviedb.org/tv/97546-ted-lasso?language=en-US#", posterThumbURL: "https://www.themoviedb.org/tv/97546-ted-lasso?language=en-US#", genres: "Comedy"), providersLocale: "Apple TV") ``` -------------------------------- ### Get Movie Details Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getMovieDetails.html Use this function to retrieve more information about a movie previously found with the 'Find Movies' tool. Ensure the movie object and locale are correctly provided. ```swift getMovieDetails(movie: Movie(identifier: "Movie1", displayString: "Star Wars", tmbd_id: "a32jsaf", title: "Star Wars", posterThumbURL: ", posterURL: "", voteAverage: 0.4, voteCount: 3, releaseData: January 1st 1999, popularity: 0.9, overview: "Space", genres: "Sci-Fi"), providersLocale: "en_us") ``` -------------------------------- ### Create Playlist Shortcut Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/createPlaylist.html Use this shortcut to create a new playlist. It accepts a name, and optionally music, author, and description. Variables can be used within string arguments. ```shortcut createPlaylist(name: "${Name}'s Playlist", music: New Music, author: "${Name}", description: "${Name}'s favorite songs from 2021") ``` -------------------------------- ### Get Activity Data Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/ToolboxPro/getActivity.html Use this function to retrieve your daily Watch activity goal data from Health. Specify the activity type, date range, and an optional limit for the results. ```swift getActivity(activityQueryType: BetwweenDates, startDate: March 21st 2022, endDate: March 22nd 2022, onDay: , limit: 15) ``` -------------------------------- ### Create URL with Components Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Actions/createURL.html Constructs a URL using scheme, host, path, query items, fragment, user, password, and port. Ensure all parameters are correctly formatted. ```Swift createURL(scheme: "https", host: "blog.actuallyzach.com", path: "/", queryItems: [], fragment: "", user: "", password: "", useCustomPort: true, port: 42) ``` -------------------------------- ### Speak Text Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/speakText.html This example demonstrates how to use the speakText shortcut with various parameters. The 'wait' parameter controls whether the shortcut waits for speech to finish. 'rate' and 'pitch' adjust the speech characteristics, and 'language' specifies the voice to use. ```javascript speakText(text: "Hello World!", wait: false, rate: 1, pitch: 1, language: en-US) ``` -------------------------------- ### Get Page Detail Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/pageDetail.html Use this function to retrieve specific details from an Apple Pages Document. Ensure the 'detail' parameter is set to 'pageDetail' and 'webpage' is set to 'Page Contents' for this example. ```applescript pageDetail(detail: pageDetail, webpage: Page Contents) ``` -------------------------------- ### Filter Photos Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/filterPhotos.html This example demonstrates how to filter photos, specifying the input as 'All Photos', filtering by album 'a-Schoolwork', sorting by 'Creation Date' in 'Oldest First' order, and limiting the results to 20. ```shortcut filterPhotos(input: All Photos, filterType: All, filter: {Album: is : a-Schoolwork}, sortBy: Creation Date, order: Oldest First, limit: 20) ``` -------------------------------- ### Get Time Between Dates Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/Shortcuts/getTimeBetween.html Use this shortcut to retrieve the time difference between two specified dates. The interval can be set to various units like Minutes, Hours, Days, etc. ```Workflow getTimeBetween(first: CurrentDate, second: AdjustedDate, interval: Minutes) ``` -------------------------------- ### RoutineHub Offer Card Syntax and Example Source: https://github.com/jellycuts/docs.jellycuts.com/blob/gh-pages/Documentation/RoutineHubAds/routineHubOffer.html Demonstrates the syntax for the routineHubOffer function and provides an example of its usage with necessary imports. Requires a Jellycuts Premium subscription. ```swift import Shortcuts import RoutineHubAds routineHubOffer(url: "https://wildfire.co/aff/abc123", title: "Spring Sale", description: "50% off all widgets this week") ```