text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set beginSelection to "<" & tagStr & ">" & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endSelection to "</" & tagStr & ">" & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set tagStr to "li" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set indentStr to " " | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"select"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set tagStr to "option value=\"\"" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginSelection to "" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endSelection to "" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
if tagStr is in {"[()", "[]()"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to "[](" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endStr to ")" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"[](", "[])", "[]"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to "[" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endStr to "]()" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"- [()", "- []()", "* [()", "* []()"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to characters 1 thru 3 of tagStr & "](" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"- [](", "- [])", "* [](", "* [])"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to characters 1 thru 3 of tagStr & "" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"![()", "![]()"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to "", "![]"} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to "![" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"-", "*", "- ", "* ", "- [ ]", "- [x]", "- [-]", "* [ ]", "* [x]", "* [-]", "- [ ] ", "- [x] ", "- [-] ", "* [ ] ", "* [x] ", "* [-] "} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
if tagStr ends with " " then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to tagStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to tagStr & " " | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endStr to "" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if tagStr is in {"#", "##", "###", "####", "#####", "######", "# ", "## ", "### ", "#### ", "##### ", "###### "} then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endStr to lineEnding & lineEnding & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if (tagStr ends with "." or tagStr ends with ". ") and tagStrAsNumber is not false then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to "#" & tagStrAsNumber & "#" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set beginStr to "<" & tagStr & ">" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set endStr to "</" & my regexReplace(tagStr, "/^([^\\s]+).*/", "$1") & ">" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set len to length of selection of application "BBEdit" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set loc to characterOffset of selection of application "BBEdit" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
if (len = 0) then -- if no text was selected | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
if beginStr begins with "#" and beginStr ends with "#" and tagStrAsNumber is not false then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set newStr to indentStr & tagStrAsNumber & ". " & endStr & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set newStr to indentStr & beginStr & endStr & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
else if (len > 0) then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set curStr to selection of application "BBEdit" as text | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set newStr to "" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set paraStr to paragraphs of curStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
repeat with i from 1 to (count of paraStr) in paraStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set curLine to item i of paraStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
if theButton contains "trimmed" then set curLine to my regexReplace(curLine, "/^\\s*(.*)\\s*$/g", "$1") | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
if curLine is "" and surroundEmptyLines is false then | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set newStr to newStr & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set newStr to newStr & indentStr & i + (tagStrAsNumber - 1) & ". " & curLine & endStr & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set newStr to newStr & indentStr & beginStr & curLine & endStr & lineEnding | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set contents of selection of application "BBEdit" to beginSelection & newStr & endSelection | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
select insertion point after character (loc + (count of indentStr) + (count of beginStr) + (count of beginSelection) - 1) | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
on regexReplace(subjectStr, findRegex, replaceRegex) | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set subjectStr to stringReplace(subjectStr, "\"", "\\\"") | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set jsCmd to "(new String(`" & subjectStr & "`)).replace(" & findRegex & ", '" & replaceRegex & "')" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
return run script jsCmd in "JavaScript" | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
on stringReplace(subjectStr, findStr, replaceStr) | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set orgDelims to text item delimiters of AppleScript | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set text item delimiters of AppleScript to findStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set resultStr to text items of subjectStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set text item delimiters of AppleScript to replaceStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set resultStr to the resultStr as string | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
set text item delimiters of AppleScript to orgDelims | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
return resultStr | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
end stringReplace | Surround%20Lines%20with%20Tags%E2%80%A6.applescript |
tell application "Finder" to set selectedFiles to selection as alias list | Open In Preview.applescript |
open selectedFiles | Open In Preview.applescript |
tell application "Safari" to do JavaScript "[...document.querySelectorAll('#main-header, .site-footer, .box-title, .powers')].map(el => el.remove()); [...document.getElementsByClassName('resizer')].map(l => {l.style.border = 'none'; l.style.boxShadow = 'none';l.style.height='3px'}); [...document.getElementsByClassName(... | codepen-maximize.applescript |
set metadata to (do shell script "echo " & metadata & " | perl -pe 's/\\s+:\\s/: /g'") | Strip PDF metadata w:python.applescript |
global std, textUtil, retry | script-editor.applescript |
set thisCaseId to "scripteditor-spotCheck" | script-editor.applescript |
Manual: File Info (Core Project, Other Project) | script-editor.applescript |
Open file | script-editor.applescript |
Open file with single quote in name | script-editor.applescript |
Manual: E2E: Find Tab With Name, Focus, and Run(Found/Not Found. Open std.applescript) | script-editor.applescript |
Manual: Focus | script-editor.applescript |
set projectPath to configSystem's getValue("AppleScript Core Project Path") | script-editor.applescript |
logger's infof("getScriptLocation: {}", frontTab's getScriptLocation()) | script-editor.applescript |
logger's infof("getScriptName: {}", frontTab's getScriptName()) | script-editor.applescript |
logger's infof("getBaseScriptName: {}", frontTab's getBaseScriptName()) | script-editor.applescript |
logger's infof("getPosixPath: {}", frontTab's getPosixPath()) | script-editor.applescript |
logger's infof("(BROKEN, not possible when there's multiple projects) getResourcePath(): {}", frontTab's getResourcePath()) | script-editor.applescript |
openFile(projectPath & "/examples/hello.applescript") | script-editor.applescript |
openFile(projectPath & "/examples/what's up.applescript") | script-editor.applescript |
logger's infof("Not Found: {}", findTabWithName("Bad Name")) | script-editor.applescript |
set spotTabName to "std.applescript" | script-editor.applescript |
set sutTab to findTabWithName(spotTabName) | script-editor.applescript |
logger's logObj("Found Tab", sutTab) | script-editor.applescript |
sutTab's runScript() | script-editor.applescript |
set sutTab to getFrontTab() | script-editor.applescript |
logger's logObj("Front Tab", sutTab) | script-editor.applescript |
logger's infof("Script Name: {}", sutTab's getScriptName()) | script-editor.applescript |
sutTab's focus() | script-editor.applescript |
script ScriptEditorInstance | script-editor.applescript |
on findTabWithName(theName as text) | script-editor.applescript |
if running of application "Script Editor" is false then return missing value | script-editor.applescript |
if not (window theName exists) then return missing value | script-editor.applescript |
set theWindow to window theName | script-editor.applescript |
return my _new(id of theWindow) | script-editor.applescript |
script FrontTabWaiter | script-editor.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.