Whitman Huntley
Whitman Huntley

Reputation: 31

Applescript: "Expected end of line, etc. but found class name."

I've been working on an AppleScript and I received this error: /Users/MYUSER/taskmaster/chromeCanary/lib/overrideOpenChrome.scpt:373:377: script error: Expected end of line, etc. but found class name.

The odd part is that this script seemed to work before so I'm at even more confused, the script is below:

 #!/usr/bin/osascript


 set ccss to "/Users/MYUSER/taskmaster/chromeCanary/chromeShouldStop/bool.rtf"
 set ccsr to "/Users/MYUSER/taskmaster/chromeCanary/chromeShouldRun/bool.rtf"

 do shell script "mv " & ccss & " " & ccsr 

 tell application "Google Chrome Canary"
   activate
 end tell
 display notification "30 Minutes remain" with title "TaskMaster" subtitle "Google Chrome Canary" with icon file "Users:MYUSER:taskmaster:assets:chrome-icon.icns"
 delay 900
 display notification "15 Minutes remain" with title "TaskMaster" subtitle "Google Chrome Canary" with icon file "Users:MYUSER:taskmaster:assets:chrome-icon.icns"
 delay 600
 display notification "5 Minutes remain" with title "TaskMaster" subtitle "Google Chrome Canary" with icon file "Users:MYUSER:taskmaster:assets:chrome-icon.icns"
 delay 60
 display notification "3 Minutes remain" with title "TaskMaster" subtitle "Google Chrome Canary" with icon file "Users:MYUSER:taskmaster:assets:chrome-icon.icns"
 delay 60
 display notification "1 Minute remain" with title "TaskMaster" subtitle "Google Chrome Canary" with icon file "Users:MYUSER:taskmaster:assets:chrome-icon.icns"
 tell application "Google Chrome Canary"
   quit
 end tell
 do shell script "mv " & ccsr & " " & ccss 

Where would my problem be? The paths are correct, I checked and double checked so it couldn't be that.

EDIT: I'm stupid. See my answer below if you've stumbled across this ask with the same/similar error.

Upvotes: 2

Views: 2043

Answers (1)

Whitman Huntley
Whitman Huntley

Reputation: 31

Ok, so apparently you can't use with icon file & display notification, you can only use it with display dialog. The closest you can get is messing about with the app's icon.

Upvotes: 1

Related Questions