Hot answers tagged

2

Open up your script in Script Editor. Do a Save As... (hold Option key down and "Duplicate" in File menu will change to "Save As..."). When you save your script as an application this time, make sure the box that says "Show Startup Screen" is not checked. See my screenshot. That's all there is to it. Your old script was saved with the "Show startup screen" ...


2

You must put the script in the "/Users/yourName/Library/Application Support/TextWrangler/Scripts" folder After that: Open the preferences of the TextWrangler Select "Menus & ShortCuts" --> "Scripts" --> "your script" to add your shortcut to the script TextWrangler accept the (cmd + enter) keys as shortcut


2

Here is an example of setting the percent charged of the internal battery to a variable using AppleScript. In the sample code below the batteryPercent variable holds the numeric percentage of battery charge and is shown in a message. set batteryPercent to do shell script "pmset -g batt | awk '/InternalBattery/ { sub(/;/, \"\"); print $2 }'" display dialog ...


2

⌘ Command "click" on the minimized window in the dock, and it will restore (de-minimize) in the current workspace, regardless of which space it was on when it was minimized.


1

In order to use an AppleScript script in TextWrangler's Script menu, it (or a link to it) must be in TextWrangler's Script folder located at, ~/Library/Application Support/TextWrangler/Scripts in order for it to appear on the menu. Note: The "~" in that path is your Home Folder and the Library folder may not be visible. You can open it from TextWrangler's ...


1

Someone at Apple communities helped me resolve the issue. Posting an answer if someone faces the same issue. set theCurrentDate to current date set dateTime to short date string of theCurrentDate & space & time string of theCurrentDate set P to offset of "/" in dateTime set dateTime to text 1 through (P - 1) of dateTime & "-" & text (P + 1)...


1

I’ve been trying to do this myself. I have concluded that there is no standard, guaranteed way to get the open documents of a running application. What you tried is the best method. For apps that use the Cocoa document architecture (the majority), there is automatic AppleScript support for getting all the open NSDocument objects and querying certain ...


1

A few things: There should be two dialogs that get displayed: One for the question, which should be just one string of text. This will have the default answer. One for the result It is not returning/displaying anything because all the answers are "incorrect" and incorrect answers are not triggering anything. To fix this: You will need to convert the ...


1

Here is an AppleScript that achieves the results of what you originally explicitly and specifically asked for, before editing the question after it was answered. tell application "Safari" activate tell application "System Events" keystroke "h" using {command down, option down} end tell set miniaturized of (windows whose index is not ...



Only top voted, non community-wiki answers of a minimum length are eligible