automator

Save a user popup selection in a custom Automator Action

梦想与她 提交于 2019-12-13 15:31:39
问题 Using Xcode 5.* for a cocoa-applescript automator action. Interface is a a simple popup menu that gets populated using an outlet with: tell thePopupMenu to removeAllItems() tell thePopupMenu to addItemsWithTitles_(theList) When the action is used in a workflow (a Service actually), I want the next time it is run and the action dialog shows up (I will have "Options:Show when run" selected), I want the popup menu to change the selection to the last one that was selected. Right now, the default

Mass Convert .xls and .xlsx to .txt (Tab Delimited) on a Mac

╄→гoц情女王★ 提交于 2019-12-13 14:09:08
问题 I have about 150 .xls and .xlsx files that I need converting into tab-delimited. I tried using automator, but I was only able to do it one-by-one. It's definitely faster than opening up each one individually, though. I have very little scripting knowledge, so I would appreciate a way to do this as painlessly as possible. 回答1: If you would be prepared to use Python for this I have written a script that converts Excel spreadsheets to csv files. The code is available in Pastebin. You would just

Appium Date Picker Scroll android

杀马特。学长 韩版系。学妹 提交于 2019-12-13 03:46:03
问题 Hey Guys I am new to Appium Automation testing... I need to work on automating the android default OS Date picker dialog as per the below image. Can some one help me on this?Date picker dialog 回答1: Just Use the below code First open your date picker and use the sample code.. public static String datePicker_ui_id = "android:id/datePicker"; public static String pickers_ui_id = "android:id/pickers"; public static String NumberPicker_ui_id = "//android.widget.NumberPicker"; public static String

Assign action to variable in Automator for use in Shell Script

送分小仙女□ 提交于 2019-12-12 08:56:51
问题 Ok, this thing is driving me crazy right now. So Action 1 Chooses a Folder (I want to save that folder's path as var_1) and Action 3 Selects a File (I want to save this file's path as var_2) so in the end . . . var_1 = '/Users/Prometheus/Desktop/' var_2 = '/Users/Prometheus/Documents/a.txt' So how do I use these variables and their values inside of Shell Script with python ? I can't use sys.argv because they are set to some weird variables I usually put 'Ask for Finder Item' > Run Shell

Using an applescript/automator to attach multiple items to a new Outlook message

断了今生、忘了曾经 提交于 2019-12-12 01:38:36
问题 I've worked out (found online) how to attach a single item from Finder to a new Outlook message. I've played with this format a good amount - changed 'selecteditem' and selection and some other more major changes - but I can't work out how to get more than one item to attach to a new outlook message at a time. Only a single item attaches to each new outlook message. There are no Outlook Automator options in Automator - I think Office 365 did away with them. My current script is as follows:

Extract PresentationNotes from keynote

故事扮演 提交于 2019-12-11 20:36:01
问题 I'm having a hard time extracting presentationNotes from a keynote presentation using JXA (Javascript for osx) I don't want to use applescript. There is way more to this script than extracting notes. It seems rather simple. However when I get the presentationNotes its in an RichText object that doesn't seem to have anyway to get normal text. So I figured I'd open up textEditor and write them out to it. Well I can't figure out how to do that. var app = Application('Keynote') document = app

Mac to extract HTML from Mail messages

拜拜、爱过 提交于 2019-12-11 19:26:48
问题 I am trying to extract HTML from emails using AppleScript . I came across this StackExchange post -- Mac Automator/Applescript(?) to extract URL's from Mail messages -- which tries to extract URLs from email content. The extraction code is: on run {input, parameters} set mailContentList to {} tell application "Mail" repeat with selectedMail in input set end of mailContentList to content of selectedMail end repeat end tell return mailContentList end run This only extracts the visible content,

How do I Batch Rename Folders in OSX?

一个人想着一个人 提交于 2019-12-11 09:12:35
问题 So I have been trying to rename about 5000 folders based on a CSV (Old name, Newname) This is a one time operation, once hdkjsh2-2f8c-46b9-bbdb_doc is converted to 3 then it will not need to be touched again. I have tried the solution here (Setting up an automator workflow with a command script) but found that it does not do a great deal when it comes to folder/directory names and all the guides/documentation is around file names and not folder. Any suggestions would be much appreciated

Set text of a Growl Notification using Automator?

孤人 提交于 2019-12-11 08:31:34
问题 I have an Automator Application containing the action "Show Growl Notification", which is always empty when it appears. I've tried using the "Get Specified Text" and "Get Value Of Variable" actions directly before it, but nothing I've tried seems to work. 回答1: The code sample from gadgetmo is almost correct but won't work as is with Growl 1.4 An application must be registered and enabled and must provide a list of notifications it will present and also a list of which of those notifications

Are Automator variables persistent?

為{幸葍}努か 提交于 2019-12-11 08:16:27
问题 Do Automator variable persist between executions of a workflow? If a variable is set during the execution of a workflow, can I get the last value assigned to a variable, once the workflow is executed again? 回答1: Automator variables are not persistent. I created a test service from a workflow that outputs the content of a variable, and then sets the variable content to the text selected in the host application; the invocation of the service always returned an error about the variable, which