### Example: Showing 'Hello World' Alert (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This is a concrete example of the ALERT syntax, demonstrating how to show an alert with 'Hello' as the title and 'World' as the informative text. ```Plain Text ALERT:Hello|World\n ``` -------------------------------- ### Example: Displaying 'Hello World' Alert (Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This is a concrete example of using the `ALERT` syntax to display a simple alert. When a script outputs this exact string, Platypus will show an alert with 'Hello' as the title and 'World' as the informative text. The `\n` at the end is crucial for the Platypus wrapper to recognize the command. ```Text ALERT:Hello|World\\n ``` -------------------------------- ### Platypus Command Line Tool Installation Paths (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet lists the default file paths created by the Platypus command-line tool installation script. It outlines where the main program binary, the executable binary for scripts, UI nib files, default icons, and the man page are installed on the system. These files are managed by the "Uninstall Platypus" utility. ```Shell /usr/local/bin/platypus Program binary /usr/local/share/platypus/ScriptExec Executable binary /usr/local/share/platypus/MainMenu.nib Nib file for app /usr/local/share/platypus/PlatypusDefault.icns Default icon /usr/local/share/man/man1/platypus.1 Man page ``` -------------------------------- ### Installing Platypus via Homebrew (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/README.md This command installs the Platypus application on macOS using Homebrew, a popular package manager. It uses the --cask option because Platypus is a macOS application, not a command-line tool. This is a convenient way to get Platypus, though it might not always be the absolute latest version. ```Shell brew install --cask platypus ``` -------------------------------- ### Platypus Command Line Tool Installation Paths (Filesystem) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This snippet lists the default installation paths for the Platypus command-line tool and its associated files on a macOS system. These paths include the main program binary, executable script, UI nib file, default icon, and the man page, all of which are removed during uninstallation. ```Filesystem /usr/local/bin/platypus Program binary /usr/local/share/platypus/ScriptExec Executable binary /usr/local/share/platypus/MainMenu.nib Nib file for app /usr/local/share/platypus/PlatypusDefault.icns Default icon /usr/local/share/man/man1/platypus.1 Man page ``` -------------------------------- ### Querying User Input with CocoaDialog (Bash) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This Bash script demonstrates how to integrate CocoaDialog with a Platypus application to prompt users for input. It uses `yesno-msgbox` to get a string output from the user's button press and then displays it in an `ok-msgbox`. ```Bash #!/bin/bash CD="CocoaDialog.app/Contents/MacOS/CocoaDialog" rv=`$CD yesno-msgbox --string-output` $CD ok-msgbox --no-cancel --text "You pressed $rv" ``` -------------------------------- ### Building Platypus from Source (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/README.md This command initiates the build process for the Platypus application from its source code. It requires Xcode build tools to be installed on the system. The 'build_unsigned' target compiles the application without signing it, and the resulting application bundle will be placed in the 'products' directory. ```Shell make build_unsigned ``` -------------------------------- ### Applying Normalize.css Base Styles Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This snippet includes a significant portion of Normalize.css, providing a consistent cross-browser baseline for HTML elements. It resets default browser styles to improve rendering consistency and prevent common layout issues, ensuring a more predictable starting point for styling. ```CSS article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}[hidden],template{display:none;}html{font-family:sans-serif;/*1*/-ms-text-size-adjust:100%;/*2*/-webkit-text-size-adjust:100%;/*2*/}body{margin:0;}a{background:transparent;}a:focus{outline:thindotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em0;}abbr[title]{border-bottom:1pxdotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\\201C""\\201D""\\2018""\\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}table{border-collapse:collapse;border-spacing:0;} ``` -------------------------------- ### Creating a Submenu in Status Menu (Platypus Text Format) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This example demonstrates the text format for defining a submenu within a Platypus Status Menu. The format specifies the submenu title and its constituent menu items, all separated by pipes. ```Platypus Text Format SUBMENU|Title|Item1|Item2|Item3\n ``` -------------------------------- ### Loading Platypus Profile with Command Line Tool (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This command demonstrates how to load a pre-saved Platypus profile using the `platypus` command-line tool. The profile (`myProfile.platypus`) contains configuration settings, which are then used to create a new application named `MyApp.app`. This is useful for automating app creation within build processes. ```Shell /usr/local/bin/platypus -P myProfile.platypus MyApp.app ``` -------------------------------- ### Loading Platypus Profile with Command Line Tool (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This command demonstrates how to use the `platypus` command-line tool to load a previously saved profile and create an application from it. It is useful for automating app creation with predefined settings. ```Shell /usr/local/bin/platypus -P myProfile.platypus MyApp.app ``` -------------------------------- ### Understanding Platypus Application Bundle Structure (Filesystem) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet illustrates the standard directory structure of a Mac OS X application bundle generated by Platypus. It details the location of key components such as the Info.plist, application binary, resources folder, icon, settings, UI nib file, and the executed script, providing insight into how Platypus apps are organized. ```Text MyApp.app/ - Application bundle folder MyApp.app/Contents MyApp.app/Contents/Info.plist - Info property list for app MyApp.app/Contents/MacOS MyApp.app/Contents/MacOS/MyApp - Application binary MyApp.app/Contents/Resources - Resources folder MyApp.app/Contents/Resources/AppIcon.icns - Application icon MyApp.app/Contents/Resources/AppSettings.plist - Application settings MyApp.app/Contents/Resources/MainMenu.nib - Nib file, stores interface layout MyApp.app/Contents/Resources/script - Script executed by application binary ``` -------------------------------- ### Querying User Input with CocoaDialog (Bash) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Bash script demonstrates how to use a bundled copy of CocoaDialog to prompt the user for input. It first displays a yes/no message box and captures the user's choice, then presents another message box to confirm the selection. Requires CocoaDialog.app to be bundled with the Platypus application. ```Bash #!/bin/bash CD="CocoaDialog.app/Contents/MacOS/CocoaDialog" rv=`$CD yesno-msgbox --string-output` $CD ok-msgbox --no-cancel --text "You pressed $rv" ``` -------------------------------- ### Passing Command Line Arguments to Platypus App (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This snippet demonstrates how to execute a Platypus-generated macOS application binary from the command line and pass arguments to its underlying script. Arguments like -arg1 and -arg2 are directly forwarded, enabling features such as creating protocol handlers for web browsers. ```Shell ./MyApp.app/Contents/MacOS/MyApp -arg1 -arg2 ``` -------------------------------- ### Implementing Code Syntax Highlighting Styles Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This extensive CSS snippet provides styles for various elements within code blocks, specifically for syntax highlighting. It defines colors, font styles (italic, bold), and background colors for different token types (comments, errors, keywords, strings, numbers, etc.) to enhance code readability and visual differentiation. ```CSS .highlight .c , .highlight .cm , .highlight .cp , .highlight .c1 { color:#999988; font-style:italic; } .highlight .err { color:#a61717; background-color:#e3d2d2 } .highlight .o , .highlight .gs , .highlight .kc , .highlight .kd , .highlight .kn , .highlight .kp , .highlight .kr { font-weight:bold } .highlight .cs { color:#999999; font-weight:bold; font-style:italic } .highlight .gd { color:#000000; background-color:#ffdddd } .highlight .gd .x { color:#000000; background-color:#ffaaaa } .highlight .ge { font-style:italic } .highlight .gr , .highlight .gt { color:#aa0000 } .highlight .gh , .highlight .bp { color:#999999 } .highlight .gi { color:#000000; ``` -------------------------------- ### Prompting User Input with AppleScript via Perl Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Perl script demonstrates how to use the /usr/bin/osascript utility to execute AppleScript code, specifically to display a user input dialog. It defines a 'dialog' subroutine that takes prompt text and a default answer, returning the user's input. This method allows for native macOS dialogs without external dependencies like CocoaDialog. ```Perl #!/usr/bin/perl use strict; sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); } sub dialog { my ($text, $default) = @_; osascript(qq{ tell app \"System Events\" text returned of (display dialog \"$text\" default answer \"$default\" buttons {\"OK\"} default button 1 with title \"Riddle\") end tell }); } my $result = dialog("Answer to life, the universe and everything?", "42"); ``` -------------------------------- ### Showing an Alert from Script Output (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This syntax allows a script running within a Platypus application wrapper to display an alert dialog. The 'Title' and 'Text' parts will be used for the alert's title and message, respectively. ```Plain Text ALERT:Title|Text\n ``` -------------------------------- ### Loading User Shell Environment in Bash Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Bash command sources the user's .bashrc file, which loads environment variables, aliases, and functions defined in that configuration file into the current script's execution environment. This is an alternative to using the -l flag with the interpreter to simulate a login shell. ```Bash source ~/.bashrc ``` -------------------------------- ### Showing a Notification from Script Output (Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet introduces the syntax for triggering a user notification from a script's output. When the `NOTIFICATION` keyword is printed by the script, the Platypus application wrapper will display a notification in the User Notification Center. The full syntax for title and text is implied to be similar to the ALERT command. ```Text NOTIFICATION ``` -------------------------------- ### Passing Command-Line Arguments to Platypus Apps (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet demonstrates how to execute a Platypus-generated application from the command line and pass arguments to its embedded script. Arguments provided after the application path, such as -arg1 and -arg2, are directly forwarded to the script, enabling integration with other programs or protocol handlers. ```Shell # ./MyApp.app/Contents/MacOS/MyApp -arg1 -arg2 ``` -------------------------------- ### Creating Dynamic Status Menu Items (Perl) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This Perl script illustrates how to create a dynamic Status Menu application in Platypus. When invoked without arguments, it prints menu items; when an item is selected (receiving an argument), it uses `/usr/bin/say` to speak the selected menu item's title. ```Perl #!/usr/bin/perl # If 0 arguments, we show menu if (!scalar(@ARGV)) { print "Life's but a walking shadow, a poor player\n"; print "That struts and frets his hour upon the stage\n"; print "And then is heard no more.\n"; } else { # We get the menu title as an argument system("/usr/bin/say \"$ARGV[0]\""); } ``` -------------------------------- ### Copying Bundled File to Home Directory (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This shell command demonstrates how to copy a file that has been bundled within a Platypus application to the user's home directory. Since the script runs from the application's Resources directory, bundled files are directly accessible from the script's current working directory. ```Shell cp file.txt ~/ ``` -------------------------------- ### Copying Bundled Files to User Home Directory (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet demonstrates how a shell script within a Platypus-generated application can copy a bundled file (e.g., 'file.txt') to the user's home directory. The script runs from the application's Resources directory, making bundled files directly accessible by name. ```Shell cp file.txt ~/ ``` -------------------------------- ### Loading URL in Web View from Script Output (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html If the interface type was set to 'Web View', printing a line in this format will cause the Web View to load the specified URL. ```Plain Text LOCATION:http://some.url.com\\n ``` -------------------------------- ### Setting Status Menu Item Icons (Platypus Syntax) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html These lines illustrate the special Platypus syntax for assigning icons to individual menu items within a Status Menu application. Icons can be sourced from bundled files, absolute file paths, or remote URLs. Each line defines an icon for a subsequent menu item. ```Platypus Command Syntax MENUITEMICON|my_bundled_file.png|Bundled file example MENUITEMICON|/path/to/icon.png|Absolute path example MENUITEMICON|https://sveinbjorn.org/images/andlat.png|Remote URL example ``` -------------------------------- ### Prompting User Input with AppleScript via osascript (Perl) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This Perl script shows how to use `osascript` to execute AppleScript code from a Platypus application, enabling advanced user interaction. It defines a `dialog` function to display a customizable input dialog and capture the user's response. ```Perl #!/usr/bin/perl use strict; sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); } sub dialog { my ($text, $default) = @_; osascript(qq{ tell app "System Events" text returned of (display dialog "$text" default answer "$default" buttons {"OK"} default button 1 with title "Riddle") end tell }); } my $result = dialog("Answer to life, the universe and everything?", "42"); ``` -------------------------------- ### Implementing Dynamic Status Menu Items (Perl) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Perl script serves as the core logic for a Platypus Status Menu application. When invoked without arguments, it prints lines that become menu items. If an argument is provided (indicating a menu item selection), it uses /usr/bin/say to speak the selected item's title. This allows the script to dynamically generate menu content and respond to user interactions. ```Perl #!/usr/bin/perl # If 0 arguments, we show menu if (!scalar(@ARGV)) { print "Life's but a walking shadow, a poor player\n"; print "That struts and frets his hour upon the stage\n"; print "And then is heard no more.\n"; } else { # We get the menu title as an argument system("/usr/bin/say \"$ARGV[0]\""); } ``` -------------------------------- ### Showing a Notification from Script Output (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This syntax enables a script within a Platypus application wrapper to send a notification to the User Notification Center. The 'My title' and 'My text' parts define the notification's content. ```Plain Text NOTIFICATION:My title|My text\n ``` -------------------------------- ### Displaying an Alert from Script Output (Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet illustrates the specific text syntax that a script must print to standard output for the Platypus application wrapper to display an alert dialog. The format includes a 'Title' and 'Text' separated by a pipe symbol, followed by a literal newline character (`\n`) to signal the end of the alert command. ```Text ALERT:Title|Text\\n ``` -------------------------------- ### Creating Status Menu Separators (Platypus Syntax) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This line demonstrates the Platypus syntax for inserting a visual separator line within a Status Menu. It helps organize menu items into logical groups, improving user interface clarity. ```Platypus Command Syntax ---- ``` -------------------------------- ### Flushing Output Buffer in Python Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This Python snippet imports the `sys` module and then calls `sys.stdout.flush()`. This explicitly flushes the standard output buffer, ensuring that any printed content is immediately written to the console, which is useful when real-time output is required from a script. ```Python import sys sys.stdout.flush() ``` -------------------------------- ### Terminating Application from Script Output (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html Printing the string 'QUITAPP' followed by a newline to STDOUT will cause the Platypus application wrapper to terminate. ```Plain Text QUITAPP\\n ``` -------------------------------- ### Flushing Output Buffer in Python Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Python snippet demonstrates how to manually flush the standard output buffer. This is useful when script output is not being shown in real-time until the script completes. Alternatively, the Python interpreter can be run with the -u flag for unbuffered output. ```Python import sys sys.stdout.flush() ``` -------------------------------- ### Controlling Progress Bar from Script Output (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html For script apps with a 'Progress Bar' interface, printing a line in this format updates the progress bar's completion percentage. The '\d+' represents the percentage value (e.g., 75). ```Plain Text PROGRESS:\\d+\\n ``` ```Plain Text PROGRESS:75 ``` -------------------------------- ### Signing Platypus-Generated Application (Shell) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This command shows how to digitally sign a Platypus-generated macOS application using the `codesign` utility. Signing the application with a valid developer identity is crucial to bypass GateKeeper approval prompts on macOS, improving the user experience. ```Shell /usr/bin/codesign -s "your-signing-identity" path/to/MyApp.app ``` -------------------------------- ### Creating Status Submenus (Platypus Syntax) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Platypus syntax allows for the creation of nested submenus within a Status Menu. The first pipe-separated value is the submenu's title, followed by its constituent menu items. This enables hierarchical organization of menu options. ```Platypus Command Syntax SUBMENU|Title|Item1|Item2|Item3 ``` -------------------------------- ### Locating MainMenu.nib within Platypus App Bundle (Filesystem) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet provides the relative path to the MainMenu.nib file within a Platypus-generated application bundle. This nib file contains the user interface layout and can be manually edited using Apple's Xcode for custom window dimensions or UI changes. ```Text Contents/Resources/MainMenu.nib ``` -------------------------------- ### Defining Platypus UI Layout and Typography Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This CSS block defines the core visual styling for the Platypus application, including font settings, container layout, body content appearance, link styles, and specific formatting for markdown elements like headings, tables, blockquotes, and code blocks. It also includes print-specific adjustments for the main layout containers to optimize for physical output. ```CSS html { font: 14px 'Helvetica Neue', Helvetica, arial, freesans, clean, sans-serif; } .container { line-height: 1.6; color: #333; background: #eee; border-radius: 3px; padding: 3px; width: 790px; margin: 10px auto; } .body-content { background-color: #fff; border: 1px solid #CACACA; padding: 30px; } .body-content > *:first-child { margin-top: 0 !important; } a, a:visited { color: #4183c4; text-decoration: none; } a:hover { text-decoration: underline; } p, blockquote, ul, ol, dl, table, pre { margin: 15px 0; } .markdown-body h1 , .markdown-body h2 , .markdown-body h3 , .markdown-body h4 , .markdown-body h5 , .markdown-body h6 { margin: 20px 0 10px; padding: 0; font-weight: bold; } h1 { font-size: 2.5em; color: #000; border-bottom: 1px solid #ddd; } h2 { font-size: 2em; border-bottom: 1px solid #eee; color: #000; } img { max-width: 100%; } hr { background: transparent url("/img/hr.png") repeat-x 0 0; border: 0 none; color: #ccc; height: 4px; padding: 0; } table { border-collapse: collapse; border-spacing: 0; } tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body tr { border-top: 1px solid #ccc; background-color: #fff; } td, th { border: 1px solid #ccc; padding: 6px 13px; } th { font-weight: bold; } blockquote { border-left: 4px solid #ddd; padding: 0 15px; color: #777; } blockquote > :last-child, blockquote > :first-child { margin-bottom: 0px; } pre, code { font-size: 13px; font-family: 'UbuntuMono', monospace; white-space: nowrap; margin: 0 2px; padding: 0px 5px; border: 1px solid #eaeaea; background-color: #f8f8f8; border-radius: 3px; } pre > code { white-space: pre; } pre { overflow-x: auto; white-space: pre; padding: 10px; line-height: 150%; background-color: #f8f8f8; border-color: #ccc; } pre code, pre tt { margin: 0; padding: 0; border: 0; background-color: transparent; border: none; } @media print { .container { background: transparent; border-radius: 0; padding: 0; } .body-content { border: none; } } ``` -------------------------------- ### Controlling Progress Bar Details Visibility (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html These commands control the visibility of the 'Details' text field within a progress bar interface. 'DETAILS:SHOW' makes it visible, and 'DETAILS:HIDE' hides it during script execution. ```Plain Text DETAILS:SHOW ``` ```Plain Text DETAILS:HIDE ``` -------------------------------- ### Autoflushing Output Buffer in Perl Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This Perl snippet sets the `$` variable to `1`, which enables autoflushing of the output buffer. This ensures that script output is displayed immediately rather than being buffered until the script completes, which is crucial for interactive applications or progress indicators. ```Perl $| = 1; ``` -------------------------------- ### Piping STDERR to STDOUT in Shell Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This shell command demonstrates how to execute a Perl script (`myScript.pl`) and redirect its standard error output (`STDERR`) to its standard output (`STDOUT`). This is useful for capturing all script output, including errors, in a single stream. ```Shell perl myScript.pl 2>&1 ``` -------------------------------- ### Clearing Output Buffer from Script Output (Plain Text) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html Printing the string 'REFRESH' followed by a newline to STDOUT will clear the application's text output buffer, useful for refreshing content like a Web View. ```Plain Text REFRESH\\n ``` -------------------------------- ### Flushing Output Buffer in Perl Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Perl snippet sets the $| variable to 1, which enables autoflushing of the output buffer. This ensures that script output is displayed immediately rather than being buffered until the script finishes execution. ```Perl $| = 1; ``` -------------------------------- ### Dynamically Changing Status Bar Icon (Platypus Syntax) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Platypus syntax enables the script to dynamically change the icon displayed in the macOS menu bar's status item. The icon can be specified as a bundled image filename, an absolute file path, or a remote URL, allowing for visual feedback or state changes. ```Platypus Command Syntax STATUSICON|bundled image filename or absolute path or URL ``` -------------------------------- ### Adding a Menu Separator to Status Menu (Platypus Text Format) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/old/OldDocumentation.html This snippet shows the specific text format required to create a menu separator within a Platypus Status Menu application. Printing this string to standard output will render a horizontal line in the menu. ```Platypus Text Format ----\n ``` -------------------------------- ### Redirecting Stderr to Stdout in Shell Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This shell command demonstrates how to redirect standard error (stderr) to standard output (stdout) for a Python script. This is useful in Platypus when running with root privileges, as stderr output cannot be captured directly due to Security API limitations, allowing errors to be piped and captured via stdout instead. ```Shell python script.py 2>&1 ``` -------------------------------- ### Disabling Status Menu Items (Platypus Syntax) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Platypus syntax is used to display a menu item in a disabled (greyed-out) state, indicating that it is currently unavailable for selection. The text following 'DISABLED|' is the name of the item to be disabled. ```Platypus Command Syntax DISABLED|Name of item ``` -------------------------------- ### Dynamically Changing Status Bar Title (Platypus Syntax) Source: https://github.com/sveinbjornt/platypus/blob/master/Documentation/Documentation.html This Platypus syntax allows the script to dynamically update the title displayed in the macOS menu bar's status item. The text after 'STATUSTITLE|' will be set as the new title for the Platypus application's status bar icon. ```Platypus Command Syntax STATUSTITLE|Title ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.