applescript

AppleScript : error “sh: lame: command not found” number 127

放肆的年华 提交于 2019-12-09 18:05:30
问题 I am trying to create an AppleScript with commands below. An issue I am having is there is an error at the third line. I have no problem using the lame command in the terminal directly. In addition, lame is not a native Mac utility; I installed it on my own. Does anybody have a solution? do shell script "cd ~/Downloads" do shell script "say -f ~/Downloads/RE.txt -o ~/Downloads/recording.aiff" do shell script "lame -m m ~/Downloads/recording.aiff ~/Downloads/recording.mp3" -- error "sh: lame:

Does anybody know what the xcode file “InfoPlist.strings (English)” is?

☆樱花仙子☆ 提交于 2019-12-09 17:58:22
问题 Does anyone know what the file InfoPlist.strings is for? It is in Xcode 3.2. It is a Cocoa app in Applescript. 回答1: An information property list file is a structured text file that contains essential configuration information for a bundled executable. The file itself is typically encoded using the Unicode UTF-8 encoding and the contents are structured using XML. The root XML node is a dictionary, whose contents are a set of keys and values describing different aspects of the bundle. The

Using Applescript to export list of URLs based on tags?

回眸只為那壹抹淺笑 提交于 2019-12-09 13:58:05
问题 I am new to Applescript, so I found an awesome script online that will list all Evernote snaps that have an associated URL . For listing all snaps with URLs, this solution is great. How could I modify this script to filter the listed URLs based on specific tags? Script I am currently using: http://veritrope.com/code/save-a-list-of-urls-from-your-evernote-items-as-a-file/ tell application "Evernote" activate set listOfNotebooks to {} set EVNotebooks to every notebook repeat with

How to ensure Applescript dialog focus in OS X 10.10 (Yosemite)?

…衆ロ難τιáo~ 提交于 2019-12-09 13:30:39
问题 Before OS X 10.10 (Yosemite), I could ensure an applescript dialog had focus by telling the "current application" to activate: tell current application activate set output to (do shell script "printf '" & hostsLine & commentString & "' >> /private/etc/hosts" with administrator privileges) end tell This would bring the password dialog to the front to type in. The dialog no longer appears with focus in Yosemite and you have to click on it before you can type. Searching on stack exchange and

Applescript to launch iTunes with a specific library

最后都变了- 提交于 2019-12-09 13:09:35
问题 I would like to write an AppleScript that would allow me to launch iTunes with a given Library instead of having to hold down the Option key and browsing for one. I'm already aware of Doug's Library manager, which is not quite what I want. The AppleScript would be for a specific library. 回答1: iTunes doesn't allow you to do this with AppleScript, but you can write directly into iTunes' preferences, where it stores a bookmark (alias) to the currently selected library (or nothing, if you're

Applescript Question - Adding Tracks to Playlists

我是研究僧i 提交于 2019-12-09 11:19:02
问题 Seriously, I'm embarrassed to even be asking this. I've got an Applescript that is supposed to build a playlist of a bunch of whole albums. Everything works fine, except for actually adding the tracks to the playlist. Here's the relevant code: repeat with theAlbum in randAlbums set these_tracks to (tracks of library playlist 1 whose album is theAlbum) repeat with the_track in these_tracks add the_track to playlist thePlaylist (* doesn't work *) end repeat end repeat The error I get is "iTunes

Applescript to Launch Chrome (with specifics)

南楼画角 提交于 2019-12-09 04:18:17
问题 I'm really struggling with creating some method of launching a browser window (chrome) on osx with specifics such as window size, no tabs etc. Traditionally I've used vb script through windows with IE which is a pretty simple exercise but I'll be the first to admit, when it comes to macs I struggle greatly. So here is my wish list. I need to be able to open a window (ideally in chrome, but any other browser except safari), that has no status bar, no address bar with a given URL, and a

Applescript open file with TextEdit and export them as pdf

南楼画角 提交于 2019-12-08 20:57:29
This is my very first applescript. I use automator to launch the script as I drop new files to a folder (Folder action). In Automator I have 2 action: 1- Get Specified Finder Items 2- The Apple Script But I can't make it running. The script stops without warning after opening the files. Here is the script: on run {input, parameters} tell application "TextEdit" to activate repeat with theFile in input set theFilePath to theFile as alias tell application "TextEdit" to open theFilePath tell application "System Events" tell process "TextEdit" set foremost to true click menu item "Export as PDF..."

Apple Script to set Primary Button, Secondary Button and other properties for Mouse Preference

戏子无情 提交于 2019-12-08 19:40:35
Can anyone suggest me: How to set Primary Button, Secondary Button and other properties of Mouse Preference via AppleScript? I have now tried this, script: tell application "System Preferences" activate end tell tell application "System Events" tell process "System Preferences" click menu item "Mouse" of menu "View" of menu bar 1 tell window "Mouse" set value of pop up button 1 to "Primary Button" end tell end tell end tell but it is giving this error message: System Events got an error: Can't get pop up button 1 of window "Mouse" of process "System Preferences". Invalid index. Can anyone

Excel exporting hundreds of empty columns on CSV export

做~自己de王妃 提交于 2019-12-08 19:29:01
问题 Before I begin, I'm using Excel for Mac 2011. I'm having a problem with a particular Excel spreadsheet. When I export any of the active worksheets to CSV (windows CSV format), it exports ~200 blank columns along with the 7 or 8 populated columns. I've had a similar issue in the past, and found a site that said the way to fix it was to find all blank characters, and replace them with a space. This worked in the past, and any blank columns were not export anymore. This doesn't seem to be the