text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
closeHomeWindow()
|
zoom-window.applescript
|
end closeNonMeetingWindows
|
zoom-window.applescript
|
on closeHomeWindow()
|
zoom-window.applescript
|
if not running of application "zoom.us" then
|
zoom-window.applescript
|
logger's debug("closeHomeWindow: zoom.us app is not running")
|
zoom-window.applescript
|
repeat with nextWindow in (every window whose title is "Zoom")
|
zoom-window.applescript
|
set theSplitterGroup to first splitter group of nextWindow -- does not work
|
zoom-window.applescript
|
if exists (first button of first splitter group of nextWindow whose value starts with "Home") then
|
zoom-window.applescript
|
click (first button of first splitter group of nextWindow whose description is "close button")
|
zoom-window.applescript
|
if found then
|
zoom-window.applescript
|
logger's debug("Zoom Home window was found and closed.")
|
zoom-window.applescript
|
logger's debug("The Zoom home window was not found")
|
zoom-window.applescript
|
end closeHomeWindow
|
zoom-window.applescript
|
on turnOnAlwaysOnTop()
|
zoom-window.applescript
|
if not running of application "zoom.us" then return
|
zoom-window.applescript
|
if value of attribute "AXMenuItemMarkChar" of menu item "Keep on Top" of menu 1 of menu bar item "Meeting" of menu bar 1 is missing value then
|
zoom-window.applescript
|
my toggleAlwaysOnTop()
|
zoom-window.applescript
|
logger's info("Keey on Top is already active")
|
zoom-window.applescript
|
logger's warn(errorMessage)
|
zoom-window.applescript
|
end turnOnAlwaysOnTop
|
zoom-window.applescript
|
on turnOffAlwaysOnTop()
|
zoom-window.applescript
|
if value of attribute "AXMenuItemMarkChar" of menu item "Keep on Top" of menu 1 of menu bar item "Meeting" of menu bar 1 is not missing value then
|
zoom-window.applescript
|
logger's info("Keey on Top is already inactive")
|
zoom-window.applescript
|
end turnOffAlwaysOnTop
|
zoom-window.applescript
|
on toggleAlwaysOnTop()
|
zoom-window.applescript
|
if not running of application "zoom.us" then return false
|
zoom-window.applescript
|
click menu item "Keep on Top" of menu 1 of menu bar item "Meeting" of menu bar 1
|
zoom-window.applescript
|
end toggleAlwaysOnTop
|
zoom-window.applescript
|
set usr to std's import("user")'s new()
|
zoom-window.applescript
|
set logger to std's import("logger")'s new("zoom-window")
|
zoom-window.applescript
|
on toISOformat(iftttDate)
|
iftttDateConversion.applescript
|
set theDate to date (iftttDate)
|
iftttDateConversion.applescript
|
set secFromMidnight to (time of theDate)
|
iftttDateConversion.applescript
|
set h to text -2 thru -1 of ("00" & (secFromMidnight / 3600 as integer))
|
iftttDateConversion.applescript
|
set min to text -2 thru -1 of ("00" & ((secFromMidnight - 3600 * h) / 60 as integer))
|
iftttDateConversion.applescript
|
set s to text -2 thru -1 of ("00" & ((secFromMidnight - 3600 * h - 60 * min) as integer))
|
iftttDateConversion.applescript
|
return y & "-" & m & "-" & d & " " & h & ":" & min & ":" & s
|
iftttDateConversion.applescript
|
end toISOformat
|
iftttDateConversion.applescript
|
set iftttDate to "December 24, 2015 at 05:25AM"
|
iftttDateConversion.applescript
|
set dateString to toISOformat(iftttDate)
|
iftttDateConversion.applescript
|
set window1Size to {500, 500}
|
windowResize copy.applescript
|
set window1Position to {100, 0}
|
windowResize copy.applescript
|
set appName to "Sublime Text"
|
windowResize copy.applescript
|
windowResize(appName, window1Size, window1Position)
|
windowResize copy.applescript
|
getWindowBounds(appName) -- menubar height is 22 pixels
|
windowResize copy.applescript
|
getDockWidth()
|
windowResize copy.applescript
|
on windowResize(appName, window1Size, window1Position)
|
windowResize copy.applescript
|
if runningProcess(appName) then
|
windowResize copy.applescript
|
tell application "System Events" to tell application process appName
|
windowResize copy.applescript
|
tell item 1 of (every window whose subrole is "AXStandardWindow")
|
windowResize copy.applescript
|
set {size, position} to {window1Size, window1Position}
|
windowResize copy.applescript
|
end windowResize
|
windowResize copy.applescript
|
on getWindowBounds(appName)
|
windowResize copy.applescript
|
set window1Bounds to {size, position}
|
windowResize copy.applescript
|
return window1Bounds
|
windowResize copy.applescript
|
end getWindowBounds
|
windowResize copy.applescript
|
on getDockWidth()
|
windowResize copy.applescript
|
set dock_dimensions to size in list 1
|
windowResize copy.applescript
|
set dock_width to item 1 of dock_dimensions
|
windowResize copy.applescript
|
return dock_width as number
|
windowResize copy.applescript
|
return 38
|
windowResize copy.applescript
|
end getDockWidth
|
windowResize copy.applescript
|
on dockHideCheck()
|
windowResize copy.applescript
|
end dockHideCheck
|
windowResize copy.applescript
|
on dockPosition()
|
windowResize copy.applescript
|
return result as text
|
windowResize copy.applescript
|
end dockPosition
|
windowResize copy.applescript
|
on runningProcess(appName) --return true or false
|
windowResize copy.applescript
|
application appName is running
|
windowResize copy.applescript
|
on error -- for can not use "is running"
|
windowResize copy.applescript
|
if application process appName exists then
|
windowResize copy.applescript
|
end runningProcess
|
windowResize copy.applescript
|
global std, idlerLib
|
retry.applescript
|
set thisCaseId to "retry-spotCheck"
|
retry.applescript
|
Manual: Activate when Idle
|
retry.applescript
|
Manual: Exhaust retry
|
retry.applescript
|
Manual: Success on retry
|
retry.applescript
|
script SpotIdleBy
|
retry.applescript
|
"target executed"
|
retry.applescript
|
log (execOnIdle of sut on SpotIdleBy by 3 for 100)
|
retry.applescript
|
script SpotExhaust
|
retry.applescript
|
property counter : 0
|
retry.applescript
|
if counter < 5 then error "failed"
|
retry.applescript
|
"won't get printed"
|
retry.applescript
|
log (exec of sut on SpotExhaust by 1 for 3) -- expected missing value
|
retry.applescript
|
script SpotSuccess
|
retry.applescript
|
if counter < 3 then error "failed"
|
retry.applescript
|
"success"
|
retry.applescript
|
log (exec of sut on SpotSuccess by 1 for 3) -- expected "success"
|
retry.applescript
|
script RetryInstance
|
retry.applescript
|
on execOnIdle on scriptObj by idleBy : 2 for ntimes : 1000
|
retry.applescript
|
set idler to idlerLib's new(idleBy)
|
retry.applescript
|
set iteration to 0
|
retry.applescript
|
set warned to false
|
retry.applescript
|
set iteration to iteration + 1
|
retry.applescript
|
if not idler's isIdleFor(idleBy) then
|
retry.applescript
|
logger's debug("not idle, sleeping...")
|
retry.applescript
|
if iteration mod 5 is 0 then
|
retry.applescript
|
set warned to true
|
retry.applescript
|
say "Waiting for you to idle" without waiting until completion
|
retry.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.