text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
on add_computer(computer_label, this_computer_name, username, the_password)
|
add computers to MRDC.applescript
|
keystroke computer_label & " - " & this_computer_name
|
add computers to MRDC.applescript
|
keystroke this_computer_name
|
add computers to MRDC.applescript
|
keystroke username
|
add computers to MRDC.applescript
|
keystroke the_password
|
add computers to MRDC.applescript
|
keystroke "1"
|
add computers to MRDC.applescript
|
end add_computer
|
add computers to MRDC.applescript
|
global std, textUtil, proc
|
step-two.applescript
|
global APP_NAME
|
step-two.applescript
|
set thisCaseId to "step-two-spotCheck"
|
step-two.applescript
|
Manual: Filter(Found, Empty)
|
step-two.applescript
|
Manual: Get OTP (Empty, Non-Empty)
|
step-two.applescript
|
Manual: OTP Retriever
|
step-two.applescript
|
Manual: Clear Filter
|
step-two.applescript
|
Manual: Get OTP by Cred Key (Found, Not Found)
|
step-two.applescript
|
sut's filter("VPN")
|
step-two.applescript
|
set secondsUntilNext to sut's getSecondsRemaining()
|
step-two.applescript
|
if secondsUntilNext is less than 2 then delay secondsUntilNext
|
step-two.applescript
|
logger's debugf("OTP: {}", sut's getFirstOTP())
|
step-two.applescript
|
set frontWindow to sut's getFrontWindow()
|
step-two.applescript
|
assertThat of std given condition:frontWindow is not missing value, messageOnFail:"Front Window is missing value"
|
step-two.applescript
|
set otpRetriever to sut's newRetriever("VPN")
|
step-two.applescript
|
assertThat of std given condition:otpRetriever's getOTP() is not missing value, messageOnFail:"Failed spot check"
|
step-two.applescript
|
sut's clearFilter()
|
step-two.applescript
|
logger's debugf("OTP: {}", sut's getOtpByCredKey("VPN"))
|
step-two.applescript
|
on newRetriever(credKey)
|
step-two.applescript
|
local stepTwo
|
step-two.applescript
|
set stepTwo to new()
|
step-two.applescript
|
set secondsUntilNext to stepTwo's getSecondsRemaining()
|
step-two.applescript
|
if secondsUntilNext is less than 2 then
|
step-two.applescript
|
logger's infof("{} second/s to expire, waiting for the next...", secondsUntilNext)
|
step-two.applescript
|
delay secondsUntilNext
|
step-two.applescript
|
stepTwo's clearFilter()
|
step-two.applescript
|
set otp to stepTwo's getOtpByCredKey(credKey)
|
step-two.applescript
|
set stepTwoProc to proc's new("Step Two")
|
step-two.applescript
|
stepTwoProc's minimize()
|
step-two.applescript
|
otp
|
step-two.applescript
|
end newRetriever
|
step-two.applescript
|
if std's appExists("Step Two") is false then error "Step Two app was not found"
|
step-two.applescript
|
script StepTwoInstance
|
step-two.applescript
|
on filter(filterKey)
|
step-two.applescript
|
set frontWindow to _getFrontWindow()
|
step-two.applescript
|
if running of application APP_NAME is false then return
|
step-two.applescript
|
set value of text field 1 of frontWindow to filterKey
|
step-two.applescript
|
on clearFilter()
|
step-two.applescript
|
click button 2 of text field 1 of front window
|
step-two.applescript
|
end try -- Ignore error when search field is blank and clear button is absent.
|
step-two.applescript
|
end clearFilter
|
step-two.applescript
|
on getOtpByCredKey(credKey)
|
step-two.applescript
|
set accountGroups to groups of list 1 of list 1 of scroll area 1 of front window
|
step-two.applescript
|
repeat with nextGroup in accountGroups
|
step-two.applescript
|
set nextDesc to description of UI element 1 of nextGroup
|
step-two.applescript
|
logger's debugf("nextDesc: {}", nextDesc)
|
step-two.applescript
|
if nextDesc contains credKey then
|
step-two.applescript
|
set tokens to textUtil's split(nextDesc, ",")
|
step-two.applescript
|
return textUtil's replace(last item of tokens, " ", "")
|
step-two.applescript
|
end getOtpByCredKey
|
step-two.applescript
|
on getFirstOTP()
|
step-two.applescript
|
if running of application APP_NAME is false then return missing value
|
step-two.applescript
|
first UI element of group 1 of list 1 of list 1 of scroll area 1 of my _getFrontWindow()
|
step-two.applescript
|
set tokens to textUtil's split(description of result as text, ",")
|
step-two.applescript
|
textUtil's replace(last item of tokens, " ", "")
|
step-two.applescript
|
end getFirstOTP
|
step-two.applescript
|
on getSecondsRemaining()
|
step-two.applescript
|
30 - (3rd word of time string of (current date) as integer) mod 30
|
step-two.applescript
|
end getSecondsRemaining
|
step-two.applescript
|
on _getFrontWindow()
|
step-two.applescript
|
if running of application "Step Two" is false then
|
step-two.applescript
|
activate application "Step Two"
|
step-two.applescript
|
set processStepTwo to proc's new("Step Two")
|
step-two.applescript
|
processStepTwo's terminate()
|
step-two.applescript
|
end _getFrontWindow
|
step-two.applescript
|
set logger to std's import("logger")'s new("step-two")
|
step-two.applescript
|
set APP_NAME to "Step Two"
|
step-two.applescript
|
global downloadedurls
|
github-to-devonthink.scpt
|
global allnewnotes
|
github-to-devonthink.scpt
|
global basewebsiteurl
|
github-to-devonthink.scpt
|
set allnewnotes to {}
|
github-to-devonthink.scpt
|
set downloadedurls to {}
|
github-to-devonthink.scpt
|
say "Scraping started!"
|
github-to-devonthink.scpt
|
log "Started with URL " & basewebsiteurl
|
github-to-devonthink.scpt
|
if basewebsiteurl does not contain "/github.com/" then
|
github-to-devonthink.scpt
|
say "Current page is not a github repository. Stop here."
|
github-to-devonthink.scpt
|
my handle_page(basewebsiteurl)
|
github-to-devonthink.scpt
|
my merge_all_pages(basewebsiteurl)
|
github-to-devonthink.scpt
|
say "There is an error, please check dialog window!"
|
github-to-devonthink.scpt
|
display alert "Scrap Github repository into DEVONthink" message error_message as warning
|
github-to-devonthink.scpt
|
log "Operation completed"
|
github-to-devonthink.scpt
|
say "Operation completed."
|
github-to-devonthink.scpt
|
on merge_all_pages(newwebsiteurl)
|
github-to-devonthink.scpt
|
log "Merge single pages into one document"
|
github-to-devonthink.scpt
|
if (count of allnewnotes) > 0 then
|
github-to-devonthink.scpt
|
set mergedpage to merge records allnewnotes
|
github-to-devonthink.scpt
|
set the name of mergedpage to newwebsiteurl
|
github-to-devonthink.scpt
|
repeat with itemtodelete in allnewnotes
|
github-to-devonthink.scpt
|
delete record itemtodelete
|
github-to-devonthink.scpt
|
say "No pages to scraped!"
|
github-to-devonthink.scpt
|
end merge_all_pages
|
github-to-devonthink.scpt
|
on handle_page(newwebsiteurl)
|
github-to-devonthink.scpt
|
if newwebsiteurl does not contain "/blob/master/" and newwebsiteurl does not contain "/tree/master/" and newwebsiteurl is not basewebsiteurl then
|
github-to-devonthink.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.