Hello,
I have the following simple code, but it doesn't work for me
The error
The problem in if statement but i dunno what is exactly wrong.
I have the following simple code, but it doesn't work for me
Code:
#!/usr/bin/osascript
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"})
end tell
if (length of username is more than 1) and (length of macname is more than 1) then display alert "Alert" message "Too short"
end if
The error
Code:
./new.command:351:355: script error: Expected "," but found identifier. (-2741)
The problem in if statement but i dunno what is exactly wrong.