Tag Info

Hot answers tagged

2

I don't think it's possible with AppleScript but it is with terminal-notifier: -sender ID The bundle identifier of the application that should be shown as the sender, including its icon. -appIcon URL The URL of a image to display instead of the application icon (Mavericks+ only) For example: terminal-notifier -title title -message message ...


2

DISCLAMER: I can't check this (that it actually works) at the moment, but I will later. This script to turn on/off wifi is taken from here: try set makiaeawirelessstatus to do shell script "networksetup -getairportpower en1" on error display dialog "The script did not work as intended, please check the networksetup command (in terminal) works on ...


1

Try: tell application "Mail" to set previousRecipients to address of every recipient of messages of mailbox "Sent Messages" of account "my account name"


1

Edit the root's crontab (by for example running EDITOR=nano sudo crontab -e) and add a line */15 * * * * ifconfig en1 down;ifconfig en1 up where en1 is the identifier shown by networksetup -listallhardwareports|awk '/^Hardware Port: (Wi-Fi|Airport)/{getline;print $2}'. The ifconfig commands require superuser privileges.


1

You can use simple command inside Terminal.app to rename all files in directory including subdirectories. Navigate to directory in which You have files to rename (cd /path/to/dir) and run this command: find . -name "*\.txt" -exec bash -c 'mv "{}" "{}.noindex"' \; This will rename all txt files. Change extension to whatever You want.


1

The question is vague. Do you mean an applescript to display the dropdowm menu from the battery icon on the right hand side of menu bar? tell application "System Events" to tell process "SystemUIServer" click (first menu bar item whose value of attribute "AXDescription" contains "Battery") of menu bar 1 end tell


1

-- Allow Script Editor in Accessibility <- Privacy <- Security & Privacy <- System Preferences. For testing, at the very least. tell application "System Preferences" activate set current pane to pane "com.apple.preference.energysaver" end tell tell application "System Events" tell process "System Preferences" tell window ...


1

tell application "System Preferences" activate set current pane to pane "com.apple.preference.energysaver" end tell tell application "System Events" to set bool to value of attribute "AXValue" of checkbox 1 of window 1 of process "System Preferences" tell application "System Preferences" quit end tell if bool is 1 then display notification ...


1

tell application "Finder" to delete ((POSIX file "/Users/user1/Library/Application Support/Skype/tankitan") as alias)


1

This fixes the first quirk but not the second one: tell application "System Events" bundle identifier of process 1 whose id is 1234 end tell tell application id result reopen activate end tell The same applies to open: open -a "$(ps -p 1234 -o comm=)" If there are no open windows, reopen opens a new default window, and if all windows are ...


1

tell application "System Events" to picture of desktop 1 View all properties: tell application "System Events" to get properties of every desktop


1

This runs say a if the time since the last HID (pointing device or keyboard) event is over 3 seconds and if the frontmost application is iTerm: while sleep 10;do [[ $(ioreg -c IOHIDSystem|awk '/HIDIdleTime/{print $NF/1000000000;exit}'|awk '$0>3') && $(lsappinfo visibleProcessList|cut -d\" -f2) = iTerm ]]&&say a;done Different ways to ...


1

Use the select command to select the row. tell application "System Events" tell process "iTunes" set frontmost to true delay 1 tell pop up button 2 of window 1 click tell (select row 5 of table 1 of pop over 1) to click UI element 1 end tell end tell end tell


1

tell application "System Preferences" activate --Change 1/2 reveal pane "com.apple.preferences.Bluetooth" end tell tell application "System Events" to tell process "System Preferences" click button 3 of window 1 --Change 2/2 end tell quit application "System Preferences" From Accessibility Inspector: button 3 in the the no.6 item on the ...


1

Simple toggle on or off that does not need to check state first. property thePane : "com.apple.preferences.bluetooth" tell application "System Preferences" activate set the current pane to pane id thePane --delay 1 end tell --- tell application "System Events" tell application process "System Preferences" try ...



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