text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set configDefault to std's import("config")'s new("default")
|
logger.applescript
|
set logSubDir to configDefault's getValue("LOG_SUBDIR")
|
logger.applescript
|
if logSubDir is missing value then set logSubDir to "applescript-core:logs:"
|
logger.applescript
|
set logFilePath to (path to home folder as text) & logSubDir & filename
|
logger.applescript
|
set variableListFunderName to {}
|
dynamic_dictionary.applescript
|
repeat while i <= 12
|
dynamic_dictionary.applescript
|
set funderNameDict to current application's NSMutableDictionary's alloc()'s init()
|
dynamic_dictionary.applescript
|
tell funderNameDict
|
dynamic_dictionary.applescript
|
set t to { a: 1, b: 2 }
|
dynamic_dictionary.applescript
|
its setObject: t forKey: "key " & i
|
dynamic_dictionary.applescript
|
set variableListFunderName to variableListFunderName & ""
|
dynamic_dictionary.applescript
|
set item i of variableListFunderName to funderNameDict
|
dynamic_dictionary.applescript
|
log (length of variableListFunderName as text) & " items"
|
dynamic_dictionary.applescript
|
log "------"
|
dynamic_dictionary.applescript
|
repeat while j <= 12
|
dynamic_dictionary.applescript
|
log j
|
dynamic_dictionary.applescript
|
repeat with k in allKeys() of item j of variableListFunderName
|
dynamic_dictionary.applescript
|
set i to item j of variableListFunderName
|
dynamic_dictionary.applescript
|
set v to i's objectForKey:k
|
dynamic_dictionary.applescript
|
log k as text
|
dynamic_dictionary.applescript
|
log { (a of v as text), (b of v as text) }
|
dynamic_dictionary.applescript
|
set selected to the clipboard
|
search_in_spotify.scpt
|
if selected as string is equal to "" then
|
search_in_spotify.scpt
|
display dialog "empty string"
|
search_in_spotify.scpt
|
set selected_encoded to do shell script cmd
|
search_in_spotify.scpt
|
set search_url to prefix & selected_encoded
|
search_in_spotify.scpt
|
log bitwiseAnd(655360, 131072)
|
bitwiseAndOperator.applescript
|
log bitwiseAnd(655360, 524288)
|
bitwiseAndOperator.applescript
|
log bitwiseAnd(655360, 1048576)
|
bitwiseAndOperator.applescript
|
on bitwiseAnd(integer1, integer2)
|
bitwiseAndOperator.applescript
|
set int1 to integer1
|
bitwiseAndOperator.applescript
|
set int2 to integer2
|
bitwiseAndOperator.applescript
|
return (theResult as integer) = integer2
|
bitwiseAndOperator.applescript
|
end bitwiseAnd
|
bitwiseAndOperator.applescript
|
set var1 to every item of (path to desktop)
|
004_01_items_properties.applescript
|
trimWhitespace(" some string ")
|
trimWhitespace.applescript
|
on trimWhitespace(inputString)
|
trimWhitespace.applescript
|
set whiteSpaceAsciiNumbers to {13, 10, 32, 9} -- characters that count as whitespace.
|
trimWhitespace.applescript
|
set textLength to length of inputString
|
trimWhitespace.applescript
|
if textLength is 0 then return ""
|
trimWhitespace.applescript
|
set endSpot to -textLength -- if only whitespace is found, will chop whole string
|
trimWhitespace.applescript
|
repeat while -i is less than or equal to textLength
|
trimWhitespace.applescript
|
set testChar to text i thru i of inputString
|
trimWhitespace.applescript
|
if whiteSpaceAsciiNumbers does not contain (ASCII number testChar) then
|
trimWhitespace.applescript
|
set endSpot to i
|
trimWhitespace.applescript
|
if -endSpot is equal to textLength then
|
trimWhitespace.applescript
|
if whiteSpaceAsciiNumbers contains (ASCII number testChar) then return ""
|
trimWhitespace.applescript
|
set inputString to text 1 thru endSpot of inputString
|
trimWhitespace.applescript
|
set newStart to 1
|
trimWhitespace.applescript
|
repeat while i is less than or equal to textLength
|
trimWhitespace.applescript
|
set newStart to i
|
trimWhitespace.applescript
|
set inputString to text newStart thru textLength of inputString
|
trimWhitespace.applescript
|
return inputString
|
trimWhitespace.applescript
|
open location "https://developer.mozilla.org/ru/search?q=" & argv & "&topic=apps&topic=html&topic=css&topic=js&topic=api&topic=canvas&topic=svg&topic=webgl&topic=mobile&topic=webdev&topic=http&topic=webext"
|
mdn.applescript
|
get properties of last event of calendar "Home"
|
Script 21-12.applescript
|
tell application "Finder" to open home
|
Open home dir.applescript
|
tell application id "com.google.Chrome"
|
BrowserURL&Title.applescript
|
set chromeURL to its URL
|
BrowserURL&Title.applescript
|
set chromeTitle to its title
|
BrowserURL&Title.applescript
|
set theResult to do shell script "
|
crashplan_switch.applescript
|
if sudo launchctl list | grep com.crashplan.engine; then
|
crashplan_switch.applescript
|
sudo launchctl stop com.crashplan.engine && sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist
|
crashplan_switch.applescript
|
sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist && sudo launchctl start com.crashplan.engine
|
crashplan_switch.applescript
|
" with administrator privileges
|
crashplan_switch.applescript
|
set theMessage to "CrashPlan Engine started"
|
crashplan_switch.applescript
|
set theMessage to "CrashPlan Engine stopped"
|
crashplan_switch.applescript
|
display dialog theMessage buttons "OK" with title "CrashPlan Switch" with icon note
|
crashplan_switch.applescript
|
display dialog "Error: " & theError buttons "OK" with icon caution with title "CrashPlan Switch"
|
crashplan_switch.applescript
|
set max_volume to (text returned of (display dialog "Quanto vuoi che sia il massimo del volume? (Massimo 16)" with title "Massimo volume" buttons {"Avanti", "Annulla"} default button 1 default answer "") as number)
|
volume_limit.applescript
|
set plot to 0.4375 # SET VOLUME 1 NOTCH
|
volume_limit.applescript
|
if max_volume ≤ 16 then
|
volume_limit.applescript
|
try # IS VERY IMPORTANT IN THE REPEAT LOOP
|
volume_limit.applescript
|
if ((output volume of (get volume settings) as number > max_volume * 6.25) is true) then # "IS TRUE" ISN'T REQUIRED
|
volume_limit.applescript
|
set volume plot * max_volume
|
volume_limit.applescript
|
display dialog "Il volume inserito supera il limite (" & max_volume & "/16)" with title "Errore" buttons {"Chiudi"} default button 1 with icon stop
|
volume_limit.applescript
|
do shell script "open '/Applications/Xcode.app/Contents/Applications/Accessibility Inspector.app/'"
|
Open Accessibility Inspector.applescript
|
set welcomeMessage to "Hello, World!"
|
hello-world.scpt
|
display dialog welcomeMessage
|
hello-world.scpt
|
set thePath to POSIX path of "Macintosh HD:private:tmp:x"
|
rename-to-parent.applescript
|
set allFolders to folders of folder thePath whose visible is true
|
rename-to-parent.applescript
|
repeat with j from 1 to the count of allFolders
|
rename-to-parent.applescript
|
set allFiles to (files of (item j of allFolders) whose visible is true)
|
rename-to-parent.applescript
|
repeat with i from 1 to the count of allFiles
|
rename-to-parent.applescript
|
set thisFile to item i of allFiles
|
rename-to-parent.applescript
|
set newName to (get name of container of thisFile as text) & "_" & name of thisFile
|
rename-to-parent.applescript
|
set the name of thisFile to newName as string
|
rename-to-parent.applescript
|
fmGUI_Cut()
|
fmGUI_Cut.applescript
|
on fmGUI_Cut()
|
fmGUI_Cut.applescript
|
set cutMenuItem to first menu item of menu 1 of menu bar item "Edit" of menu bar 1 whose name is "Cut"
|
fmGUI_Cut.applescript
|
return fmGUI_ClickMenuItem({menuItemRef:cutMenuItem})
|
fmGUI_Cut.applescript
|
end fmGUI_Cut
|
fmGUI_Cut.applescript
|
sort({"a", "d", "c", "b"})
|
sort copy.applescript
|
on sort(oldList)
|
sort copy.applescript
|
set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ASCII character 10}
|
sort copy.applescript
|
set textBlock to oldList as string
|
sort copy.applescript
|
set sortedBlock to do shell script "echo " & quoted form of textBlock & " | sort"
|
sort copy.applescript
|
set sortedList to every text item of sortedBlock
|
sort copy.applescript
|
windowMove's windowMove(-1, 0)
|
windowMoveLeft.applescript
|
set outStr1 to "Web Proxy has been turned ON"
|
toggle_proxies.scpt
|
set outStr1 to "Web Proxy has been turned OFF"
|
toggle_proxies.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.