bharadwaj-raju / WeatherDesk

MOVED: https://gitlab.com/bharadwaj-raju/WeatherDesk
https://gitlab.com/bharadwaj-raju/WeatherDesk
GNU General Public License v3.0
217 stars 31 forks source link

OS X Mavericks: Syntax error #5

Closed devsli closed 8 years ago

devsli commented 8 years ago

Problem

% cat ~/.weatherdesk_script.AppleScript
tell application 'Finder'
set desktop picture to POSIX file "/Users/sli/Pictures/FireWatch-WeatherDesk-Pack-master/normal.jpg"
end tell
% osascript ~/.weatherdesk_script.AppleScript
17:18: syntax error: Expected expression, property or key form, etc. but found unknown token. (-2741)

Solution

Replace ' with "

% cat ~/.weatherdesk_script.AppleScript | sed s/\'/\"/g                   
tell application "Finder"
set desktop picture to POSIX file "/Users/sli/Pictures/FireWatch-WeatherDesk-Pack-master/normal.jpg"
end tell
% cat ~/.weatherdesk_script.AppleScript | sed s/\'/\"/g | osascript
% echo $?
0
bharadwaj-raju commented 8 years ago

You are late by minutes, friend!

A user just reported this on reddit and it is fixed with commit 47c9717

devsli commented 8 years ago

Yep, it's working, thanks!