Tag Info

Hot answers tagged

2

Use {"com.apple.icns"} as the file type. set Icon to (POSIX path of (choose file of type {"com.apple.icns"} with prompt "Select a .icns file.")) (Found by running "mdls myiconfile.icns") kMDItemContentType = "com.apple.icns"


2

This problem is caused by Apple's sandboxing of applications (in this case, OmniGraffle. Preview does not receive an entitlement to access the PDF if you just pass it a string to open. From Apple's release notes: Compatibility Notes When sending commands to a sandboxed application, such as TextEdit in OS X Mountain Lion, parameters that refer to ...


2

Update: I originally thought You don't need Applescript to do this. And you could create a Smart Group that does it for you. BUT the 'Company: is set' is not for the checkbox. Its for the actual Company text field. So you cannot use the above for this as it does not care if the checkbox for company is ticked or not. It only cares if there is ...


1

I'll take my comment and make it into an answer; assuming I understand what you're looking for at least. Tested this code and it works fine for me. You'll need to adjust the numbers to indicate the relative position of your monitor. Assuming you don't move your screens around, it's a one-time entry. Credit to this answer on SO which also provides a link to ...


1

This script in an Automator Dictation command seems to work. Not the fullscreen will not work properly if run in Automator or Script editor. It picks up the previous window 1. But any time I got the Dictation command to work. ( always find a bit of a pain to get them to understand me) It got the right window 100%. This script uses system profiler to get ...


1

Open the two files with Preview, then run the following to position the windows: tell application "Preview" activate set the bounds of the first window to {0, 0, 700, 1000} set the bounds of the second window to {700, 0, 1400, 1000} end tell Customise the coordinates as you wish depending on monitor resolution. Syntax: {x1, y2, x1, y2} Enable ...


1

Just to help out a bit more: In your main user directory /home// create a directory named 'bin' and put SwitchAudioSource in there. Here's some AppleScript which switches back and forth between two sources, the default 'headphone' mini jack output on the back of my Mac Mini (a laptop should be different), and my Sennheiser USB headsest. Call me 'Captain ...


1

Changing tell application "Finder" to mount volume "afp://Data_Cube.local/Scotts Stuff" to mount volume "afp://Data_Cube.local/Scotts Stuff" seems to be the resolution. As mount is part of the standard scripting library.


1

Well, it might kind of work, but idk if it would do what you want to achieve. This script tell application "TextEdit" activate make new document delay 1 repeat 100 times tell application "System Events" keystroke "the quick brown fox jumps over the lazy dog" keystroke return end tell end repeat ...


1

If you look in the StanardAdditions.sdef. Menubar menu : Windows-> Library Double click: StanardAdditions And change the dropdown to Javascript You will see that many of the script command change to the camelHump syntax app = Application.currentApplication() app.includeStandardAdditions = true; app.doShellScript('ls')


1

The answer has been posted on the Applescript user list: http://lists.apple.com/archives/applescript-users/2015/Jan/msg00193.html quote from page- code written by Shane Stanley You can do it easily enough with AppleScriptObjC. Here's are handlers to retrieve tags, set tags, and add tags: use scripting additions use framework "Foundation" on ...


1

After few different attempts and hacks I found good solution to solve my problem. First - implement the script. Then open the Automator.app and create new application. Then combine Get Specified Finder Items action and Run AppleScript. So now open -a my_automator_app /path/to/file will pass /path/to/file/ to my script. And that's cool. P. S. in the argv ...



Only top voted, non community-wiki answers of a minimum length are eligible