text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
do shell script "mkdir -p /Applications/Chromium.app"
|
UpdateChromium.applescript
|
do shell script "mkdir -p /Applications/Chromium.app/Contents"
|
UpdateChromium.applescript
|
do shell script "cp -pR ~/.tmp/chrome-mac/Chromium.app/Contents /Applications/Chromium.app"
|
UpdateChromium.applescript
|
status_label's setStringValue_("Cleaning up" as string)
|
UpdateChromium.applescript
|
do shell script "rm -R ~/.tmp/chrome*"
|
UpdateChromium.applescript
|
do shell script "rm -R /Applications/Chromium.old.app"
|
UpdateChromium.applescript
|
status_label's setStringValue_("Finished!")
|
UpdateChromium.applescript
|
end updateChromium_
|
UpdateChromium.applescript
|
on QuitUpdater_(sender)
|
UpdateChromium.applescript
|
end QuitUpdater_
|
UpdateChromium.applescript
|
open location "https://docs.python.org/2/search.html?q=" & argv
|
pydoc2.applescript
|
on make_associative_list()
|
Script 18-22.applescript
|
return {class:"associative list", the_items:{}}
|
Script 18-22.applescript
|
on find_record_for_key(the_assoc_list, the_key)
|
Script 18-22.applescript
|
repeat with record_ref in the_items of the_assoc_list
|
Script 18-22.applescript
|
return missing value -- The key wasn't found
|
Script 18-22.applescript
|
on get_associative_item(the_assoc_list, the_key)
|
Script 18-22.applescript
|
set record_ref to find_record_for_key(the_assoc_list, the_key)
|
Script 18-22.applescript
|
end get_associative_item
|
Script 18-22.applescript
|
on set_associative_item(the_assoc_list, the_key, the_value)
|
Script 18-22.applescript
|
set end of the_items of the_assoc_list to {the_key:the_key, the_value:the_value}
|
Script 18-22.applescript
|
return -- No return value; the handler modifies the existing associative list.
|
Script 18-22.applescript
|
end set_associative_item
|
Script 18-22.applescript
|
on count_associative_items(the_assoc_list)
|
Script 18-22.applescript
|
return count the_items of the_assoc_list
|
Script 18-22.applescript
|
on delete_associative_item(the_assoc_list, the_key)
|
Script 18-22.applescript
|
set the_items of the_assoc_list to every record of the_items of the_assoc_list
|
Script 18-22.applescript
|
end delete_associative_item
|
Script 18-22.applescript
|
set birthday to date "Wednesday, October 31, 1979 12:00:00 AM"
|
Script 9–4.applescript
|
set today to date "Friday, July 10, 2009 12:00:00 AM"
|
Script 9–4.applescript
|
set age_in_years to (year of today) - (year of birthday)
|
Script 9–4.applescript
|
if (month of birthday) > (month of today) then
|
Script 9–4.applescript
|
set age_in_years to age_in_years - 1
|
Script 9–4.applescript
|
else if (month of birthday) = (month of today) then
|
Script 9–4.applescript
|
if (day of birthday) > (day of today) then
|
Script 9–4.applescript
|
age_in_years
|
Script 9–4.applescript
|
script SkypeStatusAway
|
skype-change-status-away.applescript
|
if (exists process "Skype") then
|
skype-change-status-away.applescript
|
send command "GET USERSTATUS" script name "BlueSense"
|
skype-change-status-away.applescript
|
set lestatut to the result
|
skype-change-status-away.applescript
|
if lestatut is "USERSTATUS ONLINE" then
|
skype-change-status-away.applescript
|
send command "SET USERSTATUS AWAY" script name "BlueSense"
|
skype-change-status-away.applescript
|
on run {asFile, parameters}
|
Compile scpt.applescript
|
set fileInfo to (info for asFile)
|
Compile scpt.applescript
|
set asFolder to POSIX path of asFile
|
Compile scpt.applescript
|
set asFolder to POSIX file asFolder as string
|
Compile scpt.applescript
|
set asFolder to (characters 1 thru -((length of (name of fileInfo)) + 1) of asFolder) as string
|
Compile scpt.applescript
|
if name extension of fileInfo is "applescript" then
|
Compile scpt.applescript
|
if not (exists (asFolder & "bin")) then
|
Compile scpt.applescript
|
make new folder at asFolder with properties {name:"bin"}
|
Compile scpt.applescript
|
set command to ("osacompile -o \"" & my posixPath(asFolder) & "bin/" & displayed name of fileInfo & ".scpt\"" & space & "-x" & space & "\"" & my posixPath(asFolder) & name of fileInfo & "\"")
|
Compile scpt.applescript
|
display dialog "Choose an .applescript file to compile!"
|
Compile scpt.applescript
|
display dialog "Error: " & errorNumber & return & errorMessage
|
Compile scpt.applescript
|
on posixPath(macPath)
|
Compile scpt.applescript
|
set macPath to (macPath as text)
|
Compile scpt.applescript
|
set rootOffset to (offset of ":" in macPath)
|
Compile scpt.applescript
|
set rootdisk to (characters 1 thru (rootOffset - 1) of macPath)
|
Compile scpt.applescript
|
if (disk (rootdisk as string) is the startup disk) then
|
Compile scpt.applescript
|
set unixpath to "/" & (characters (rootOffset + 1) thru end of macPath)
|
Compile scpt.applescript
|
set unixpath to "/Volumes:" & macPath
|
Compile scpt.applescript
|
set chars to every character of unixpath
|
Compile scpt.applescript
|
repeat with i from 2 to length of chars
|
Compile scpt.applescript
|
if item i of chars as text is equal to "/" then
|
Compile scpt.applescript
|
set item i of chars to ":"
|
Compile scpt.applescript
|
else if item i of chars as text is equal to ":" then
|
Compile scpt.applescript
|
set item i of chars to "/"
|
Compile scpt.applescript
|
return every item of chars as string
|
Compile scpt.applescript
|
end posixPath
|
Compile scpt.applescript
|
display dialog "Name of the product I am reviewing" default answer ""
|
of_review_template copy.applescript
|
set pContext to first flattened context where its name = "Product Review"
|
of_review_template copy.applescript
|
set myFolder to first flattened folder where its name = "Reviews"
|
of_review_template copy.applescript
|
set MyAction to make new task with properties {name:"Kit added into Bento", context:tContext, start date:dateToday}
|
of_review_template copy.applescript
|
set MyAction to make new task with properties {name:"Folder created in dropbox", context:tContext, start date:dateToday}
|
of_review_template copy.applescript
|
set MyAction to make new task with properties {name:"Test the product", context:tContext, start date:dateToday}
|
of_review_template copy.applescript
|
set MyAction to make new task with properties {name:"Update bento with product details go back", context:tContext, start date:dateToday}
|
of_review_template copy.applescript
|
set MyAction to make new task with properties {name:"Send item back", context:tContext, start date:dateToday}
|
of_review_template copy.applescript
|
set mainFolder to "Macintosh HD:Users:craigdba:Dropbox:Geek Computers:Posts:reviews" as alias
|
of_review_template copy.applescript
|
property theUsers : {"username1", "username2"}
|
pass setter.applescript
|
property thePasswds : {"hello", "password"}
|
pass setter.applescript
|
property waitTimer : 0.05
|
pass setter.applescript
|
property RemoveOffline : true
|
pass setter.applescript
|
property RemoveBroken : true
|
pass setter.applescript
|
repeat with anUser in theUsers
|
pass setter.applescript
|
repeat with anPasswd in thePasswds
|
pass setter.applescript
|
newPass(anUser, anPasswd)
|
pass setter.applescript
|
set theSel to getComputerList()
|
pass setter.applescript
|
checkStatus(theSel)
|
pass setter.applescript
|
sortComputers(theSel)
|
pass setter.applescript
|
on getComputerList()
|
pass setter.applescript
|
tell application "Remote Desktop"
|
pass setter.applescript
|
delay waitTimer
|
pass setter.applescript
|
tell application "System Events" to keystroke "a" using command down
|
pass setter.applescript
|
return theSel
|
pass setter.applescript
|
end getComputerList
|
pass setter.applescript
|
on newPass(theUsername, thePassword)
|
pass setter.applescript
|
tell application "System Events" to keystroke "i" using command down
|
pass setter.applescript
|
tell application "System Events" to keystroke tab using shift down
|
pass setter.applescript
|
tell application "System Events" to keystroke space
|
pass setter.applescript
|
tell application "System Events" to keystroke theUsername
|
pass setter.applescript
|
tell application "System Events" to keystroke thePassword
|
pass setter.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.