sveinbjornt / Platypus

Create native Mac applications from command line scripts.
https://sveinbjorn.org/platypus
BSD 3-Clause "New" or "Revised" License
2.84k stars 171 forks source link

Status menu: Menu argument not being passed #260

Open dannythunder opened 1 year ago

dannythunder commented 1 year ago

I'm doing a status menu item that I'm going to use to open Rider with env. vars loaded (Rider has a problem with loading env. vars when starting it normal).

It should be simple, but I must be missing some obvious here.

This is my assumption after reading the docs:

But the argument seem to be empty for me. I tried a bunch of stuff (just one example posted here)

My simple menu:

CleanShot 2023-10-11 at 14 28 48@2x

Platypus app

CleanShot 2023-10-11 at 14 44 22@2x

Platypus version

CleanShot 2023-10-11 at 14 44 41@2x

Found this issue, but it didn't help me much:

Status Menu variable not being sent to bash script #226

The script:

#!/bin/zsh

openRider="Öppna Rider"
quit="Avsluta"

if [ $# -eq 0 ]
then

    echo $openRider
    echo $quit

else # else for now when testing

    #Open Finder if it works, just for testing
    open -R .

    # TODO Load external env vars.

        #open ~/Library/Application\ Support/JetBrains/Toolbox/apps/Rider/ch-0/232.9921.83/Rider.app
fi

Bonus question

How do a get an alert? echo alert from documentation is not working for me (becomes a menu option with the "error text" if there is something wrong).