text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
end text_length | TextParser.applescript |
on comma_delimited_text(text_items) | TextParser.applescript |
delimited_text(text_items, "," & space) | TextParser.applescript |
end comma_delimited_text | TextParser.applescript |
on delimited_text(text_items, delimiter) | TextParser.applescript |
set ret_val to "" | TextParser.applescript |
repeat with i from 1 to (length of text_items) --Todo: store len in a variable | TextParser.applescript |
set the_word to item i of text_items | TextParser.applescript |
set head to "" | TextParser.applescript |
set tail to delimiter | TextParser.applescript |
if i = (length of text_items) then | TextParser.applescript |
set ret_val to ret_val & head & the_word & tail | TextParser.applescript |
end delimited_text | TextParser.applescript |
on to_paragraphs(the_list) | TextParser.applescript |
return the_list as text | TextParser.applescript |
end to_paragraphs | TextParser.applescript |
on ordinal(the_number) | TextParser.applescript |
set ordinals to {"first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "seventeenth", "eigthteenth", "nineteenth", "twenteenth"} | TextParser.applescript |
return item the_number of ordinals | TextParser.applescript |
end ordinal | TextParser.applescript |
on encode(the_text) | TextParser.applescript |
return do shell script "php -r 'echo urlencode(\"" & the_text & "\");'" | TextParser.applescript |
on decode(the_text) | TextParser.applescript |
return do shell script "php -r 'echo urldecode(\"" & the_text & "\");'" | TextParser.applescript |
end decode | TextParser.applescript |
on quoted_form(the_text) | TextParser.applescript |
return quoted form of the_text | TextParser.applescript |
end quoted_form | TextParser.applescript |
on sub_string(the_start, the_end, the_text) | TextParser.applescript |
return text the_start thru the_end of the_text | TextParser.applescript |
end sub_string | TextParser.applescript |
on occurrences(the_text, match) | TextParser.applescript |
set AppleScript's text item delimiters to match | TextParser.applescript |
set counter to (count of every text item of the_text) - 1 | TextParser.applescript |
end occurrences | TextParser.applescript |
on wrap_text(the_text, the_substitue) | TextParser.applescript |
set the_wrapped_text to "" | TextParser.applescript |
set the_paragraphs to paragraphs of the_text | TextParser.applescript |
set the_len to length of the_paragraphs | TextParser.applescript |
repeat with i from 1 to the_len | TextParser.applescript |
set the_paragraph to item i of the_paragraphs | TextParser.applescript |
if (i = the_len) then | TextParser.applescript |
set the_wrapped_text to the_wrapped_text & the_paragraph --append the paragraph to the text | TextParser.applescript |
set the_wrapped_text to the_wrapped_text & the_paragraph & the_substitue --append the paragraph to the text and the line break replacement | TextParser.applescript |
return the_wrapped_text | TextParser.applescript |
say "I'm going to fuck" | hello copy 4.applescript |
set bookInfo to argv as text | book_project.applescript |
set bookTitle to text items 1 thru -2 of argv as text | book_project.applescript |
set chapterCount to (last text item of argv) as number | book_project.applescript |
set book to make new project with properties {name:bookTitle, sequential:true, context:O's findContext("Book Reading")} | book_project.applescript |
tell book | book_project.applescript |
repeat with chapter from 1 to chapterCount | book_project.applescript |
make task with properties {name:("Read " & bookTitle & ": Chapter " & chapter as text)} | book_project.applescript |
set bookInfo to text returned of (display dialog "What's the title of the book? (include number of chapters at the end)" default answer "") | book_project.applescript |
main(bookInfo) | book_project.applescript |
set folderOrigen to (choose folder with prompt "Selecciona la carpeta a borrar" with multiple selections allowed) | borraCarpetas.scpt |
set rutaFolder to quoted form of POSIX path of folderOrigen | borraCarpetas.scpt |
do shell script "rm -rf" & space & rutaFolder | borraCarpetas.scpt |
display notification with title "Se ha borrado con exito la carpeta" | borraCarpetas.scpt |
set chooseResult to choose from list my listWiFi() | connectToWifi.scpt |
set networkSSID to item 1 of chooseResult | connectToWifi.scpt |
set {text returned:pass} to display dialog "Password of network " & quoted form of networkSSID & ":" default answer "" buttons {"Cancel", "Connect"} cancel button 1 default button 2 with hidden answer | connectToWifi.scpt |
my connectWifi(networkSSID, pass) | connectToWifi.scpt |
my disconnectWiFi() | connectToWifi.scpt |
on listWiFi() | connectToWifi.scpt |
set currentInterface to current application's CWInterface's interface() | connectToWifi.scpt |
currentInterface's setPower:true |error|:(missing value) | connectToWifi.scpt |
set networkSet to currentInterface's scanForNetworksWithName:(missing value) |error|:(missing value) | connectToWifi.scpt |
return ((networkSet's allObjects()'s valueForKeyPath:"[email protected]")'s sortedArrayUsingSelector:"localizedCaseInsensitiveCompare:") as list | connectToWifi.scpt |
end listWiFi | connectToWifi.scpt |
on connectWifi(networkSSID as text, pass as text) | connectToWifi.scpt |
set network to (currentInterface's scanForNetworksWithName:networkSSID |error|:(missing value))'s anyObject() | connectToWifi.scpt |
currentInterface's associateToNetwork:network |password|:pass |error|:(missing value) | connectToWifi.scpt |
end connectWifi | connectToWifi.scpt |
on disconnectWiFi() | connectToWifi.scpt |
current application's CWInterface's interface()'s disassociate() | connectToWifi.scpt |
end disconnectWiFi | connectToWifi.scpt |
python <<EOF | do shell script "python <<EOF.applescript |
from os.path import join, basename,dirname,expanduser | do shell script "python <<EOF.applescript |
from githubmarkdown import temphtml | do shell script "python <<EOF.applescript |
from chrome import chrome | do shell script "python <<EOF.applescript |
path= expanduser(\"~/git/PyMan/README.md\") | do shell script "python <<EOF.applescript |
title=join(basename(dirname(path)), basename(path)) | do shell script "python <<EOF.applescript |
for w in chrome.windows: | do shell script "python <<EOF.applescript |
for t in w.tabs: | do shell script "python <<EOF.applescript |
if t.title==title: | do shell script "python <<EOF.applescript |
t.reload() | do shell script "python <<EOF.applescript |
t.active=True | do shell script "python <<EOF.applescript |
chrome.open(path) | do shell script "python <<EOF.applescript |
property DEF_ALL : false | moveForMon.applescript |
on moveForMon(pars) | moveForMon.applescript |
set all to all of (pars & {all:DEF_ALL}) | moveForMon.applescript |
set w_sfcCEST to 1 | moveForMon.applescript |
set w_sfcJST to 2 | moveForMon.applescript |
set w_XRG to 1 | moveForMon.applescript |
set s_gtCal to "gcalCal" | moveForMon.applescript |
set s_gtGcal to "gcalList" | moveForMon.applescript |
set s_gtTask to "gtasklist" | moveForMon.applescript |
set s_gtPs to "myps" | moveForMon.applescript |
set m_width to 160 | moveForMon.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.