text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
delete tabItr | Contest%20Entry%20Script%20v2.scpt |
key code 124 -- activate Excel and move right one cell and down one cell | Contest%20Entry%20Script%20v2.scpt |
set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list | Batch%20File%20Rename.scpt |
display dialog "New file name:" default answer "" | Batch%20File%20Rename.scpt |
set new_name to text returned of result | Batch%20File%20Rename.scpt |
repeat with index from 1 to the count of all_files | Batch%20File%20Rename.scpt |
set this_file to item index of all_files | Batch%20File%20Rename.scpt |
set {itemName, itemExtension} to {name, name extension} of this_file | Batch%20File%20Rename.scpt |
if index is less than 10 then | Batch%20File%20Rename.scpt |
set index_prefix to "0" | Batch%20File%20Rename.scpt |
set index_prefix to "" | Batch%20File%20Rename.scpt |
if itemExtension is "" then | Batch%20File%20Rename.scpt |
set file_extension to "." & itemExtension | Batch%20File%20Rename.scpt |
set the name of this_file to new_name & index_prefix & index & file_extension as string | Batch%20File%20Rename.scpt |
display alert "All done! Renamed " & index & " files with '" & new_name & "' for you. Have a great day! :)" | Batch%20File%20Rename.scpt |
set destinationFolder to "/Users/dhammy0110/GDrive/receipts_biz/" -- where to save the files | EyeFiDoxieScript.scpt |
set myApp to "Doxie" -- the app to call (in case of version name changes) | EyeFiDoxieScript.scpt |
set fName to "/Users/dhammy0110/Pictures/Doxie Eye-Fi/" -- watch folder path that the script is attached to | EyeFiDoxieScript.scpt |
if folderReady(fName) then | EyeFiDoxieScript.scpt |
runMyApp(myApp, destinationFolder) | EyeFiDoxieScript.scpt |
on folderReady(fName) | EyeFiDoxieScript.scpt |
set startSize to size of (info for fName) --get current folder size | EyeFiDoxieScript.scpt |
set newSize to size of (info for fName) | EyeFiDoxieScript.scpt |
repeat until startSize is equal to newSize --loop until equal | EyeFiDoxieScript.scpt |
set startSize to newSize --reset current size | EyeFiDoxieScript.scpt |
end folderReady | EyeFiDoxieScript.scpt |
on runMyApp(myApp, destinationFolder) | EyeFiDoxieScript.scpt |
activate application myApp | EyeFiDoxieScript.scpt |
set exitloop to 0 | EyeFiDoxieScript.scpt |
tell application "System Events" to tell process myApp | EyeFiDoxieScript.scpt |
repeat while exists sheet "Doxie Import" of window myApp | EyeFiDoxieScript.scpt |
set exitloop to exitloop + 1 | EyeFiDoxieScript.scpt |
log "import timer exitloop = " & (exitloop) | EyeFiDoxieScript.scpt |
if exitloop ≥ 1500 then | EyeFiDoxieScript.scpt |
log "import stuck timeout" | EyeFiDoxieScript.scpt |
repeat until frontmost is true | EyeFiDoxieScript.scpt |
repeat until exists sheet 1 of window myApp | EyeFiDoxieScript.scpt |
log "waiting for save window to appear, exitloop = " & (exitloop) | EyeFiDoxieScript.scpt |
if exitloop ≥ 50 then | EyeFiDoxieScript.scpt |
log "timeout - save function not available" | EyeFiDoxieScript.scpt |
tell window myApp | EyeFiDoxieScript.scpt |
repeat until exists sheet 0 | EyeFiDoxieScript.scpt |
log "open finder folder exitloop = " & (exitloop) | EyeFiDoxieScript.scpt |
log "timeout - open finder folder" | EyeFiDoxieScript.scpt |
set value of text field of sheet 1 to destinationFolder | EyeFiDoxieScript.scpt |
click button "Go" of sheet 1 | EyeFiDoxieScript.scpt |
repeat while exists sheet 1 | EyeFiDoxieScript.scpt |
log "close finder folder timeout" | EyeFiDoxieScript.scpt |
if exists (button "Choose" of sheet 1) then | EyeFiDoxieScript.scpt |
click button "Choose" of sheet 1 | EyeFiDoxieScript.scpt |
else if exists (button "Save" of sheet 1) then | EyeFiDoxieScript.scpt |
click button "Save" of sheet 1 | EyeFiDoxieScript.scpt |
if exists (button "Replace" of sheet 1 of sheet 1) then | EyeFiDoxieScript.scpt |
log "replace dialog open - need user input" | EyeFiDoxieScript.scpt |
return -- bail out and let the user choose what to do | EyeFiDoxieScript.scpt |
repeat while exists sheet "Saving Scans..." | EyeFiDoxieScript.scpt |
log "save function running, exitloop = " & exitloop | EyeFiDoxieScript.scpt |
log "save function timeout" | EyeFiDoxieScript.scpt |
keystroke "q" using {command down} | EyeFiDoxieScript.scpt |
repeat until exists button "Delete" of sheet 1 of window myApp | EyeFiDoxieScript.scpt |
log "waiting for quit & delete options dialog" | EyeFiDoxieScript.scpt |
log "quit function timeout" | EyeFiDoxieScript.scpt |
click button "Delete" of sheet 1 of window myApp | EyeFiDoxieScript.scpt |
end runMyApp | EyeFiDoxieScript.scpt |
set q to item 1 of argv | auto-switch-appleid-in-alfred.appleScript |
if lang is equal to "zh_CN" | auto-switch-appleid-in-alfred.appleScript |
if q is equal to "zh" then | auto-switch-appleid-in-alfred.appleScript |
set account to "your apple account 1" | auto-switch-appleid-in-alfred.appleScript |
set pwd to "xxx" | auto-switch-appleid-in-alfred.appleScript |
if q is equal to "us" then | auto-switch-appleid-in-alfred.appleScript |
set account to "your another account" | auto-switch-appleid-in-alfred.appleScript |
set pwd to "xxxx" | auto-switch-appleid-in-alfred.appleScript |
set value of text field 1 of sheet 1 of sheet 1 of window "App Store" to account | auto-switch-appleid-in-alfred.appleScript |
set value of text field 2 of sheet 1 of sheet 1 of window "App Store" to account | auto-switch-appleid-in-alfred.appleScript |
set value of text field 1 of sheet 1 of sheet 1 of window "App Store" to pwd | auto-switch-appleid-in-alfred.appleScript |
set selectedTracks to selection | delheadnum.scpt |
repeat with T in selectedTracks | delheadnum.scpt |
set srcName to name of T | delheadnum.scpt |
set dstName to "" & rest of every text item of srcName | delheadnum.scpt |
log srcName & " → " & dstName | delheadnum.scpt |
set evernoteEmailAddress to "bachya.abcde@m.evernote.com" | Save%20Files%20to%20Evernote.scpt |
set evernoteActive to count (every process whose name is "Evernote") | Save%20Files%20to%20Evernote.scpt |
set theTags to getTags(theFile) | Save%20Files%20to%20Evernote.scpt |
if evernoteActive > 0 then | Save%20Files%20to%20Evernote.scpt |
if theTags is equal to {"null"} then | Save%20Files%20to%20Evernote.scpt |
create note from file theFile notebook {"@ Inbox"} | Save%20Files%20to%20Evernote.scpt |
create note from file theFile notebook {"@ Inbox"} tags theTags | Save%20Files%20to%20Evernote.scpt |
if theTags as text is equal to "null" then | Save%20Files%20to%20Evernote.scpt |
set tagString to "" | Save%20Files%20to%20Evernote.scpt |
set tagString to "#" & implode(" #", theTags) | Save%20Files%20to%20Evernote.scpt |
set posixTheFile to POSIX path of theFile | Save%20Files%20to%20Evernote.scpt |
do shell script "/usr/local/bin/mutt -s \"" & basename(posixTheFile) & " " & tagString & "\" -a \"" & posixTheFile & "\" -- " & evernoteEmailAddress & " < /dev/null" | Save%20Files%20to%20Evernote.scpt |
on getTags(theFile) | Save%20Files%20to%20Evernote.scpt |
set tagItems to {} | Save%20Files%20to%20Evernote.scpt |
set userTags to (do shell script "mdls -name kMDItemUserTags " & quoted form of POSIX path of theFile) as text | Save%20Files%20to%20Evernote.scpt |
set theDelim to "(" | Save%20Files%20to%20Evernote.scpt |
set finalDelim to ")" | Save%20Files%20to%20Evernote.scpt |
set userTags to (userTags as text) | Save%20Files%20to%20Evernote.scpt |
set preProc to (every word of userTags) as string | Save%20Files%20to%20Evernote.scpt |
set procItems to words 3 thru end of preProc | Save%20Files%20to%20Evernote.scpt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.