text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set destFolder to destFolder & "/" | Get Parent Folder Of Selection.applescript |
if (count of terminals) = 0 then | iterm copy.txt |
set _terminal to (make new terminal) | iterm copy.txt |
set _terminal to current terminal | iterm copy.txt |
tell _terminal | iterm copy.txt |
write text "" & argv | iterm copy.txt |
delay 0.02 | iterm copy.txt |
tell application "MacVim" | iterm copy.txt |
set file_name to "untitled" | Untitled.applescript |
set file_ext to ".txt" | Untitled.applescript |
set is_desktop to false | Untitled.applescript |
set this_folder to (folder of the front Finder window) as alias | Untitled.applescript |
set this_folder to path to desktop folder as alias | Untitled.applescript |
set is_desktop to true | Untitled.applescript |
set file_list to get the name of every disk item of this_folder | Untitled.applescript |
set new_file to file_name & file_ext | Untitled.applescript |
set x to 1 | Untitled.applescript |
if new_file is in file_list then | Untitled.applescript |
set new_file to file_name & " " & x & file_ext | Untitled.applescript |
set the_file to make new file at folder this_folder with properties {name:new_file} | Untitled.applescript |
if is_desktop is false then | Untitled.applescript |
reveal the_file | Untitled.applescript |
select window of desktop | Untitled.applescript |
set selection to the_file | Untitled.applescript |
set json to (do shell script "curl https://coinbase.com/api/v1/prices/spot_rate") | Get Bitcoin Price.applescript |
set result to read JSON from json | Get Bitcoin Price.applescript |
set price to amount of result as number | Get Bitcoin Price.applescript |
set result_string to "Current Coinbase Bitcoin price " & price & " USD." | Get Bitcoin Price.applescript |
property testFirstPaneStuff : "This is from the first pane." | QS_Action_Template.applescript |
property testThirdPaneStuff : "This is from the third pane." | QS_Action_Template.applescript |
on process_text(firstPaneStuff, thirdPaneStuff) | QS_Action_Template.applescript |
display notification firstPaneStuff | QS_Action_Template.applescript |
display notification thirdPaneStuff | QS_Action_Template.applescript |
return firstPaneStuff & " " & thirdPaneStuff | QS_Action_Template.applescript |
end process_text | QS_Action_Template.applescript |
using terms from application "Quicksilver" | QS_Action_Template.applescript |
on get direct types | QS_Action_Template.applescript |
return {"NSStringPboardType"} | QS_Action_Template.applescript |
end get direct types | QS_Action_Template.applescript |
on get indirect types | QS_Action_Template.applescript |
return {"NSFilenamesPboardType"} | QS_Action_Template.applescript |
end get indirect types | QS_Action_Template.applescript |
on process text firstPaneStuff with thirdPaneStuff | QS_Action_Template.applescript |
set returned to process_text(firstPaneStuff, thirdPaneStuff) | QS_Action_Template.applescript |
tell application "Quicksilver" to set selection to returned | QS_Action_Template.applescript |
on error a number b | QS_Action_Template.applescript |
display dialog a with title "error with your QS action script" | QS_Action_Template.applescript |
end process text | QS_Action_Template.applescript |
on get argument count | QS_Action_Template.applescript |
return 2 | QS_Action_Template.applescript |
end get argument count | QS_Action_Template.applescript |
set returned to process_text(testFirstPaneStuff, testThirdPaneStuff) | QS_Action_Template.applescript |
on isLink(linkText) | MarkdownLib.applescript |
return linkText begins with "http:" or ¬ | MarkdownLib.applescript |
linkText begins with "https:" or ¬ | MarkdownLib.applescript |
linkText begins with "ftp:" or ¬ | MarkdownLib.applescript |
linkText ends with ".com" | MarkdownLib.applescript |
end isLink | MarkdownLib.applescript |
on isEmail(emailText) | MarkdownLib.applescript |
return emailText contains "@" and emailText ends with ".com" | MarkdownLib.applescript |
end isEmail | MarkdownLib.applescript |
on isBoldFont(fontName) | MarkdownLib.applescript |
return fontName contains "Bold" | MarkdownLib.applescript |
end isBoldFont | MarkdownLib.applescript |
on isItalicFont(fontName) | MarkdownLib.applescript |
return fontName contains "Italic" | MarkdownLib.applescript |
end isItalicFont | MarkdownLib.applescript |
on richTextToMarkdown(cellRef) | MarkdownLib.applescript |
local markdownText, inBold, inItalic, rowText | MarkdownLib.applescript |
set markdownText to "" | MarkdownLib.applescript |
set inBold to false | MarkdownLib.applescript |
set inItalic to false | MarkdownLib.applescript |
set rowText to {} -- use an array because its a bit faster | MarkdownLib.applescript |
using terms from application "TextEdit" | MarkdownLib.applescript |
repeat with anAttribute in attribute runs of cellRef | MarkdownLib.applescript |
set {runText, runIsBold, runIsItalic} to ¬ | MarkdownLib.applescript |
{contents of anAttribute, my isBoldFont(font of anAttribute), my isItalicFont(font of anAttribute)} | MarkdownLib.applescript |
if inBold and not runIsBold then | MarkdownLib.applescript |
set end of rowText to "**" | MarkdownLib.applescript |
if inItalic and not runIsItalic then | MarkdownLib.applescript |
set end of rowText to "*" | MarkdownLib.applescript |
if not inBold and runIsBold then | MarkdownLib.applescript |
set inBold to true | MarkdownLib.applescript |
if not inItalic and runIsItalic then | MarkdownLib.applescript |
set inItalic to true | MarkdownLib.applescript |
if my isEmail(runText) then | MarkdownLib.applescript |
set end of rowText to "[" & runText & "](mailto:" & runText & ")" | MarkdownLib.applescript |
else if my isLink(runText) then | MarkdownLib.applescript |
set end of rowText to "[" & runText & "](" & runText & ")" | MarkdownLib.applescript |
set end of rowText to runText | MarkdownLib.applescript |
if inBold then | MarkdownLib.applescript |
if inItalic then | MarkdownLib.applescript |
set markdownText to rowText as text | MarkdownLib.applescript |
return markdownText | MarkdownLib.applescript |
end richTextToMarkdown | MarkdownLib.applescript |
fmGUI_Database_DbNameOfFrontWindow({}) | fmGUI_Database_DbNameOfFrontWindow.applescript |
on fmGUI_Database_DbNameOfFrontWindow(prefs) | fmGUI_Database_DbNameOfFrontWindow.applescript |
fmGUI_ALL_Utilities_Close() | fmGUI_Database_DbNameOfFrontWindow.applescript |
return dbNameOfWindowName("") | fmGUI_Database_DbNameOfFrontWindow.applescript |
error "Couldn't get fmGUI_Database_DbNameOfFrontWindow - " & errMsg number errNum | fmGUI_Database_DbNameOfFrontWindow.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.