text
stringlengths
0
15.7k
source
stringlengths
6
112
set pubRecord to {}
gistfile1 copy 9.applescript
repeat with newPubRecord in recordsForIndex
gistfile1 copy 9.applescript
if ((pubKey of newPubRecord) as string) = (nextPubKey as string) then
gistfile1 copy 9.applescript
set pubRecord to newPubRecord
gistfile1 copy 9.applescript
if not foundMatch then
gistfile1 copy 9.applescript
display dialog "No match found for " & nextPubKey
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " <tr>"
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " <td><a href='./" & (pubKey of pubRecord) & ".pdf'>K@" & (pubKey of pubRecord) & "</a></td>"
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " <td>"
gistfile1 copy 9.applescript
repeat with auth in (pubAuth of pubRecord)
gistfile1 copy 9.applescript
if (ind > 1) then
gistfile1 copy 9.applescript
set htmlText to htmlText & "; "
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR
gistfile1 copy 9.applescript
set htmlText to htmlText & (name of auth)
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " </td>"
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " <td>" & (pubTitle of pubRecord) & "</td>"
gistfile1 copy 9.applescript
repeat with pubFile in (pubFiles of pubRecord)
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " <a href='" & pubFile & "'>" & pubFile & "</a>"
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " </tr>"
gistfile1 copy 9.applescript
if (length of (pubNote of pubRecord) > 0) then
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & " <tr><td></td><td colspan=3>" & (pubNote of pubRecord) & "</td></tr>"
gistfile1 copy 9.applescript
set htmlText to htmlText & etcR & "
gistfile1 copy 9.applescript
</table>
gistfile1 copy 9.applescript
</html>
gistfile1 copy 9.applescript
set theText to htmlText
gistfile1 copy 9.applescript
set theFilePath to papersFolder & "/00_index.html" as string
gistfile1 copy 9.applescript
set theFileReference to open for access theFilePath with write permission
gistfile1 copy 9.applescript
set eof of theFileReference to 0
gistfile1 copy 9.applescript
write theText to theFileReference starting at eof
gistfile1 copy 9.applescript
close access theFileReference
gistfile1 copy 9.applescript
on rstripString(theText, trimString)
gistfile1 copy 9.applescript
set x to count trimString
gistfile1 copy 9.applescript
repeat while theText ends with the trimString
gistfile1 copy 9.applescript
set theText to characters 1 thru -(x + 1) of theText as text
gistfile1 copy 9.applescript
end rstripString
gistfile1 copy 9.applescript
if not (exists current database) then error "No database is open."
Daily backup archive.applescript
set this_database to current database
Daily backup archive.applescript
set this_date to do shell script "date +%y-%m-%d"
Daily backup archive.applescript
set this_path to path of this_database
Daily backup archive.applescript
set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
Daily backup archive.applescript
set this_name to the last text item of this_path
Daily backup archive.applescript
if this_name ends with ".dtBase2" then set this_name to (characters 1 thru -9 of this_name) as string
Daily backup archive.applescript
set this_archive to "~/Backup/" & this_name & " " & this_date & ".dtBase2.zip"
Daily backup archive.applescript
show progress indicator "Daily Backup Archive" steps 3
Daily backup archive.applescript
step progress indicator "Verifying..."
Daily backup archive.applescript
if (verify database this_database) is not 0 then error "Database is damaged."
Daily backup archive.applescript
step progress indicator "Optimizing..."
Daily backup archive.applescript
if not (optimize database this_database) then error "Optimization of database failed."
Daily backup archive.applescript
step progress indicator "Zipping..."
Daily backup archive.applescript
if not (compress database this_database to this_archive) then error "Backup failed."
Daily backup archive.applescript
do shell script "killall VDCAssistant" with administrator privileges
CameraFix.applescript
execute front window's active tab javascript "document.querySelector('#reset_to_default').click()"
Magento - Reset default.applescript
execute front window's active tab javascript "document.querySelectorAll('.action-accept')[0].click();"
Magento - Reset default.applescript
execute front window's active tab javascript "document.querySelector('#save_and_continue').click()"
Magento - Reset default.applescript
use scripting additions -- You need this, otherwise it will be unloaded with your first library load
test_libraries.applescript
use script "ProtoHashes"
test_libraries.applescript
set someHash to {}
test_libraries.applescript
tell script "ProtoHashes" to set someHash to append(someHash, "alice", "1")
test_libraries.applescript
tell script "ProtoHashes" to set someHash to append(someHash, "bob", "2")
test_libraries.applescript
tell script "ProtoHashes" to set someHash to append(someHash, "carl", "3")
test_libraries.applescript
tell script "ProtoHashes" to set someHash to remove(someHash, "carl")
test_libraries.applescript
tell script "ProtoHashes" to set someHash to modifyIndex(someHash, "bob", "15")
test_libraries.applescript
tell script "ProtoHashes" to get {dump(someHash), "\n", getIndex(someHash, "alice"), getIndex(someHash, "bob"), getIndex(someHash, "carl")}
test_libraries.applescript
fmGUI_ManageSecurity_PrivSet_Names({fullAccessAccountName:"admin", fullAccessPassword:""})
fmGUI_ManageSecurity_PrivSet_Names.applescript
on fmGUI_ManageSecurity_PrivSet_Names(prefs)
fmGUI_ManageSecurity_PrivSet_Names.applescript
set defaultPrefs to {fullAccessAccountName:"admin", fullAccessPassword:""}
fmGUI_ManageSecurity_PrivSet_Names.applescript
fmGUI_ManageSecurity_GoToTab_PrivSets(prefs)
fmGUI_ManageSecurity_PrivSet_Names.applescript
set privSetNameList to name of static text 1 of every row of (table 1 of scroll area 1 of tab group 1 of window 1)
fmGUI_ManageSecurity_PrivSet_Names.applescript
return privSetNameList
fmGUI_ManageSecurity_PrivSet_Names.applescript
error "Couldn't fmGUI_ManageSecurity_PrivSet_Names - " & errMsg number errNum
fmGUI_ManageSecurity_PrivSet_Names.applescript
end fmGUI_ManageSecurity_PrivSet_Names
fmGUI_ManageSecurity_PrivSet_Names.applescript
on fmGUI_ManageSecurity_GoToTab_PrivSets(prefs)
fmGUI_ManageSecurity_PrivSet_Names.applescript
tell application "htcLib" to fmGUI_ManageSecurity_GoToTab_PrivSets(prefs)
fmGUI_ManageSecurity_PrivSet_Names.applescript
end fmGUI_ManageSecurity_GoToTab_PrivSets
fmGUI_ManageSecurity_PrivSet_Names.applescript
do shell script "networksetup -setairportpower en0 on"
Turn WiFi On.applescript
do script "cd ~/desktop/PDFmerge"
qpdf.applescript
make new window
qpdf.applescript
set URL of tab 1 of window 1 to "https://imouyang.com/qpdf-shi-yong-bi-ji/"
qpdf.applescript
activate front window
qpdf.applescript
make new tab at front window
qpdf.applescript
set URL of tab (count tabs of front window) of front window to "https://imouyang.com/qpdf-shi-yong-bi-ji/"
qpdf.applescript
set {linkinfo, linkbutton} to the {text returned, button returned} of (display dialog "Enter your link text, alt text, or click-through url" default answer "" buttons {"Image link", "Click-Though Image link", "Url Link"} default button "Url Link")
markdownlinks.applescript
if linkbutton is "Url Link" then
markdownlinks.applescript
set linkk to the clipboard
markdownlinks.applescript
set mdlink to linkinfo
markdownlinks.applescript
set mdlink to "[" & mdlink & "]"
markdownlinks.applescript
set linkk to "(" & linkk & ")"
markdownlinks.applescript
set autolink1 to mdlink & linkk
markdownlinks.applescript
set the clipboard to autolink1
markdownlinks.applescript
else if linkbutton is "Image link" then
markdownlinks.applescript
set mdlink1 to linkinfo
markdownlinks.applescript
set mdlink1 to "![" & mdlink1 & "]"
markdownlinks.applescript
set autolink2 to mdlink1 & linkk
markdownlinks.applescript
set the clipboard to autolink2
markdownlinks.applescript
else if linkbutton is "Click-Through image link" then
markdownlinks.applescript
set linkinfo to ctlink
markdownlinks.applescript
set imglink to "[![" & linkk & "][1]][2]" & return & return
markdownlinks.applescript
set sublink to "[1]: " & linkk & "
markdownlinks.applescript
[2]: " & ctlink
markdownlinks.applescript
set autolink3 to imglink & sublink
markdownlinks.applescript