text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
tell application "Finder" to eject disk "WD2T"
|
power_events.applescript
|
if thisTrigger is "Power switched to mains" then
|
power_events.applescript
|
if (diskStatus is not "Mounted") then
|
power_events.applescript
|
display dialog "Time Machine Disk Not Connected?"
|
power_events.applescript
|
set _action's defer date to my getDate(_action's due date)
|
start-tomorrow.applescript
|
set the_folder to path to desktop
|
Script 25-14.applescript
|
set the_db to make new database with properties {name:"cars", location:the_folder}
|
Script 25-14.applescript
|
tell the_db
|
Script 25-14.applescript
|
set the_record to make new record with properties {name:"Toyota"}
|
Script 25-14.applescript
|
make new record with properties {name:"Mercedes"}
|
Script 25-14.applescript
|
tell the_record
|
Script 25-14.applescript
|
make new field with properties {name:"Make", value:"Toyota"}
|
Script 25-14.applescript
|
make new field with properties {name:"Model", value:"Camry"}
|
Script 25-14.applescript
|
make new field with properties {name:"Year", value:1993}
|
Script 25-14.applescript
|
tell record "Mercedes" of the_db
|
Script 25-14.applescript
|
make new field with properties {name:"Make", value:"Mercedes-Benz"}
|
Script 25-14.applescript
|
make new field with properties {name:"Model", value:"300TD"}
|
Script 25-14.applescript
|
make new field with properties {name:"Year", value:1997}
|
Script 25-14.applescript
|
save the_db
|
Script 25-14.applescript
|
tell app "Safari"¬
|
refresh-Safari-CSS.txt
|
to do JavaScript "!function(){ var links = document.getElementsByTagName('link'); for (var i=0, link; link = links[i++];){ if (link.href && String(link.rel).toLowerCase().indexOf('stylesheet') >= 0){ var href = link.href.replace(/[&?]reCSS=\\d+/, ''); link.href = href + (href.indexOf('?') >= 0 ? '&' : '?') + 'reCSS=' + (+new Date); } } }()"¬
|
refresh-Safari-CSS.txt
|
in every document
|
refresh-Safari-CSS.txt
|
global ScriptLinkMaker
|
DocElements.applescript
|
global XText
|
DocElements.applescript
|
on strip_tag(a_text)
|
DocElements.applescript
|
set a_list to a_text's as_list_with(space)
|
DocElements.applescript
|
return XText's make_with_list(rest of a_list, space)
|
DocElements.applescript
|
end strip_tag
|
DocElements.applescript
|
on make_heading_element(a_line)
|
DocElements.applescript
|
set a_tag to first word of (a_line's as_unicode())
|
DocElements.applescript
|
script HeadingElement
|
DocElements.applescript
|
property _tag : a_tag
|
DocElements.applescript
|
property _data : strip_tag(a_line)
|
DocElements.applescript
|
return my _tag
|
DocElements.applescript
|
on html_element_with(a_tag)
|
DocElements.applescript
|
set anc_name to my _data's strip()'s replace(space, "_")
|
DocElements.applescript
|
set an_elem to HTMLElement's make_with(a_tag, {{"id", anc_name's as_unicode()}})
|
DocElements.applescript
|
return an_elem's push(my _data)
|
DocElements.applescript
|
end html_element_with
|
DocElements.applescript
|
on as_html_with(a_tag)
|
DocElements.applescript
|
return html_element_with(a_tag)'s as_html()
|
DocElements.applescript
|
end as_html_with
|
DocElements.applescript
|
on get_contents()
|
DocElements.applescript
|
return my _data
|
DocElements.applescript
|
end get_contents
|
DocElements.applescript
|
if a_tag is "group" then
|
DocElements.applescript
|
return make_group_element(HeadingElement)
|
DocElements.applescript
|
else if a_tag is "title" then
|
DocElements.applescript
|
return make_title_element(HeadingElement)
|
DocElements.applescript
|
error a_line & " is unknown tag." number 1450
|
DocElements.applescript
|
return HeadingElement
|
DocElements.applescript
|
end make_heading_element
|
DocElements.applescript
|
on make_group_element(parentElement)
|
DocElements.applescript
|
script GroupElement
|
DocElements.applescript
|
property parent : parentElement
|
DocElements.applescript
|
on html_element()
|
DocElements.applescript
|
return html_element_with("h2")
|
DocElements.applescript
|
end html_element
|
DocElements.applescript
|
return as_html_with("h2")
|
DocElements.applescript
|
return GroupElement
|
DocElements.applescript
|
end make_group_element
|
DocElements.applescript
|
on make_title_element(parentElement)
|
DocElements.applescript
|
script TitleElement
|
DocElements.applescript
|
set an_elem to HTMLElement's make_with("h1", {})
|
DocElements.applescript
|
an_elem's push(my _data)
|
DocElements.applescript
|
return an_elem
|
DocElements.applescript
|
set an_elem to html_element()
|
DocElements.applescript
|
return an_elem's as_html()
|
DocElements.applescript
|
return TitleElement
|
DocElements.applescript
|
end make_title_element
|
DocElements.applescript
|
on make_paragraph_element(a_list)
|
DocElements.applescript
|
script ParagraphElement
|
DocElements.applescript
|
property parent : XList's make_with(a_list)
|
DocElements.applescript
|
return "paragraph"
|
DocElements.applescript
|
if (count me) > 0 then
|
DocElements.applescript
|
set srd to SimpleRD's make_with_iterator(me)
|
DocElements.applescript
|
return srd's html_tree()
|
DocElements.applescript
|
return convert()
|
DocElements.applescript
|
return html_element()'s as_html()
|
DocElements.applescript
|
end make_paragraph_element
|
DocElements.applescript
|
script ExampleElement
|
DocElements.applescript
|
return "example"
|
DocElements.applescript
|
set a_code to my _contents's as_text_with(return)
|
DocElements.applescript
|
tell make ASHTML
|
DocElements.applescript
|
set_wrap_with_block(false)
|
DocElements.applescript
|
set a_html to process_text(a_code, false)
|
DocElements.applescript
|
set script_link to ScriptLinkMaker's button_with_template(a_code, "Open this script", "new", "button_template.html")
|
DocElements.applescript
|
tell HTMLElement's make_with("div", {{"class", "sourceCode"}})
|
DocElements.applescript
|
push(script_link)
|
DocElements.applescript
|
push(a_html)
|
DocElements.applescript
|
on make_example_element(a_list)
|
DocElements.applescript
|
script ExampleElementInstance
|
DocElements.applescript
|
property parent : ExampleElement
|
DocElements.applescript
|
property _contents : XList's make_with(a_list)
|
DocElements.applescript
|
return ExampleElementInstance
|
DocElements.applescript
|
end make_example_element
|
DocElements.applescript
|
on dlg(mess)
|
handler.applescript
|
display dialog mess
|
handler.applescript
|
end dlg
|
handler.applescript
|
class of dlg
|
handler.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.