text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
openInSublime(theFiles)
|
Open In Sublime Text 2.applescript
|
set result_list to {"Display Name" & tab & "Email Address" & tab & "Message Count"}
|
Script 24-17.applescript
|
set end of result_list to display_name & tab & email_address & tab & message_count
|
Script 24-17.applescript
|
set the clipboard to result_list as text
|
Script 24-17.applescript
|
set the clipboard to theTitle & " - " & theURL as string
|
Create%20Link(s)%20from%20Mail,%20Safari%20or%20Finder.applescript
|
use omni : script "omnifocuslib"
|
starttask.applescript
|
use timing : script "timinglib"
|
starttask.applescript
|
set selectedTasks to omni's getSelectedActions()
|
starttask.applescript
|
set pName to name of containing project of first item of selectedTasks
|
starttask.applescript
|
set taskItem to first item of selectedTasks
|
starttask.applescript
|
set estDuration to estimated minutes of taskItem
|
starttask.applescript
|
if estDuration is missing value then
|
starttask.applescript
|
set estDuration to 30
|
starttask.applescript
|
else if estDuration is greater than 45 then
|
starttask.applescript
|
set isInTiming to timing's isInTimings(pName)
|
starttask.applescript
|
if not isInTiming then set isInTiming to not (timing's addToTimings(pName) is false)
|
starttask.applescript
|
if isInTiming then
|
starttask.applescript
|
set projectItem to front project whose name is pName
|
starttask.applescript
|
start task with title name of taskItem project projectItem for about estDuration * 60
|
starttask.applescript
|
open location "focus://focus?minutes=" & estDuration
|
starttask.applescript
|
on error number -10814
|
starttask.applescript
|
return "No Focus"
|
starttask.applescript
|
return "Cancelled"
|
starttask.applescript
|
tell application "OmniFocus" to activate
|
starttask.applescript
|
on addNums(a, b)
|
014_01_building_functions.applescript
|
return a + b
|
014_01_building_functions.applescript
|
end addNums
|
014_01_building_functions.applescript
|
addNums(2, 3)
|
014_01_building_functions.applescript
|
use AppleScript version "2.4" -- Yosemite (10.10) or later -- tested on OS X 12.3 Montery 1 April 2022
|
Deskpro Volume Utility v2.scpt
|
You must have access to the Deskpro in order for the script to connect. This can be enabled via the ACE Dashboard under devices at ace.cisco.com Select enable admin access, connect to the deskpro and create a user.
|
Deskpro Volume Utility v2.scpt
|
Your Mac must be able to connect to the Deskpro, some network scenarios may not work, i.e. Deskpro on personal network, Mac on CVO or VPN.
|
Deskpro Volume Utility v2.scpt
|
Set the following variables to match your system requirements. "theMacVolume, theCallVolume, and theMuteVolume"
|
Deskpro Volume Utility v2.scpt
|
in com.cisco.Deskpro.<username>
|
Deskpro Volume Utility v2.scpt
|
3. The deskpro password. This is the password for you deskpro user. The password is used along with our username to create a base64url hash that is stored in the keychain and used by the script to connect to the deskpro.
|
Deskpro Volume Utility v2.scpt
|
4. When in a call the script will allow you to change between microphone muted and unmuted. It will also allow you to disconnect the call.
|
Deskpro Volume Utility v2.scpt
|
5. When not in a call the script will allow you to change between the pre-defined volume settings. If you select "yes" you will be prompted for the prerequisites to control the TP-Link device. You will need your KASA KEY and the Device IDs.
|
Deskpro Volume Utility v2.scpt
|
6. The script will ask if you want to control an TP-Link smart plug(s). This can be used as an "In Call" indicator. The use case I have for this is a TP-Link plug outside my office door in the hallway. I have a small red night light plugged into the TP-Link. When I'm in a call it turns on, when I disconnect (with the script) it turns off. Or it will turn off when not in a call and you run the script to change the volume setting.
|
Deskpro Volume Utility v2.scpt
|
set theMacVolume to "25"
|
Deskpro Volume Utility v2.scpt
|
set theCallVolume to "60"
|
Deskpro Volume Utility v2.scpt
|
property muteStatus : ""
|
Deskpro Volume Utility v2.scpt
|
property theCurrVolume : ""
|
Deskpro Volume Utility v2.scpt
|
property answeredState : ""
|
Deskpro Volume Utility v2.scpt
|
property callDuration : ""
|
Deskpro Volume Utility v2.scpt
|
property theVolMute : ""
|
Deskpro Volume Utility v2.scpt
|
property theCleanText : ""
|
Deskpro Volume Utility v2.scpt
|
global theMacVolume
|
Deskpro Volume Utility v2.scpt
|
global micState
|
Deskpro Volume Utility v2.scpt
|
global myTPLinkDevices
|
Deskpro Volume Utility v2.scpt
|
global newKasaDevices
|
Deskpro Volume Utility v2.scpt
|
global myUUIDv4
|
Deskpro Volume Utility v2.scpt
|
global myBase64Url
|
Deskpro Volume Utility v2.scpt
|
global getCmd
|
Deskpro Volume Utility v2.scpt
|
global grep_for
|
Deskpro Volume Utility v2.scpt
|
global theVar
|
Deskpro Volume Utility v2.scpt
|
global the2ndVar
|
Deskpro Volume Utility v2.scpt
|
global myCmdStart
|
Deskpro Volume Utility v2.scpt
|
global myCmdEnd
|
Deskpro Volume Utility v2.scpt
|
global myCmd
|
Deskpro Volume Utility v2.scpt
|
global my2ndCmd
|
Deskpro Volume Utility v2.scpt
|
global postCmd
|
Deskpro Volume Utility v2.scpt
|
global currValue
|
Deskpro Volume Utility v2.scpt
|
global selfcert
|
Deskpro Volume Utility v2.scpt
|
set BadPWDchars to {"!", "[", "]", "{", "}"}
|
Deskpro Volume Utility v2.scpt
|
set my2ndCmd to {}
|
Deskpro Volume Utility v2.scpt
|
if myname is "runme_install_DVU" then
|
Deskpro Volume Utility v2.scpt
|
if AutoAnswer is "Yes" then
|
Deskpro Volume Utility v2.scpt
|
get_xml()
|
Deskpro Volume Utility v2.scpt
|
if callStatus contains "Ringing" then
|
Deskpro Volume Utility v2.scpt
|
set theVar to ""
|
Deskpro Volume Utility v2.scpt
|
set the2ndVar to theCallVolume
|
Deskpro Volume Utility v2.scpt
|
set_tplink("on")
|
Deskpro Volume Utility v2.scpt
|
set myCmd to {"Command", "Call", "Accept"}
|
Deskpro Volume Utility v2.scpt
|
set my2ndCmd to {"Command", "Audio", "Volume", "Set command=\"True\"", "Level"}
|
Deskpro Volume Utility v2.scpt
|
post_cmd()
|
Deskpro Volume Utility v2.scpt
|
else if callStatus contains "Connecting" or callStatus contains "Dialling" then
|
Deskpro Volume Utility v2.scpt
|
set theVar to theCallVolume
|
Deskpro Volume Utility v2.scpt
|
set myCmd to {"Command", "Audio", "Volume", "Set command=\"True\"", "Level"}
|
Deskpro Volume Utility v2.scpt
|
else if callStatus contains "Connected" then
|
Deskpro Volume Utility v2.scpt
|
else if AutoAnswer is "No" then
|
Deskpro Volume Utility v2.scpt
|
if theCallStatus contains "Ringing" or theCallStatus contains "Connected" or theCallStatus contains "Connecting" or theCallStatus contains "Dialling" then
|
Deskpro Volume Utility v2.scpt
|
set_tplink("off")
|
Deskpro Volume Utility v2.scpt
|
if theCurrVolume is less than theCallVolume then
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your volume preference" buttons {"Mute", "In Call", "Mac"} default button "In Call" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
else -- if currVolume is greater than theMacVolume then
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your volume preference" buttons {"Mute", "In Call", "Mac"} default button "Mac" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
if button returned of b is "Mac" then
|
Deskpro Volume Utility v2.scpt
|
set theVar to theMacVolume
|
Deskpro Volume Utility v2.scpt
|
set theVar to theMuteVolume
|
Deskpro Volume Utility v2.scpt
|
set the2ndVar to ""
|
Deskpro Volume Utility v2.scpt
|
if callDuration is less than "30" then
|
Deskpro Volume Utility v2.scpt
|
if muteStatus is "On" and theVolMute is "On" then -- option 1 mic and vol are both muted, unmute volume or unmute both
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your mute preference" buttons {"UnMute Vol", "UnMute All", "Disconnect"} default button "UnMute All" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
else if muteStatus is "On" and (theVolMute is "Off" and theCurrVolume is not less than theCallVolume) then -- option 2 mic is muted volume is not, option to unmute mic or mute vol so that both are mute
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your mute preference" buttons {"UnMute Mic", "Mute Vol", "Disconnect"} default button "UnMute Mic" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
else if muteStatus is "On" and (theVolMute is "Off" and theCurrVolume is less than theCallVolume) then -- option 3 mic is muted volume is lower that thecallvolume but not mute, option to unmute mic or mute all
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your mute preference" buttons {"UnMute Mic", "Mute All", "Disconnect"} default button "UnMute Mic" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
else if muteStatus is "Off" and (theVolMute is "On" and theCurrVolume is less than theCallVolume) then -- option 4 if for some reason the mic is not mute but the volume is, option to mute mic or unmute all
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your mute preference" buttons {"Mute Mic", "UnMute All", "Disconnect"} default button "UnMute All" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
else if muteStatus is "Off" and theVolMute is "Off" then -- option 5 neither mic and volume are mute, option to mute mic or mute all
|
Deskpro Volume Utility v2.scpt
|
set b to display dialog " Select your mute preference" buttons {"Mute Mic", "Mute All", "Disconnect"} default button "Mute Mic" giving up after 5 with title name of me
|
Deskpro Volume Utility v2.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.