Hello,
I'm trying to pass variables from Applescript to bash using the following code
but no luck
Any ideas?
I'm trying to pass variables from Applescript to bash using the following code
Code:
#!/bin/bash
osascript <<EOF
tell application "SystemUIServer"
set username to text returned of (display dialog "Enter your name" with icon caution default answer "" buttons{"Continue"})
set macname to text returned of (display dialog "Enter name of your Mac" with icon caution default answer "" buttons{"Continue"})
do shell script "export USERNAME=" & quoted form of username & " && export MACNAME=" & quoted form of macname
end tell
EOF
echo "USERNAME is $USERNAME, MACNAME is $MACNAME"
but no luck
Code:
Mac-mini:Downloads admin$./new.command
USERNAME is , MACNAME is