automator

Specify which version of Python runs in Automator?

青春壹個敷衍的年華 提交于 2021-02-07 09:43:01
问题 In my terminal and in CodeRunner my Python is updated to 2.7.6 but when I ran a shell script in the OSX Automator I found that it is running 2.7.2 How can I update the Automator Python to 2.7.6 like the rest of my compilers ? 回答1: I couldn't specify explicitly which python for it to use. So, I ran it in bash environment with following command: $ your/python/path /path/to/your/python/script.py And make sure first line of your python program contains the path to the python environment you wish

Specify which version of Python runs in Automator?

痞子三分冷 提交于 2021-02-07 09:42:24
问题 In my terminal and in CodeRunner my Python is updated to 2.7.6 but when I ran a shell script in the OSX Automator I found that it is running 2.7.2 How can I update the Automator Python to 2.7.6 like the rest of my compilers ? 回答1: I couldn't specify explicitly which python for it to use. So, I ran it in bash environment with following command: $ your/python/path /path/to/your/python/script.py And make sure first line of your python program contains the path to the python environment you wish

How do I get these results in separate automator variables?

孤街醉人 提交于 2021-02-07 08:29:28
问题 I have made a small automator script that runs a bash shell script and gets two outputs... On viewing results it appears like this below... I want them in two automator variables Assume I used a script like echo "200" echo "19 hours, 4 minutes and 42.765 seconds" and on viewing the results it shows this (and I want each of these as automator variables called count and duration ). I want it to be sent to a display notification with subtitle as " count files processed" and message as " duration

How do I get these results in separate automator variables?

柔情痞子 提交于 2021-02-07 08:29:20
问题 I have made a small automator script that runs a bash shell script and gets two outputs... On viewing results it appears like this below... I want them in two automator variables Assume I used a script like echo "200" echo "19 hours, 4 minutes and 42.765 seconds" and on viewing the results it shows this (and I want each of these as automator variables called count and duration ). I want it to be sent to a display notification with subtitle as " count files processed" and message as " duration

Automator “copy finder object” with AppleScript

让人想犯罪 __ 提交于 2021-01-29 09:26:46
问题 I have created an Apple Automator service that receives PDFs encrypts them copies the encrypted PDF to a destination folder renames the encrypted PDF These are all commands from the Automator. However, the copying as an Automator command can only copy to a pre-defined folder. I would like to control this part by an AppleScript which reads out the user name and selects a folder accordingly: on run {input, parameters} set user_script to "echo $USER" set username to do shell script user_script

MacOS Automator + Applescript solution for exporting docx to pdf

我与影子孤独终老i 提交于 2020-12-29 18:22:03
问题 Scratching my head after reading lots of different threads on this and tried a bunch of scripts but none seem to work. I'd like to use Automator to automate Word 2016 conversion of a selection of docx files to pdf. Used the following Automator Service: Used the following script: on run {input, parameters} tell application id "com.microsoft.Word" activate open input set doc to name of active window set theOutputPath to (input & ".pdf") save as active document file name theOutputPath file

MacOS Automator + Applescript solution for exporting docx to pdf

爱⌒轻易说出口 提交于 2020-12-29 18:21:36
问题 Scratching my head after reading lots of different threads on this and tried a bunch of scripts but none seem to work. I'd like to use Automator to automate Word 2016 conversion of a selection of docx files to pdf. Used the following Automator Service: Used the following script: on run {input, parameters} tell application id "com.microsoft.Word" activate open input set doc to name of active window set theOutputPath to (input & ".pdf") save as active document file name theOutputPath file

MacOS Automator + Applescript solution for exporting docx to pdf

你说的曾经没有我的故事 提交于 2020-12-29 18:18:21
问题 Scratching my head after reading lots of different threads on this and tried a bunch of scripts but none seem to work. I'd like to use Automator to automate Word 2016 conversion of a selection of docx files to pdf. Used the following Automator Service: Used the following script: on run {input, parameters} tell application id "com.microsoft.Word" activate open input set doc to name of active window set theOutputPath to (input & ".pdf") save as active document file name theOutputPath file

Replacing invalid characters in the filename with dashes using AppleScript

爱⌒轻易说出口 提交于 2020-06-17 10:05:33
问题 My goal is to create service in Automator using AppleScript or Javascript which replaces all invalid characters of selected filename ()[\\/:"*?<>|]+_ and spaces with dashes ( - ) and make filename lowercase. 回答1: The replacement of impermissible characters in a file/folder name can be achieved by utilizing a Bash Shell script in your Automator Service. The following steps describe how to achieve this: Configuring Automator Launch Automator Type ⌘N , or choose File > New from the Menu bar.

Persistent variable storage in Automator

主宰稳场 提交于 2020-02-16 05:47:49
问题 Is it possible to store a persistent value in an automator workflow (specifically for a service flow)? It seems that regular automator variables are not persistent; for instance trying to use an applescript chunk which has a property (which normally persists) does not actually persist the property in Applescript either (works in testing, but when you run the service the value doesn't persist). Any ideas? 回答1: You can use script objects to store your data in an out of the way place. on run --