I’m afraid I’m only beginning to figure out how to use Applescript, but until I have some meagre proficiency, can anyone suggest a script that can toggle the lock/unlock status of a file selected in DT?
I tend to need to change locking status a lot, and being able to do it with a single KB shortcut would be great. Even two separate scripts to lock and unlock would be great… thanks in advance to anyone who can help!
-- see https://discourse.devontechnologies.com/t/script-to-toggle-lock-unlock-status-for-file/13638/1
-- can be used with, e.g., KeyBoard Maestro to toggle locking for a group of records
-- record selection can be non-contiguous and include groups
-- change commenting at [a] depending on the lock state you want this script to change
tell application id "com.devon-technologies.thinkpro2"
repeat with eachItem in (selection as list)
-- [a] -- un/comment one or the other (not both) depending on lock state desired
-- set locking of eachItem to true
set locking of eachItem to false
end repeat
end tell