text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set i to "zip" | thingiverse zip download.applescript |
set the end of newURL to i as string | thingiverse zip download.applescript |
set the end of newURL to i & "/" as string | thingiverse zip download.applescript |
set newURL to newURL as string | thingiverse zip download.applescript |
if defaultBrowser is "Google Chrome" then | thingiverse zip download.applescript |
open location newURL | thingiverse zip download.applescript |
else if defaultBrowser is "Safari" then | thingiverse zip download.applescript |
set URL of (make new tab) to newURL | thingiverse zip download.applescript |
set current tab to last tab | thingiverse zip download.applescript |
close current tab | thingiverse zip download.applescript |
else if defaultBrowser is "Firefox" then | thingiverse zip download.applescript |
property theList : {"doc", "docx"} | Convert-doc-to-pdf.applescript |
tell application "Microsoft Word" to set theOldDefaultPath to get default file path file path type documents path | Convert-doc-to-pdf.applescript |
set theDoc to contents of x | Convert-doc-to-pdf.applescript |
set theFilePath to container of theDoc as text | Convert-doc-to-pdf.applescript |
set ext to name extension of theDoc | Convert-doc-to-pdf.applescript |
if ext is in theList then | Convert-doc-to-pdf.applescript |
set theName to name of theDoc | Convert-doc-to-pdf.applescript |
copy length of theName to l | Convert-doc-to-pdf.applescript |
copy length of ext to exl | Convert-doc-to-pdf.applescript |
set n to l - exl - 1 | Convert-doc-to-pdf.applescript |
copy characters 1 through n of theName as string to theFilename | Convert-doc-to-pdf.applescript |
set theFilename to theFilename & ".pdf" | Convert-doc-to-pdf.applescript |
set default file path file path type documents path path theFilePath | Convert-doc-to-pdf.applescript |
open theDoc | Convert-doc-to-pdf.applescript |
set theActiveDoc to the active document | Convert-doc-to-pdf.applescript |
save as theActiveDoc file format format PDF file name theFilename | Convert-doc-to-pdf.applescript |
copy (POSIX path of (theFilePath & theFilename as string)) to end of output | Convert-doc-to-pdf.applescript |
close theActiveDoc | Convert-doc-to-pdf.applescript |
tell application "Microsoft Word" to set default file path file path type documents path path theOldDefaultPath | Convert-doc-to-pdf.applescript |
display dialog "Which simulator do you wish to launch?" buttons {"Cancel", "iPad", "iPhone"} default button 3 with icon path to resource "com.apple.iphone-4-black.icns" in bundle "/System/Library/CoreServices/CoreTypes.bundle" | launchiOS.scpt |
if result = {button returned:"iPhone"} then | launchiOS.scpt |
do shell script "/usr/local/bin/ios-sim start --devicetypeid 'com.apple.CoreSimulator.SimDeviceType.iPhone-5, 8.1'" | launchiOS.scpt |
else if result = {button returned:"iPad"} then | launchiOS.scpt |
do shell script "/usr/local/bin/ios-sim start --devicetypeid 'com.apple.CoreSimulator.SimDeviceType.iPad-Retina, 8.1'" | launchiOS.scpt |
click (menu item "Instapaper") of (menu "Bookmarks") of menu bar 1 | Instapaper.applescript |
ps -xc|grep -sq Chrome && osascript <<'APPLESCRIPT' | gistfile1-2 copy 5.applescript |
tell app "System Events" | gistfile1-2 copy 5.applescript |
set isVisible to visible of process "Google Chrome" | gistfile1-2 copy 5.applescript |
tell app "Google Chrome" | gistfile1-2 copy 5.applescript |
if isVisible then | gistfile1-2 copy 5.applescript |
tell active tab of first window | gistfile1-2 copy 5.applescript |
execute javascript | gistfile1-2 copy 5.applescript |
"if(window.location.hostname.indexOf('.dev')!=-1||window.location.href.indexOf('file://')!=-1){window.location.reload()}" | gistfile1-2 copy 5.applescript |
APPLESCRIPT | gistfile1-2 copy 5.applescript |
set lxDeviceID to 1 -- Device ID of lighting console | Convert Eos OSC cues to MSC.applescript |
set commandFormat to 1 -- Lighting (general) | Convert Eos OSC cues to MSC.applescript |
set commandNumber to 1 -- GO | Convert Eos OSC cues to MSC.applescript |
set selectedOSC to {} | Convert Eos OSC cues to MSC.applescript |
set end of selectedOSC to eachCue | Convert Eos OSC cues to MSC.applescript |
repeat with eachCue in selectedOSC | Convert Eos OSC cues to MSC.applescript |
set selected to eachCue -- select OSC cue | Convert Eos OSC cues to MSC.applescript |
set oscCommand to custom message of eachCue -- get OSC command | Convert Eos OSC cues to MSC.applescript |
set oscList to util's splitString(oscCommand, "/") -- get list version | Convert Eos OSC cues to MSC.applescript |
if item 2 of oscList is "eos" and item -1 of oscList is "fire" then | Convert Eos OSC cues to MSC.applescript |
make type "MIDI" -- make midi cue | Convert Eos OSC cues to MSC.applescript |
set newCue to last item of (selected as list) -- give midi cue a variable | Convert Eos OSC cues to MSC.applescript |
set message type of newCue to msc -- make midi cue an MSC cue | Convert Eos OSC cues to MSC.applescript |
if (count of oscList) is 6 then -- > IF THE OSC CUE INCLUDES A CUE LIST | Convert Eos OSC cues to MSC.applescript |
set cueList to item 4 of oscList -- get cue list no. | Convert Eos OSC cues to MSC.applescript |
set cueNumber to item 5 of oscList -- get cue number | Convert Eos OSC cues to MSC.applescript |
else if (count of oscList) is 5 then -- > IF THE OSC CUE DOESN'T INCLUDE A CUE LIST | Convert Eos OSC cues to MSC.applescript |
set cueNumber to item 4 of oscList -- get cue number | Convert Eos OSC cues to MSC.applescript |
set cueList to "" -- leave cue list no. blank | Convert Eos OSC cues to MSC.applescript |
else -- > IF THE OSC CUE IS NOT CORRECTLY FORMATTED FOR THIS SCRIPT | Convert Eos OSC cues to MSC.applescript |
set q name of newCue to "ERROR - OSC message incorrect" | Convert Eos OSC cues to MSC.applescript |
set q color of newCue to "red" | Convert Eos OSC cues to MSC.applescript |
set command format of newCue to commandFormat -- set type to Lighting General | Convert Eos OSC cues to MSC.applescript |
set command number of newCue to commandNumber -- set go | Convert Eos OSC cues to MSC.applescript |
set deviceID of newCue to lxDeviceID -- set MSC device ID | Convert Eos OSC cues to MSC.applescript |
set q_number of newCue to cueNumber -- set cue number | Convert Eos OSC cues to MSC.applescript |
set q_list of newCue to cueList -- set cue list | Convert Eos OSC cues to MSC.applescript |
set q name of newCue to "MSC: " & (q display name of eachCue) | Convert Eos OSC cues to MSC.applescript |
delete cue id (uniqueID of eachCue) of parent of eachCue | Convert Eos OSC cues to MSC.applescript |
display dialog "Eject all disks?" | 1 eject all disks.scpt |
eject (every disk whose ejectable is true and local volume is true and format is not unknown format and owner is not "system") | 1 eject all disks.scpt |
beep 2 -- to indicate it was successful | 1 eject all disks.scpt |
display dialog "Unable to eject all disks." buttons {"Close"} default button "Close" | 1 eject all disks.scpt |
try | Script 15-7.applescript |
duplicate file source_file_path to folder dest_folder_path | Script 15-7.applescript |
on error number –10006 | Script 15-7.applescript |
display dialog "The file or folder you specify doesn't exist." | Script 15-7.applescript |
on error number –15267 | Script 15-7.applescript |
display dialog "The folder already has a file with the same name." | Script 15-7.applescript |
on error error_message -- Report any other errors | Script 15-7.applescript |
display dialog "An error has occurred:" & return & error_message | Script 15-7.applescript |
set a to 2 | simulator-screenshots.applescript |
set b to 5 | simulator-screenshots.applescript |
property simulator : "Simulator" --"SimulatorTrampoline.xpc" //recommend using Simulator | simulator-screenshots.applescript |
on t(d) | simulator-screenshots.applescript |
delay d | simulator-screenshots.applescript |
if application simulator is frontmost then | simulator-screenshots.applescript |
keystroke "s" using command down | simulator-screenshots.applescript |
end t | simulator-screenshots.applescript |
on s(a, b) | simulator-screenshots.applescript |
t(a) | simulator-screenshots.applescript |
t(b) | simulator-screenshots.applescript |
end s | simulator-screenshots.applescript |
s(a, b) | simulator-screenshots.applescript |
script TestScript | TestScript.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.