thank you for the clear and detailed instructions which I followed.
Hey Ronald
This AppleScript will provide a complete report of all installed OSAXEN.
Osax Report.scpt.zip (9.3 KB)
The 24U Appearance OSAX was a great scripting addition, but it has not been well supported in the last few years. (I don't like the way v4.x phones-home either.)
Default Folder 5 no longer relies on the Default Folder X Addition.osax.
The SIMBL.osax is not something you should have on your system, unless you know what requires it. It allows code-injection into apps, and theoretically is a serious security threat. I reluctantly stopped using utilities that required it several years ago for that reason and because it made my system a little less stable.
-Chris
Thank you. I deleted it, and thanks for the apple script
Thank you very much for the script. This is the result. What should I do now? I could delete textexpander which would be a pain because I have a library of snippets. That being said, I trust your advice
INSTALLED OSAX REPORT 2016/10/21 14:07
System Domain Osaxen
/System/Library/ScriptingAdditions/
Digital Hub Scripting.osax
StandardAdditions.osax
Local Domain Osaxen
/Library/ScriptingAdditions/
Adobe Unit Types.osax
Default Folder X Addition.osax
SIMBL.osax
User Domain Osaxen
~/Library/ScriptingAdditions/
TextExpander Addition.osax
/System/Library/ScriptingAdditions/ â Leave this folder as it is. These Additions are installed by macOS
Digital Hub Scripting.osax
StandardAdditions.osax
/Library/ScriptingAdditions/
Adobe Unit Types.osax â Installed by Adobe products. Check the version of the .osax (Finder Info), it should be 2.1.0. If itâs older then update it.
Default Folder X Addition.osax â See Chrisâ (@ccstone) post above.
SIMBL.osax â Ditto.
~/Library/ScriptingAdditions/
TextExpander Addition.osax â Keep it if youâre using the Textexpander app.
â
I could delete textexpander which would be a pain because I have a library of snippets.
I think nobody has said you should delete Textexpander.
thank you
your help was invaluable. thanks so much for the applie script.
Thanks Tom! That is so awesome!!
Thanks for the feedback. Me too, Iâm happy with the script
For a maximum of convenience you can map the trigger to the Media Eject key of your keyboard (â) as shown in one of the posts above. (I have not included that trigger in the downloadable macro because that key is probably device-specific.)
But: If you are going to map it to the â key, then I recommend to not do it as I have shown it in the post above: Instead of selecting âignoring modifiersâ I recommend to select âwith these modifiersâ with no modifier key selected. Like this:
The reason is, with that trigger you are still able to use the other, system functions of the â key. (The system functions of the â key are described here.)
Got it and thanks again! I had mapped the trigger to the Media Eject key like you mentioned in the post and itâs working great. I like that better than the hot key I had first set it up with. But now Iâll go back and change it to the way you suggest here.
After reading this thread and thinking about my situation I did a little study on Apple Script; wow itâs confusing! I was going to try to add to the script to unmount network drives/mounts but I couldnât figure out how to do it. I found a way to list the disks that are not âlocal volumesâ but then I couldnât figure out how to do anything with them like list the contents of the disk or eject them. It may not be âejectableâ b/c it doesnât show up in the list of disks with ejectable set to true but in Finder it has the little eject icon beside it and thatâs how I disconnect from it normally (unless I forget and just unplug from the network). And thatâs why I was hoping it would be ejected also just so I donât mess up the network drive.
Not a big deal though and I may work on it some more when I have time; it was kind of a fun project. Now if you happen to know right off the top of your head how to eject a network mount using Apple Script then of course I would take your advice ha! But please donât take this as a request for you to try to figure it out! I feel like youâve already bent over backward to answer the questions on this thread.
Thank you very much for your help here!
Scott Murff
Bill Murff Turf Farm, Inc.
281-328-2812
www.murffturf.comhttp://www.murffturf.com
If you found it at all interesting, I encourage you to look into it. There are many great resources online and many great tutors here. I've been learning AppleScript (slowly) for the past few weeks and am really enjoying it.
Thanks Christian! It was very interesting and I can see how it would make me more productive if I knew how to really use it; especially combining it with KM!
Remove or comment out the âwhose ejectable is trueâ in line 2 of the script. So that it reads:
tell application "Finder" to set diskList to name of every disk --whose ejectable is true
Network-mounted folders should now also appear in the list and you should be able to unmount them with the script. (I only tried it with an AFP share.)
Note: The list will now be polluted with not-unmountable disks like for example your startup disk. However, this should only be a cosmetic problem, since nothing should happen when you try to unmount the startup disk.
When I find the time Iâll try to figure out how to exclude them from the list.
###Edit:
OK, try it with this as line 2 in the script:
tell application "Finder" to set diskList to name of every disk whose URL starts with "file:///Volumes/"
This should exclude things like the startup disk from the list.
Thanks again Tom! Iâll give it a shot.
Please check again. I corrected a pasting error in the 2nd snippet (wrong variable name). Sorry, just seen it now.
Yes I changed that before. I wondered about it and got an error when Trying it so just changed it to diskList and it worked! The error said inVolume wasnât defined and I figured it was just a typo or something.
Thanks for your help and expertise!
Scott
Thanks @Tom for providing these very good script.
Since I am not (yet) the best with AppleScript, would I be interested to know if such a "List Disks - Script" can also be used to activate selected discs?
Via Disk Utility:
Terminal:
diskutil mountDisk "Archive I"
where Archive I
is the name of the disk.
(You can get the name of the disks with diskutil list
.)
Or embedded in an AppleScript:
do shell script "diskutil mountDisk \"Archive I\""
OK, here is a simplistic macro to mount disks (derived from my âList and Eject Disksâ macro):
Mount Disks [simple version].kmmacros (4.5 KB)
âSimplisticâ because you have to manually set your list of disks in the AppleScript before the first run.
tell application "Keyboard Maestro Engine" to set theDisk to getvariable "previousDisk"
# Set your available disks here
set diskList to {"Archive I", "3TB-WD-B"}
if diskList does not contain theDisk then set theDisk to item 1 of diskList
tell application (path to frontmost application as text) to set theDisk to choose from list diskList with title "Mount Disk" with prompt "Select disk(s) to mount:" default items theDisk with multiple selections allowed
if theDisk is not false then
repeat with i in theDisk
do shell script "diskutil mount" & space & quoted form of i
end repeat
tell application "Keyboard Maestro Engine" to setvariable "previousDisk" to item 1 of theDisk
end if
â
Edit/addition:
Here is an extended version of the âMount Discâ macro from above:
It compares your disk list with the list of already mounted disks. Then it presents only the mountable disks (= disks that are not already mounted) in the list dialog.
Nevertheless, I leave the âsimpleâ version of the script posted, because it cannot be excluded that a disk that is considered mounted is in reality not (properly) mounted, in certain cases. So, if you find that there are disks missing in the list dialog, then use the simple version from above, which just displays all disks, not regarding their presumed mount status.
List and Mount Unmounted Disks.kmmacros (5.6 KB)
tell application "Keyboard Maestro Engine" to set theDisk to getvariable "previousDisk"
# Set your available disks here
set diskList to {"Archive I", "3TB-WD-B"}
# Compare with the list of already mounted disks
set mountedDisks to {}
set mountableDisks to {}
try
tell application "Finder" to set mountedDisks to name of every disk whose URL starts with "file:///Volumes/"
# Alternate way (but usually the first way works better):
# tell application "Finder" to set mountedDisks to name of every disk whose ejectable is true
end try
repeat with i in diskList
if i is not in mountedDisks then set end of mountableDisks to i
end repeat
if (count of mountableDisks) < 1 then
display alert "No mountable disks found."
error number -128
end if
if mountableDisks does not contain theDisk then set theDisk to item 1 of mountableDisks
tell application (path to frontmost application as text) to set theDisk to choose from list mountableDisks with title "Mount Disk" with prompt "Select disk(s) to mount:" default items theDisk with multiple selections allowed
if theDisk is not false then
repeat with i in theDisk
do shell script "diskutil mount" & space & quoted form of i
end repeat
tell application "Keyboard Maestro Engine" to setvariable "previousDisk" to item 1 of theDisk
end if
While writing the âMountâ script above I found some minor issues in the original script. So, here an
Update for the âList and Eject Disksâ macro (see original post)
Changes â ver 2.2:
- âpreviousDiskâ now saves the first disk (so something gets saved if the list contains >1 entries).
- Proper handling if no ejectable disk is found.
List and Eject Disks [ver 2.2].kmmacros (3.8 KB)
tell application "Keyboard Maestro Engine" to set diskToEject to getvariable "previousDisk"
try
tell application "Finder" to set diskList to name of every disk whose URL starts with "file:///Volumes/"
# Alternate way (but usually the first way works better):
# tell application "Finder" to set diskList to name of every disk whose ejectable is true
on error
display alert "No ejectable disks found."
error number -128
end try
if diskList does not contain diskToEject then set diskToEject to item 1 of diskList
tell application (path to frontmost application as text) to set diskToEject to choose from list diskList with title "Eject Disk" with prompt "Select disk(s) to eject:" default items diskToEject with multiple selections allowed
if diskToEject is not false then
tell application "Finder" to eject diskToEject
tell application "Keyboard Maestro Engine" to setvariable "previousDisk" to item 1 of diskToEject
end if