Skip to main content
13 events
when toggle format what by license comment
Oct 9, 2020 at 14:30 comment added Kevin Thank a lot, that work fine, I'm going off-topic but I changed the scriptToRun path to "property scriptToRun : "/Users/myusername/cloud/AppleScript/scripts/demo.scpt"" and I keep getting an error "scriptToRun is not defined" which I don't understand, when I run the same demo.scpt with the same path in a new code, it's work just fine
Oct 9, 2020 at 12:40 vote accept Kevin
Oct 8, 2020 at 17:07 comment added wch1zpink OK guys my revised answer should be able to withstand scrutinizing now LOL
Oct 8, 2020 at 17:05 history edited wch1zpink CC BY-SA 4.0
added 9 characters in body
Oct 8, 2020 at 16:55 history edited wch1zpink CC BY-SA 4.0
added 9 characters in body
Oct 8, 2020 at 9:26 comment added CJK @Kevin No, you're not doing it wrong. The script is wrong. In the en_GB locale, at least, the name of the process should be "NoficationCenter" (which is one word). However, this will vary by locale, and your best bet is to reference the process like so: tell app id "com.apple.SystemEvents" to tell the first process whose bundle identifier = "com.apple.notificationcenterui" to.... The bundle identifier will always be the same across the world, so that should get you the correct targeting reference. I wouldn't use this script if I were you, however (at least until it's amended).
Oct 8, 2020 at 9:08 comment added CJK Why all the try blocks ? They're unnecessary, it's lazy, and it's setting a bad example. And NO! to an infinite repeat loop. Never, ever. Thing is, I know you know all this, so that makes this script even more peculiar. I hope you'll consider revising the script, particularly the repeat loop.
Oct 3, 2020 at 21:29 history edited wch1zpink CC BY-SA 4.0
deleted 1 character in body
Oct 3, 2020 at 21:19 history edited wch1zpink CC BY-SA 4.0
added 17 characters in body
Oct 3, 2020 at 19:45 history edited wch1zpink CC BY-SA 4.0
added 799 characters in body
Oct 3, 2020 at 15:05 vote accept Kevin
Oct 9, 2020 at 12:40
Oct 3, 2020 at 15:05 comment added Kevin Thank you, I'm looking at it but I always get an error (-> error number -1728 from process "Notification Center") but I'm nearly sure it's something I'm doing wrong.
Oct 2, 2020 at 18:17 history answered wch1zpink CC BY-SA 4.0