How to include variables in the text shown in a osascript display dialog
1
vote
1
answer
406
views

osascript
display dialog
is become more complex. Now it's working thanks to the help got here .
But I'm not being able to get the variable PROCESS_NAME
properly:
PROCESS_NAME="Telegram"
DIALOG_RESULTS="$(osascript -e 'set {T,B} to {text returned, button returned} of (display dialog "Minutes to remember to close $((PROCESS_NAME))" default answer "1" with icon caution buttons {"Keep Open", "CLOSE APP & take a break"} default button 1)' -e 'return T & "\t" & B')" &&MINUTES_UNTIL_ASK_TO_CLOSE="$(echo "$DIALOG_RESULTS" |cut -f 1)" &&BUTTON_RETURNED="$(echo "$DIALOG_RESULTS" |cut -f 2)"
The current (wrong) output is this:
> Minutes to remember to close **$((PROCESS_NAME))**
The desired (correct) output should be:
> Minutes to remember to close **Telegram**
Asked by chelder
(227 rep)
May 18, 2023, 12:25 PM
Last activity: May 22, 2023, 03:57 PM
Last activity: May 22, 2023, 03:57 PM