text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set the app_path to (POSIX path of the application_to_modify)
|
quit-open.applescript
|
set the app_info_path to ((POSIX path of the application_to_modify) & "Contents/Info")
|
quit-open.applescript
|
set the plist_filepath to the quoted form of the app_info_path
|
quit-open.applescript
|
set osver to system version of (system info)
|
quit-open.applescript
|
do shell script "ditto -c -k --sequesterRsrc --keepParent " & app_path & space & app_path & ".quit-open.zip" with administrator privileges
|
quit-open.applescript
|
do shell script "defaults write " & app_info_path & space & "NSAppleScriptEnabled -bool YES" with administrator privileges
|
quit-open.applescript
|
do shell script "chmod a+r" & space & app_info_path & ".plist" with administrator privileges
|
quit-open.applescript
|
if osver ≥ "10.7" then
|
quit-open.applescript
|
if osver ≥ "10.8" then
|
quit-open.applescript
|
do shell script "sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate /usr/bin" with administrator privileges
|
quit-open.applescript
|
do shell script "codesign -f -s - " & app_path with administrator privileges
|
quit-open.applescript
|
on error message number errorNumber
|
quit-open.applescript
|
if message is not equal to "ln: /usr/bin/codesign_allocate: File exists" then
|
quit-open.applescript
|
display dialog "Problem with enabling AppleScript for " & theApplication & ": " & message & " -- Error number: " & errorNumber
|
quit-open.applescript
|
end enableAppleScripting
|
quit-open.applescript
|
set f to (make new file at desktop) as alias
|
set the name of alias.applescript
|
set the name of f to "webloc"
|
set the name of alias.applescript
|
delete file f
|
set the name of alias.applescript
|
property appName : "Ableton Live 10 Suite"
|
midipipe.applescript
|
property noteOnStatus : 144
|
midipipe.applescript
|
property minVelocity : 1
|
midipipe.applescript
|
property nudgeMinus : 100
|
midipipe.applescript
|
property nudgePlus : 101
|
midipipe.applescript
|
on runme(message)
|
midipipe.applescript
|
if ((item 1 of message = noteOnStatus) and ¬
|
midipipe.applescript
|
(item 2 of message = nudgeMinus) and ¬
|
midipipe.applescript
|
(item 3 of message ≥ minVelocity)) then
|
midipipe.applescript
|
keystroke "z" using command down
|
midipipe.applescript
|
(item 2 of message = nudgePlus) and ¬
|
midipipe.applescript
|
keystroke "z" using {shift down, command down}
|
midipipe.applescript
|
end runme
|
midipipe.applescript
|
set testRecord to {b:"bbb", c:"ccc", |0|:"zero", a:"aaa", |null|:"null"}
|
Enumerate%20keys%20using%20Foundation.applescript
|
set objCDictionary to current application's NSDictionary's dictionaryWithDictionary:testRecord
|
Enumerate%20keys%20using%20Foundation.applescript
|
log theKey as text
|
Enumerate%20keys%20using%20Foundation.applescript
|
if input is not in {{}, {""}, ""} then
|
after-update.applescript
|
set result to display dialog input as string buttons {"Retry", "Cancel"} with title "LDAPパスワード更新失敗 (30秒後に自動でリトライします)" default button {"Retry"} giving up after 30
|
after-update.applescript
|
if (button returned of result) = "Cancel" then quit me
|
after-update.applescript
|
quet me
|
after-update.applescript
|
property cliclick : "/Applications/cliclick"
|
launchpad-for-maschine.applescript
|
property firstx : 356 # 'x' where patterns start in Maschine
|
launchpad-for-maschine.applescript
|
property firstx_no_browser : 30 # with instrument browser closed
|
launchpad-for-maschine.applescript
|
property firsty : 80 # 'y' where patterns start in Maschine
|
launchpad-for-maschine.applescript
|
property dx : 99 # width of pattern slots in Maschine
|
launchpad-for-maschine.applescript
|
property dy : 22 # height of pattern slots in Maschine
|
launchpad-for-maschine.applescript
|
property active : 3 # LaunchPad intentisty to use for active patterns
|
launchpad-for-maschine.applescript
|
property inactive : 1 # LaunchPad intentisty to use for inactive patterns
|
launchpad-for-maschine.applescript
|
property session_pad : false # state of 'session' pad on LaunchPad – false until pressed
|
launchpad-for-maschine.applescript
|
property drums_pad : false # state of 'drums' pad on LaunchPad – false until pressed
|
launchpad-for-maschine.applescript
|
property keys_pad : false # state of 'keys' pad on LaunchPad – false until pressed
|
launchpad-for-maschine.applescript
|
property user_pad : false # state of 'user' pad on LaunchPad – false until pressed
|
launchpad-for-maschine.applescript
|
property maschine_app : false
|
launchpad-for-maschine.applescript
|
property maschine_plug : 0
|
launchpad-for-maschine.applescript
|
property maschine_plug_options : {"Live", "Logic Pro X"}
|
launchpad-for-maschine.applescript
|
property grayscale : false
|
launchpad-for-maschine.applescript
|
property gray_inactive : 103 # LP color used for inactive state in grayscale mode
|
launchpad-for-maschine.applescript
|
property padNumbers : {{81, 82, 83, 84, 85, 86, 87, 88}, {71, 72, 73, 74, 75, 76, 77, 78}, {61, 62, 63, 64, 65, 66, 67, 68}, {51, 52, 53, 54, 55, 56, 57, 58}, {41, 42, 43, 44, 45, 46, 47, 48}, {31, 32, 33, 34, 35, 36, 37, 38}, {21, 22, 23, 24, 25, 26, 27, 28}, {11, 12, 13, 14, 15, 16, 17, 18}}
|
launchpad-for-maschine.applescript
|
property ctrlButtons : {91, 92, 93, 94, 95, 96, 97, 98}
|
launchpad-for-maschine.applescript
|
property active_scene : 0
|
launchpad-for-maschine.applescript
|
property s2_exists : 0
|
launchpad-for-maschine.applescript
|
property selected_pattern : {0, 0}
|
launchpad-for-maschine.applescript
|
property mas_pattern_colors : {{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}}
|
launchpad-for-maschine.applescript
|
property maschine_x : -1
|
launchpad-for-maschine.applescript
|
property maschine_y : -1
|
launchpad-for-maschine.applescript
|
property maschine_sizex : -1
|
launchpad-for-maschine.applescript
|
property maschine_sizey : -1
|
launchpad-for-maschine.applescript
|
property paddingx : 0
|
launchpad-for-maschine.applescript
|
property paddingy : 0
|
launchpad-for-maschine.applescript
|
property browser_on : true # status of instrument browser – checked automatically
|
launchpad-for-maschine.applescript
|
property lasttime : 0
|
launchpad-for-maschine.applescript
|
on sinceLastTime(update)
|
launchpad-for-maschine.applescript
|
set now to current application's class "NSDate"'s |date|()
|
launchpad-for-maschine.applescript
|
set dateFormatter to current application's class "NSDateFormatter"'s new()
|
launchpad-for-maschine.applescript
|
tell dateFormatter to setDateFormat:("HH mm ss SSS")
|
launchpad-for-maschine.applescript
|
set timeStamp to (dateFormatter's stringFromDate:(now)) as text
|
launchpad-for-maschine.applescript
|
set x to word 4 of timeStamp
|
launchpad-for-maschine.applescript
|
set x to x + (word 3 of timeStamp) * 1000
|
launchpad-for-maschine.applescript
|
set x to x + (word 2 of timeStamp) * 1000 * 60
|
launchpad-for-maschine.applescript
|
set x to x + (word 1 of timeStamp) * 1000 * 60 * 60
|
launchpad-for-maschine.applescript
|
set dif to x - lasttime
|
launchpad-for-maschine.applescript
|
if update then set lasttime to x
|
launchpad-for-maschine.applescript
|
return dif
|
launchpad-for-maschine.applescript
|
end sinceLastTime
|
launchpad-for-maschine.applescript
|
on screenGrab(x, y, sizex, sizey)
|
launchpad-for-maschine.applescript
|
if maschine_app or (maschine_plug > 0) then
|
launchpad-for-maschine.applescript
|
if maschine_app then activate application "Maschine 2"
|
launchpad-for-maschine.applescript
|
set x to x + maschine_x - 1
|
launchpad-for-maschine.applescript
|
set y to y + maschine_y - 1
|
launchpad-for-maschine.applescript
|
set output to do shell script "screencapture -x -R" & x & "," & y & "," & sizex & "," & sizey & " -t bmp $TMPDIR/maschineLP.bmp"
|
launchpad-for-maschine.applescript
|
end screenGrab
|
launchpad-for-maschine.applescript
|
on pixelStream(x, y, sizex, sizey, options)
|
launchpad-for-maschine.applescript
|
set output to do shell script "od -An -t dI -j 10 -N 32 -v $TMPDIR/maschineLP.bmp"
|
launchpad-for-maschine.applescript
|
set bmp_offset to (word 1 of output) as integer
|
launchpad-for-maschine.applescript
|
set bmp_width to (word 3 of output) as integer
|
launchpad-for-maschine.applescript
|
set bmp_height to (word 4 of output) as integer
|
launchpad-for-maschine.applescript
|
if (bmp_width < (x + sizex - 1)) or (bmp_height < (y + sizey - 1)) then return ""
|
launchpad-for-maschine.applescript
|
set dpi to word 8 of output
|
launchpad-for-maschine.applescript
|
if dpi = "5669" then
|
launchpad-for-maschine.applescript
|
set pixel_size to 2
|
launchpad-for-maschine.applescript
|
set awk_filter_retina to " | awk '{print $2, $4}'" # grab every second pixel
|
launchpad-for-maschine.applescript
|
set pixel_size to 1
|
launchpad-for-maschine.applescript
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.