text
stringlengths
0
15.7k
source
stringlengths
6
112
set the clipboard to generatedPassword
password-generator.applescript
set question to display alert "New password copied to clipboard" message generatedPassword buttons {"Another Password", "Thanks"} default button 2
password-generator.applescript
if answer is equal to "Another Password" then
password-generator.applescript
end displayAlert
password-generator.applescript
on generatePassword()
password-generator.applescript
set charList to {}
password-generator.applescript
set shuffledCharList to {}
password-generator.applescript
repeat with index from 1 to 18
password-generator.applescript
if index is less than 12 then
password-generator.applescript
set charList to charList & some item of lowerChars
password-generator.applescript
else if index is less than 16 then
password-generator.applescript
set charList to charList & some item of upperChars
password-generator.applescript
set charList to charList & some item of nums
password-generator.applescript
set randIndex to random number from 1 to (count charList)
password-generator.applescript
set pluckedChar to item randIndex of charList
password-generator.applescript
set shuffledCharList to shuffledCharList & pluckedChar
password-generator.applescript
set reducedCharList to {}
password-generator.applescript
repeat with index from 1 to (count charList)
password-generator.applescript
if index is not equal to randIndex then
password-generator.applescript
set reducedCharList to reducedCharList & item index of charList
password-generator.applescript
set charList to reducedCharList
password-generator.applescript
set str to shuffledCharList as text
password-generator.applescript
return text 1 thru 6 of str & "-" & text 7 thru 12 of str & "-" & text 13 thru 18 of str
password-generator.applescript
end generatePassword
password-generator.applescript
set output to "https://papago.naver.com/?sk=en&tk=ko&st=" & replaceSpace(input as string)
twp.applescript
on replaceSpace(x)
twp.applescript
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'"
twp.applescript
do shell script "echo " & quoted form of x & "| ruby -e " & cmd & "| sed 's/+/%20/g'"
twp.applescript
end replaceSpace
twp.applescript
windowSize's windowSize({xsize:0.5, ysize:1, xpos:0.5, ypos:0})
wsHalfRight.applescript
if not inMeeting() then error "not in a meeting"
zoom-toggle-video.applescript
if menu item "Start Video" exists then
zoom-toggle-video.applescript
click menu item "Start Video"
zoom-toggle-video.applescript
set diag to "You're on camera"
zoom-toggle-video.applescript
else if menu item "Stop Video" exists then
zoom-toggle-video.applescript
click menu item "Stop Video"
zoom-toggle-video.applescript
set diag to "You're off camera"
zoom-toggle-video.applescript
display notification (diag) with title ("Toggle zoom video")
zoom-toggle-video.applescript
on inMeeting()
zoom-toggle-video.applescript
end inMeeting
zoom-toggle-video.applescript
global x_val
zigzag-rectangle-omnigraffle-applescript.scpt
global y_val
zigzag-rectangle-omnigraffle-applescript.scpt
global ctr
zigzag-rectangle-omnigraffle-applescript.scpt
global limit
zigzag-rectangle-omnigraffle-applescript.scpt
global zag_depth
zigzag-rectangle-omnigraffle-applescript.scpt
global zag_length
zigzag-rectangle-omnigraffle-applescript.scpt
global orig_y
zigzag-rectangle-omnigraffle-applescript.scpt
global shape_origin
zigzag-rectangle-omnigraffle-applescript.scpt
global selecteD_shape
zigzag-rectangle-omnigraffle-applescript.scpt
global obj_size
zigzag-rectangle-omnigraffle-applescript.scpt
tell front window of application "OmniGraffle Professional 5"
zigzag-rectangle-omnigraffle-applescript.scpt
set obj_size to {}
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_origin to {}
zigzag-rectangle-omnigraffle-applescript.scpt
set selecteD_shape to selection
zigzag-rectangle-omnigraffle-applescript.scpt
repeat with obj in selecteD_shape
zigzag-rectangle-omnigraffle-applescript.scpt
set obj_size to size of obj
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_origin to origin of obj
zigzag-rectangle-omnigraffle-applescript.scpt
if length of selecteD_shape = 0 then
zigzag-rectangle-omnigraffle-applescript.scpt
display dialog "You have not made a selection. Please select your crop and try again."
zigzag-rectangle-omnigraffle-applescript.scpt
display dialog "Are you cropping the top?" & return & "('y' or 'n')" default answer ""
zigzag-rectangle-omnigraffle-applescript.scpt
set top_yn to text returned of the result as string
zigzag-rectangle-omnigraffle-applescript.scpt
if top_yn is not equal to "y" and top_yn is not equal to "Y" then
zigzag-rectangle-omnigraffle-applescript.scpt
set top_yn to "n"
zigzag-rectangle-omnigraffle-applescript.scpt
display dialog "Are you cropping the right?" & return & "('y' or 'n'))" default answer ""
zigzag-rectangle-omnigraffle-applescript.scpt
set right_yn to text returned of the result as string
zigzag-rectangle-omnigraffle-applescript.scpt
if right_yn is not equal to "y" and right_yn is not equal to "Y" then
zigzag-rectangle-omnigraffle-applescript.scpt
set right_yn to "n"
zigzag-rectangle-omnigraffle-applescript.scpt
display dialog "Are you cropping the bottom?" & return & "('y' or 'n'))" default answer ""
zigzag-rectangle-omnigraffle-applescript.scpt
set bottom_yn to text returned of the result as string
zigzag-rectangle-omnigraffle-applescript.scpt
if bottom_yn is not equal to "y" and bottom_yn is not equal to "Y" then
zigzag-rectangle-omnigraffle-applescript.scpt
set bottom_yn to "n"
zigzag-rectangle-omnigraffle-applescript.scpt
display dialog "Are you cropping the left?" & return & "('y' or 'n'))" default answer ""
zigzag-rectangle-omnigraffle-applescript.scpt
set left_yn to text returned of the result as string
zigzag-rectangle-omnigraffle-applescript.scpt
if left_yn is not equal to "y" and left_yn is not equal to "Y" then
zigzag-rectangle-omnigraffle-applescript.scpt
set left_yn to "n"
zigzag-rectangle-omnigraffle-applescript.scpt
log "shape origin " & shape_origin
zigzag-rectangle-omnigraffle-applescript.scpt
log "object size " & obj_size
zigzag-rectangle-omnigraffle-applescript.scpt
set x_val to item 1 of shape_origin
zigzag-rectangle-omnigraffle-applescript.scpt
set y_val to item 2 of shape_origin
zigzag-rectangle-omnigraffle-applescript.scpt
set orig_x to x_val
zigzag-rectangle-omnigraffle-applescript.scpt
set orig_y to y_val
zigzag-rectangle-omnigraffle-applescript.scpt
set ctr to 1
zigzag-rectangle-omnigraffle-applescript.scpt
set zag_depth to 4
zigzag-rectangle-omnigraffle-applescript.scpt
set zag_length to 14
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_width to item 1 of obj_size as integer
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_height to item 2 of obj_size as integer
zigzag-rectangle-omnigraffle-applescript.scpt
repeat while shape_width mod zag_length is not 0 and ctr < 12
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_width to shape_width + 1
zigzag-rectangle-omnigraffle-applescript.scpt
if shape_width > 732 and right_yn = "n" then
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_width to 732
zigzag-rectangle-omnigraffle-applescript.scpt
if shape_width > 732 and right_yn is not equal to "n" then
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_width to 713
zigzag-rectangle-omnigraffle-applescript.scpt
log "shape width " & shape_width
zigzag-rectangle-omnigraffle-applescript.scpt
repeat while shape_height mod zag_length is not 0 and ctr < 12
zigzag-rectangle-omnigraffle-applescript.scpt
set shape_height to shape_height + 1
zigzag-rectangle-omnigraffle-applescript.scpt
set x_limit to ((shape_width / zag_length) as integer) + 1
zigzag-rectangle-omnigraffle-applescript.scpt
set y_limit to ((shape_height / zag_length) as integer) + 1
zigzag-rectangle-omnigraffle-applescript.scpt
log "x limit " & x_limit
zigzag-rectangle-omnigraffle-applescript.scpt
log "y limit " & y_limit
zigzag-rectangle-omnigraffle-applescript.scpt
set point_list to {}
zigzag-rectangle-omnigraffle-applescript.scpt