|
|
Toggle Bluetooth using Quicksilver and AppleScript
If I'm not mistaken, that script requires the BT icon to still be in the menu bar, right?
Toggle Bluetooth using Quicksilver and AppleScript
This script does, but you could use applescript to change it in the Bluetooth system preference. There are similar scripts posted, including one that turns the clock on and off. This is what I use for that, if it gives you an idea where to start:
-- This script tells the "Date & Time" preference pane to do the following: -- -- if the clock is not showing in any way -- or the clock is showing in the menu bar, then -- Show the clock in the window the way I like it -- else if the clock is showing in the window then -- Show the clock in the menu bar the way I like it tell application "System Preferences" activate set the current pane to pane "Date & Time" delay 1 end tell tell application "System Events" tell process "System Preferences" -- define stuff set tabGroup to the first tab group of the window "Date & Time" set mainGroup to the first group of tabGroup set viewInRadioGroup to the first radio group of mainGroup set viewAsRadioGroup to the second radio group of mainGroup set showClockCheckbox to the checkbox ¬ "Show the date and time" of mainGroup set showSecondsCheckbox to the checkbox ¬ "Display the time with seconds" of mainGroup set showAmPmCheckbox to the checkbox ¬ "Show AM/PM" of mainGroup set showDOWCheckbox to the checkbox ¬ "Show the day of the week" of mainGroup set flashColonsCheckbox to the checkbox ¬ "Flash the time separators" of mainGroup set twentyFourHourCheckbox to the checkbox ¬ "Use a 24-hour clock" of mainGroup --do stuff if the value of showClockCheckbox is 0 then click showClockCheckbox set clockWasShowing to false else set clockWasShowing to true end if if the value of radio button "Window" of viewInRadioGroup is 0 ¬ or not clockWasShowing then click radio button "Clock" of tabGroup if the value of showClockCheckbox is 0 then ¬ click showClockCheckbox click radio button "Window" of viewInRadioGroup click radio button "Analog" of viewAsRadioGroup if the value of showSecondsCheckbox is 0 then ¬ click showSecondsCheckbox else click radio button "Clock" of tabGroup if the value of showClockCheckbox is 0 then ¬ click showClockCheckbox click radio button "Menu Bar" of viewInRadioGroup click radio button "Digital" of viewAsRadioGroup if the value of showSecondsCheckbox is 1 then ¬ click showSecondsCheckbox if the value of showAmPmCheckbox is 0 then ¬ click showAmPmCheckbox if the value of showDOWCheckbox is 0 then ¬ click showDOWCheckbox if the value of flashColonsCheckbox is 1 then ¬ click flashColonsCheckbox if the value of twentyFourHourCheckbox is 1 then ¬ click twentyFourHourCheckbox end if set visible to false end tell end tell |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|