Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
As soon as I updated to Mac 12.3, my ChronoSync AppleScript tasks broke with a "The application “ChronoSync.app” can’t be opened. 1703" error.

The basic AppleScript looks like this (I've removed my paths below but the AppleScript is the same otherwise):

tell application "Finder" to open alias "<path_to_sync_task>"
tell application "ChronoSync"
activate
set myDocument to document "<sync_docuument_name>"
tell myDocument
Synchronize
delay 1
repeat while syncStatus is not 0
delay 1
end repeat
save
close
end tell
quit
end tell

------------

Does anyone know of a workaround for this problem?

Thanks,
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,012
Try to put the path to the app in the script
tell application "/Applications/ChronoSync.app"
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
Try to put the path to the app in the script
tell application "/Applications/ChronoSync.app"
That sounded like a good idea! Unfortunately, now nothing happens including no error. I appreciate your idea. :)
Thanks!
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,012
Maybe this will work
do shell script “open -a /Applications/ChronoSync.app"
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
This JavaScript is part of a keyboard maestro macro which executes and picks the right sync task based on which USB drive I connect. So there’s more to it than just starting chrnosync. I will contact the company next week.
Thank you.
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,012
Regardless of the rest of that AppleScript, the app should be launched with any of the above commands.
Does it start from Launchpad or with double click/right click – open from Finder?
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
Inside the AppleScript the "open" command has no effect at all. AppleScript does not work with that and nothing happens. Yes, I can open ChronoSync by just executing it or by using Spotlight. I will post back with a resolution when availale.
 

MikeDr206

macrumors 6502a
Oct 9, 2021
513
359
Any update? I am heavily invested in AppleScript automation, and am fearful of updating to 12.3 as a result.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
I wish. The Chronosync people have been thus far unresponsive on this issue after reported (AFAIK, they have not tested anything, confirmed the bug(s), or offfered any workarounds for the AppleScript ... on their site). My only use for AppleScript was for this one item so for now, I just start ChronoSync and manually (oh no!) pick the sync task. I'll report back if anything changes.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
That's exactly what I have, and CS does ... "start", but whatever is going on in their AS fails to start the sync task any longer. I'm a Java/Python person not AS so there's probably something a skilled AS person could figure out to get this working again.

Do you have Keyboard Maestro?
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,012
Check if the ChronoSync app still has full disk access.
Even if it has, close the app, remove it from the list and add it again.
I don’t have Keyboard Maestro.
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
I'm sure it does since I can select the sync task manually and do a full disk backup.

I'll post back when/if I ever get any resolution on this (before 12.1).... :(

THanks
 

Mork

macrumors 6502a
Original poster
Jan 9, 2009
539
34
OK, CS replied with an updated AppleScript that works for me.

Here's the old code that doesn't work on 12.3:

tell application "Finder" to open alias "<path_to_sync_task>"
tell application "ChronoSync"
activate
set myDocument to document "<sync_docuument_name>"
tell myDocument
Synchronize
delay 1
repeat while syncStatus is not 0
delay 1
end repeat
save
close
end tell
quit
end tell

-------

Here is the updated code that does work on 12.3

tell application "Macintosh HD:Applications:ChronoSync.app"
activate
open file "Macintosh HD:Users:<user_directory_name_here>:Library:Application Support:ChronoSync:Tasks:ScriptTest.sync"
set myDocument to document "ScriptTest.sync"
tell myDocument
Synchronize
delay 1
repeat while syncStatus is not 0
delay 1
end repeat
save
close
end tell
quit
end tell

---

Hope this helps! :)

Thanks again to all.
 
  • Like
Reactions: MikeDr206

MikeDr206

macrumors 6502a
Oct 9, 2021
513
359
OK, CS replied with an updated AppleScript that works for me.

Here's the old code that doesn't work on 12.3:

tell application "Finder" to open alias "<path_to_sync_task>"
tell application "ChronoSync"
activate
set myDocument to document "<sync_docuument_name>"
tell myDocument
Synchronize
delay 1
repeat while syncStatus is not 0
delay 1
end repeat
save
close
end tell
quit
end tell

-------

Here is the updated code that does work on 12.3

tell application "Macintosh HD:Applications:ChronoSync.app"
activate
open file "Macintosh HD:Users:<user_directory_name_here>:Library:Application Support:ChronoSync:Tasks:ScriptTest.sync"
set myDocument to document "ScriptTest.sync"
tell myDocument
Synchronize
delay 1
repeat while syncStatus is not 0
delay 1
end repeat
save
close
end tell
quit
end tell

---

Hope this helps! :)

Thanks again to all.
Great, thanks for posting this! I’ve been hesitant to upgrade to 12.3, because my workflow relies a lot on AppleScript. It’s good to know that there are potential workarounds.
 

Dr.HD

macrumors newbie
Mar 28, 2022
1
1
For the benefit of others encountering similar problems:

what you all missed here was that it was in fact the very first line of the AppleScript that doesn't work in 12.3:

tell application "Finder" to open alias "<path_to_sync_task>"

It would appear that in 12.3, you can no longer tell the Finder to open things. Essentially, the Finder itself can't open anything; it always calls another app to open whatever it is that you are trying to open. Making an educated guess, it would seem that Apple have decided that this is a security risk in a scripting context (or this has happened by accident as a result of some other security-related under-the-hood change).

So to fix any AppleScript -1703 errors, you need to check if you have any "tell application "Finder" to open ..." type commands, and instead determine which app is the "owner" of the thing that you are trying to "open" with the Finder, and instead of telling Finder to open that thing, tell the "owner" app to open that thing. e.g., if the "thing" is a text file, instead of:
tell application "Finder" to open "path/to/thing.txt"
do:
tell application "TextEdit" to open "path/to/thing.txt"

Good luck!
 
  • Like
Reactions: MikeDr206
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.