text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set res to missing value
|
Outlook2015-2-OmniFocus.scpt
|
set text item delimiters to tofind
|
Outlook2015-2-OmniFocus.scpt
|
repeat with tis in text items of TheString
|
Outlook2015-2-OmniFocus.scpt
|
if res is missing value then
|
Outlook2015-2-OmniFocus.scpt
|
set res to tis
|
Outlook2015-2-OmniFocus.scpt
|
set res to res & toreplace & tis
|
Outlook2015-2-OmniFocus.scpt
|
set text item delimiters to ditd
|
Outlook2015-2-OmniFocus.scpt
|
end findAndReplace
|
Outlook2015-2-OmniFocus.scpt
|
on urlencode(theText)
|
Outlook2015-2-OmniFocus.scpt
|
else if (eachCharNum ≠ 42) and (eachCharNum ≠ 95) and (eachCharNum < 45 or eachCharNum > 46) and (eachCharNum < 48 or eachCharNum > 57) and (eachCharNum < 65 or eachCharNum > 90) and (eachCharNum < 97 or eachCharNum > 122) then
|
Outlook2015-2-OmniFocus.scpt
|
set numHex to ("%" & (firstDig as string) & (secondDig as string)) as string
|
Outlook2015-2-OmniFocus.scpt
|
end urlencode
|
Outlook2015-2-OmniFocus.scpt
|
on write_error_log(this_error)
|
Outlook2015-2-OmniFocus.scpt
|
set the error_log to ((path to desktop) as text) & "Script Error Log.txt"
|
Outlook2015-2-OmniFocus.scpt
|
end write_error_log
|
Outlook2015-2-OmniFocus.scpt
|
set wapp_name to choose file with prompt "What application should I watch?" default location "/Applications"
|
AppWatcher.applescript
|
tell application "Finder" to set {dispName, nameExt, isHidden} to the {displayed name, name extension, extension hidden} of wapp_name
|
AppWatcher.applescript
|
set fwapp_name to baseName
|
AppWatcher.applescript
|
set oapp_name to choose file with prompt "What application should open when " & fwapp_name & " is activated?"
|
AppWatcher.applescript
|
set poapp_name to POSIX path of oapp_name
|
AppWatcher.applescript
|
tell application "Finder" to set {odispName, onameExt, oisHidden} to the {displayed name, name extension, extension hidden} of oapp_name
|
AppWatcher.applescript
|
if oisHidden or onameExt is equal to "" then
|
AppWatcher.applescript
|
odispName
|
AppWatcher.applescript
|
(characters 1 through (-2 - (count of onameExt)) of odispName) as text
|
AppWatcher.applescript
|
set obaseName to result
|
AppWatcher.applescript
|
set foapp_name to obaseName
|
AppWatcher.applescript
|
set process_list to the name of every process whose visible is true
|
AppWatcher.applescript
|
if process_list contains fwapp_name then
|
AppWatcher.applescript
|
open oapp_name
|
AppWatcher.applescript
|
system version of (get system info)
|
system version of (get system info).applescript
|
display dialog "There are no open Finder windows." with icon caution buttons {"OK"} with title "Open Terminal Here..."
|
Terminal.applescript
|
display dialog "The location of the Finder window \"" & theName & "\" is not a real location (e.g. smart folder, search, network, trash, etc) and cannot opened in Terminal." with icon caution buttons {"OK"} with title "Open Terminal Here..."
|
Terminal.applescript
|
tell application process "Terminal"
|
Terminal.applescript
|
keystroke "t" using command down
|
Terminal.applescript
|
set msg to "Error: " & errMsg & "
|
Terminal.applescript
|
This probably means that you're using Mojave and you will need to add this app to the \"Accessibility\" section in the \"Privacy\" tab of the \"Security & Privacy\" System Preferences.
|
Terminal.applescript
|
Please see the \"Mojave\" section of the README for more details"
|
Terminal.applescript
|
display dialog msg buttons {"OK"} with icon caution with title "Open Terminal Here..."
|
Terminal.applescript
|
do script "cd " & thePath & " && clear" in last tab of front window
|
Terminal.applescript
|
do script "cd " & thePath & " && clear"
|
Terminal.applescript
|
keystroke "EAT"
|
f4.applescript
|
on readFile( unixPath )
|
launch.scpt
|
return (do shell script "cat '" & unixPath & "'")
|
launch.scpt
|
on getSess(sessions_, names, name)
|
launch.scpt
|
repeat with i from 1 to count of names
|
launch.scpt
|
repeat with j from 1 to count of (item i of names)
|
launch.scpt
|
if item j of (item i of names) equals name
|
launch.scpt
|
return item j of (item i of sessions_)
|
launch.scpt
|
display dialog("fail.")
|
launch.scpt
|
tell application "iTerm2"
|
launch.scpt
|
set my_path to POSIX path of ((path to me as text) & "::")
|
launch.scpt
|
set f to (choose file of type "cfg" default location POSIX file my_path)
|
launch.scpt
|
set cfg_txt to my readFile(POSIX path of f)
|
launch.scpt
|
set cfg_list to every paragraph of cfg_txt
|
launch.scpt
|
set layout to {}
|
launch.scpt
|
set vars to {}
|
launch.scpt
|
set cmds to {}
|
launch.scpt
|
set mode to "LAYOUT"
|
launch.scpt
|
repeat with cfg_line in cfg_list
|
launch.scpt
|
if (cfg_line as string ) is equal to "--"
|
launch.scpt
|
if mode is "LAYOUT"
|
launch.scpt
|
set mode to "VARS"
|
launch.scpt
|
else if mode is "VARS"
|
launch.scpt
|
set mode to "CODE"
|
launch.scpt
|
set split_layout to every word of cfg_line
|
launch.scpt
|
copy split_layout to end of layout
|
launch.scpt
|
if mode is "VARS"
|
launch.scpt
|
if (text item 1 of (cfg_line as string)) is equal to "$"
|
launch.scpt
|
set passwd to text returned of (display dialog cfg_line default answer "" with hidden answer)
|
launch.scpt
|
set vars to vars & {passwd}
|
launch.scpt
|
else if (text item 1 of (cfg_line as string)) is "&"
|
launch.scpt
|
set var to text returned of (display dialog cfg_line default answer "")
|
launch.scpt
|
set vars to vars & {var}
|
launch.scpt
|
set vars to vars & {cfg_line}
|
launch.scpt
|
if mode is "CODE"
|
launch.scpt
|
set cmds to cmds & {cfg_line's text items}
|
launch.scpt
|
set names to {}
|
launch.scpt
|
set sessions_ to {}
|
launch.scpt
|
set r_i to 1
|
launch.scpt
|
repeat with row in layout
|
launch.scpt
|
set names to names & {{}}
|
launch.scpt
|
set sessions_ to sessions_ & {{}}
|
launch.scpt
|
set curr_ses to (session i of current tab of current window)
|
launch.scpt
|
set (item r_i of names) to (item r_i of names) & { item 1 of row }
|
launch.scpt
|
set (item r_i of sessions_) to (item r_i of sessions_) & {curr_ses}
|
launch.scpt
|
if i does not equal count of layout
|
launch.scpt
|
tell curr_ses
|
launch.scpt
|
split horizontally with same profile
|
launch.scpt
|
select
|
launch.scpt
|
set name to item 1 of row
|
launch.scpt
|
set r_i to r_i + 1
|
launch.scpt
|
repeat with row_ in layout
|
launch.scpt
|
set c_i to 1
|
launch.scpt
|
repeat with col in row_
|
launch.scpt
|
set curr_ses to (item c_i of (item r_i of sessions_))
|
launch.scpt
|
set name to item c_i of (item r_i of layout)
|
launch.scpt
|
if c_i does not equal count of row_
|
launch.scpt
|
split vertically with same profile
|
launch.scpt
|
set next_ses to 0
|
launch.scpt
|
repeat while next_ses = 0
|
launch.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.