applescript

applescript choose file title

谁都会走 提交于 2020-03-06 02:17:14
问题 I have got a choose file in my applescript. How do I change the title of the Choose a File window that comes up. I am aware of with prompt , but it doesn't change the title. Edit: ulvund answered I'm afraid with prompt is the best you can do , but are there any other ways to get a choose file without applescript? Also, are there any hacks? Edit 2: Red_Menace answered (look below) but are there any good tutorials on how to do this in Cocoa-Applescript? P.S. Look at my comments. Edit 3: I have

applescript choose file title

冷暖自知 提交于 2020-03-06 02:12:26
问题 I have got a choose file in my applescript. How do I change the title of the Choose a File window that comes up. I am aware of with prompt , but it doesn't change the title. Edit: ulvund answered I'm afraid with prompt is the best you can do , but are there any other ways to get a choose file without applescript? Also, are there any hacks? Edit 2: Red_Menace answered (look below) but are there any good tutorials on how to do this in Cocoa-Applescript? P.S. Look at my comments. Edit 3: I have

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 --

Using AppleScript to set a mail message to Plain Text

我与影子孤独终老i 提交于 2020-02-15 08:40:28
问题 I have an AppleScript that nicely collates information and creates an email message with attachments. I cannot find a way for the script to set the message format to "Plain Text" which is required by the receiving inbox (rather than the default "Rich Text"). Is there an AppleScript way (or trick) to setting the message format to "Plain Text"? 回答1: I found this question while trying to solve exactly this problem. Eventually I came up with the following solution: tell application "Mail" set

Using AppleScript to set a mail message to Plain Text

限于喜欢 提交于 2020-02-15 08:38:32
问题 I have an AppleScript that nicely collates information and creates an email message with attachments. I cannot find a way for the script to set the message format to "Plain Text" which is required by the receiving inbox (rather than the default "Rich Text"). Is there an AppleScript way (or trick) to setting the message format to "Plain Text"? 回答1: I found this question while trying to solve exactly this problem. Eventually I came up with the following solution: tell application "Mail" set

Using AppleScript to set a mail message to Plain Text

独自空忆成欢 提交于 2020-02-15 08:38:09
问题 I have an AppleScript that nicely collates information and creates an email message with attachments. I cannot find a way for the script to set the message format to "Plain Text" which is required by the receiving inbox (rather than the default "Rich Text"). Is there an AppleScript way (or trick) to setting the message format to "Plain Text"? 回答1: I found this question while trying to solve exactly this problem. Eventually I came up with the following solution: tell application "Mail" set

End of line error due to “use script”

99封情书 提交于 2020-02-05 13:58:02
问题 I have apple script which is working perfectly fine, until I add use script “Alert Utilities” at the start. Then it gives Expected end of line, etc. but found identifier. error at set md5 to do shell script "md5 -q " & quoted form of myFile with shell highlighted. What could possible be causing this error? 回答1: Add use scripting additions and the code will run fine. Since AppleScript 2.3 (Mavericks) there is the new use statement. It will tell the neccessary resources that are required to run

End of line error due to “use script”

南笙酒味 提交于 2020-02-05 13:57:53
问题 I have apple script which is working perfectly fine, until I add use script “Alert Utilities” at the start. Then it gives Expected end of line, etc. but found identifier. error at set md5 to do shell script "md5 -q " & quoted form of myFile with shell highlighted. What could possible be causing this error? 回答1: Add use scripting additions and the code will run fine. Since AppleScript 2.3 (Mavericks) there is the new use statement. It will tell the neccessary resources that are required to run

AppleEvent: how to debug `eventDidFail`?

心已入冬 提交于 2020-01-25 12:20:06
问题 I am getting this error from SIMBL in the console: 05.09.11 17:00:09,165 SIMBL Agent: eventDidFail:'tvea' error:Error Domain=NSOSStatusErrorDomain Code=-1708 "The operation couldn’t be completed. (OSStatus error -1708.)" (the AppleEvent was not handled by any handler ) UserInfo=0x400e485c0 {ErrorNumber=-1708} userInfo:{ ErrorNumber = "-1708"; } I am trying to debug this; but as I haven't really worked with AppleEvent that much yet, I'm not really sure how to interpret that. I think the

How do I return the output of my Apple Script to the Status Bar in macOS?

随声附和 提交于 2020-01-25 10:15:10
问题 I am working on a script that looks in one app for the amount of time you've spent doing a certain activity, then displays that number in the status bar of the Mac, just like the clock that continuously counts up in the upper right corner. I've seen others like it that can show you your IP in the same area, which is close to what I'm trying to accomplish. I think I have the script functioning to where it will run continuously until the application where I'm working is fully quit, however, I'm