text
stringlengths
0
15.7k
source
stringlengths
6
112
display dialog the "Exception in Mail action: (" & n & ") " & m
print-attachment.applescript
return rich text -2 thru -1 of ("00" & n)
print-attachment.applescript
set defaultLabel to "other"
Gmail to Jabber.applescript
property runCount : 0
Gmail to Jabber.applescript
set myVersion to "2"
Gmail to Jabber.applescript
set myname to "Gmail to Jabber"
Gmail to Jabber.applescript
set myUrl to "http://aurelio.net/soft/"
Gmail to Jabber.applescript
set donateUrl to "http://aurelio.net/soft/donate.html"
Gmail to Jabber.applescript
set buttonAll to "All Contacts Once"
Gmail to Jabber.applescript
set buttonConfirm to "Confirm One by One"
Gmail to Jabber.applescript
set introMessage to "This script will set the Jabber field of all your Address Book contacts who have a Gmail e-mail." & return & return & "Do you want to do it in one shot or decide one by one which will be set?"
Gmail to Jabber.applescript
if runCount is 0 then
Gmail to Jabber.applescript
display dialog "Thank you for downloading my " & myname & " script!" & return & return & "You can visit my website and get more free AppleScripts to use with iTunes, iPhoto and Address Book!" buttons {"Later", "OK"} default button 2 with icon 1
Gmail to Jabber.applescript
if button returned of result as text is "OK" then open location myUrl
Gmail to Jabber.applescript
set runCount to runCount + 1
Gmail to Jabber.applescript
on byebye(changedContacts)
Gmail to Jabber.applescript
global myname
Gmail to Jabber.applescript
global donateUrl
Gmail to Jabber.applescript
set doneMessage to ""
Gmail to Jabber.applescript
if changedContacts is greater than 0 then
Gmail to Jabber.applescript
set doneMessage to "Work done!" & return & "We've set the Jabber of " & changedContacts & " contacts." & return & return
Gmail to Jabber.applescript
display dialog myname & return & return & doneMessage & "Thank you for using my script. How about giving me a little hand to improve it?" & return & return & "Donate 3 or 5 dollars to make an independent programmer very happy today!" buttons {"Later", "Donate"} default button 2 with icon 1
Gmail to Jabber.applescript
if button returned of result as text is "Donate" then open location donateUrl
Gmail to Jabber.applescript
end byebye
Gmail to Jabber.applescript
display dialog myname & " (version " & myVersion & ")" & return & return & introMessage with icon 1 buttons {"Quit", buttonAll, buttonConfirm} default button 3
Gmail to Jabber.applescript
set opMode to button returned of result
Gmail to Jabber.applescript
if opMode is "Quit" then return
Gmail to Jabber.applescript
set setCount to 0
Gmail to Jabber.applescript
set ContactCount to 0
Gmail to Jabber.applescript
set totalCount to count every person
Gmail to Jabber.applescript
repeat with thisContact in every person
Gmail to Jabber.applescript
tell thisContact
Gmail to Jabber.applescript
set ContactCount to ContactCount + 1
Gmail to Jabber.applescript
set gmails to (value of every email whose value contains "@GMAIL.COM")
Gmail to Jabber.applescript
if gmails is not {} then
Gmail to Jabber.applescript
set jabbers to (value of every Jabber handle whose value contains "@GMAIL.COM")
Gmail to Jabber.applescript
repeat with gmail in gmails
Gmail to Jabber.applescript
if gmail is not in jabbers then
Gmail to Jabber.applescript
set doIt to true
Gmail to Jabber.applescript
if opMode is buttonConfirm then
Gmail to Jabber.applescript
display dialog myname & " (contact " & ContactCount & " of " & totalCount & ")" & return & return & "Confirmation to set the Jabber for the following contact:" & return & return & "Name:" & tab & name & return & "Jabber:" & tab & gmail with icon 1 buttons {"Quit", "Skip", "Set Jabber"} default button 3
Gmail to Jabber.applescript
if button returned of result is "Quit" then
Gmail to Jabber.applescript
if setCount is greater than 0 then my byebye(setCount)
Gmail to Jabber.applescript
else if button returned of result is "Skip" then
Gmail to Jabber.applescript
set doIt to false
Gmail to Jabber.applescript
if doIt then
Gmail to Jabber.applescript
make new Jabber handle at end of Jabber handles with properties {label:defaultLabel, value:gmail}
Gmail to Jabber.applescript
set setCount to setCount + 1
Gmail to Jabber.applescript
if setCount is greater than 0 then
Gmail to Jabber.applescript
my byebye(setCount)
Gmail to Jabber.applescript
display dialog myname & return & return & "No Jabber to set!" & return & "All your fields are already filled." buttons {"Great!"} default button 1 with icon 1
Gmail to Jabber.applescript
return expand("http://www.ergonis.com/products/typinator/") -- for testing in the AppleScript Editor
TinyURL.applescript
on expand(theURL) -- parameter: URL
TinyURL.applescript
if length of theURL = 0 then set theURL to (the clipboard as string)
TinyURL.applescript
if ((characters 1 through 4 of theURL as string) is not "http") then
TinyURL.applescript
error "invalid URL " & theURL & " (must begin with \"http\")"
TinyURL.applescript
"curl --stderr /dev/null \"http://tinyurl.com/api-create.php?url=" & theURL & "\""
TinyURL.applescript
set tinyURL to (do shell script curlCMD)
TinyURL.applescript
return tinyURL
TinyURL.applescript
on error (msg)
TinyURL.applescript
end expand
TinyURL.applescript
property destFolderName : "FloppyStore"
Disk Importer.applescript
property thisStep : 92
Disk Importer.applescript
set ignoreTheseDisks to getDisks()
Disk Importer.applescript
repeat while appOpen("iTunes")
Disk Importer.applescript
set theNewDisks to newDisks(ignoreTheseDisks, getDisks())
Disk Importer.applescript
if (count of theNewDisks) > 0 then
Disk Importer.applescript
repeat with anDisk in theNewDisks
Disk Importer.applescript
set thisStep to thisStep + 1
Disk Importer.applescript
set thisDestFolder to (destFolderName & "/" & thisStep)
Disk Importer.applescript
mkDstDir(thisDestFolder)
Disk Importer.applescript
copyDisk(anDisk, destFolderName, thisStep)
Disk Importer.applescript
ejectDisk(anDisk)
Disk Importer.applescript
iTAlert()
Disk Importer.applescript
on mkDstDir(folderName)
Disk Importer.applescript
do shell script "mkdir -p ~/Desktop/" & folderName
Disk Importer.applescript
end mkDstDir
Disk Importer.applescript
on newDisks(oldList, newList)
Disk Importer.applescript
set newDiskList to {}
Disk Importer.applescript
repeat with anItem in newList
Disk Importer.applescript
if oldList does not contain anItem then set newDiskList to newDiskList & anItem
Disk Importer.applescript
return newDiskList
Disk Importer.applescript
end newDisks
Disk Importer.applescript
on getDisks()
Disk Importer.applescript
tell application "Finder" to set diskList to name of disks
Disk Importer.applescript
return diskList
Disk Importer.applescript
end getDisks
Disk Importer.applescript
on iTAlert()
Disk Importer.applescript
tell application "iTunes" to play playlist "AS Alert"
Disk Importer.applescript
end iTAlert
Disk Importer.applescript
on appOpen(testName)
Disk Importer.applescript
tell application "System Events" to set openProcesses to name of processes
Disk Importer.applescript
return (openProcesses contains testName)
Disk Importer.applescript
end appOpen
Disk Importer.applescript
on copyDisk(diskName, destFold, thisSteper)
Disk Importer.applescript
set theStepper to thisSteper as string
Disk Importer.applescript
copy contents of disk diskName to folder theStepper of folder destFold of desktop
Disk Importer.applescript
end copyDisk
Disk Importer.applescript
on ejectDisk(diskName)
Disk Importer.applescript
eject disk diskName
Disk Importer.applescript