automator

Learning Applescript: Trouble linking to Safari

拟墨画扇 提交于 2019-12-25 05:07:47
问题 Run Down Hello, this is a very specific and situation question. Basically, I'm running Applescript in Automator on Safari, and the result is Null. What I Have I currently have a script that can do these things: Before I even run the Automator program, I have Safari open Next I run the Automator, which starts with this code: on run {input, parameters} tell application "Safari" to activate tell application "System Events" keystroke "t" using command down end tell return input end run This

Applescript for batch-converting text delimited .txt to .xls

柔情痞子 提交于 2019-12-24 23:09:19
问题 Each day, I'm delivered ~5 .txt data files delimited with "^". Manual steps taken to convert each to spreadsheet: • Open .txt file in Excel • Text-To-Columns • Run through the delimiting wizard Would love to have an applescript or applet to drop the 5 files into. A Google Sheets script would be even more magical. Thanks in advance for any guidance. Sample data: developer^project^lender^uuid^id^remarks^code^transfer_date 1500^1502^009^f1e97d20-b311-41cf-a40f-59db90b25ba8^73890^a10a46e8-bca8

Mac Automator: shell script gets only one line

雨燕双飞 提交于 2019-12-24 19:23:25
问题 I have an Automator script for a service that looks like this: Receives as text in any application. Input is entire selection, does not replace selected text. -> Run Shell Script (/bin/bash) "expand -t 4" pass input to stdin -> Copy to Clipboard No other options set. The idea is that I can select some code, and put a detabbed version in the clipboard without having to paste the code into BBEdit for detabbing. The service yields only the first line of the selected text. Deleting the shell

Using Automator or Applescript or both to recursively print documents to PDF

♀尐吖头ヾ 提交于 2019-12-24 17:12:33
问题 I have a massive set of files (4000+) that are in an old Apple format (Appleworks). My employed needs them all updated to PDF. By opening the documents in Appleworks and using the system print dialogue, I can save them to PDF—this is ideal. I'm a complete nub with Applescript/Automator, however. Using a Python script I was able to gather all the Appleworks files from my bosses computer and put them in a directory; each file is then in a subdirectory with a .txt file containing its original

plain text URL to HTML code (Automator/AppleScript)

橙三吉。 提交于 2019-12-24 15:30:35
问题 Suppose I have a plain txt file in a text editor such as TextEdit: title 1 http://a.b/c title 2 http://d.e/f ... I'd like to convert all the lines beginning with http:// to HTML code for URL, so that the aforementioned content will become: title 1 <a href="http://a.b/c">http://a.b/c</a> title 2 <a href="http://d.e/f">http://d.e/f</a> ... How can I get this done in Automator or AppleScript? (My current solution is using Gmail, but it involves multi-step copy-paste.) Thank you very much in

Run illustrator extendscript through automator applescript or bash?

我只是一个虾纸丫 提交于 2019-12-24 12:05:58
问题 The following command will run the SCRIPT_ABC.jsx which is located on my desktop. Is there a way to take the contents of the SCRIPT_ABC.jsx and put the javascript extendscript exclusively inside automator so when I save it out as an application it will be included within the program? on run {input, parameters} tell application "Adobe Illustrator" to open file "Macintosh HD:Users:NAME:Desktop:SCRIPT_ABC.jsx" return input end run 回答1: Paste the entire jsx into your applescript as a text body,

Automator to Applescript for Editing Code

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 02:22:14
问题 Just wondering if I can convert a "watch me do" event in Automator to applescript and then edit the resulting code? I've got a recording of entering a query (i.e. Apple1) into Google, but I'd like the query to increase ++ for each loop of the recording, so the result is Apple1, then the next loop would be Apple2, Apple3, etc. I know increments are elementary in programming, but I'm just not sure how to do it using Automator and/or applescript. Any help would be greatly appreciated. 回答1: It

How to use Automator to bring window to front?

天涯浪子 提交于 2019-12-21 20:16:08
问题 I'm using a Mac, OSX 10.6 and I have a function in a desktop application that I want to automate. Manually I press Command+R wait for the application to read some data form a physical device for 1 minute, then press command+R again to take another reading (at this point it asks me if I want to save the data, so I press tab, tab and then space bar to select to save the data. I do this 3 times in total, so I want to automate the 3 times, so I can walk away from the computer and it will read 3

Automator script to rename files on Mac OS X [closed]

百般思念 提交于 2019-12-21 05:05:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Is there an easy way to use Automator on OS X to replace spaces in filenames with underscores? 回答1: I've set up a service called "Rename Items…" that can be run by selecting any item (or batch of items) in the Finder, right clicking, and then selecting Services > Rename Items… This is useful as it will provide a

How to create an Apple Script that runs a Terminal command?

别等时光非礼了梦想. 提交于 2019-12-21 03:43:36
问题 I want to create an apple script that opens terminal and summons this command : sudo killall coreaudiod How is this possible? 回答1: do shell script "sudo killall coreaudiod" with administrator privileges the user gets asked for the password then 来源: https://stackoverflow.com/questions/19101518/how-to-create-an-apple-script-that-runs-a-terminal-command