applescript   17367

« earlier    

I had previously written an OmniFocus library using JavaScript for Automation, but it’s got issues that vanilla AppleScript does not. Also, I realized that I didn’t really need the fancy regex abilities from JavaScript that I thought I needed, so I went back to standard AppleScript. It works just as well, and the source code is a lot more readable. I hope you find this new library useful.
applescript  omnifocus 
9 days ago by beery
osx - Selecting Random File in AppleScript - Ask Different
# Get list of files...
# For example: all .txt files (not folders) under Downloads and below.
set filelist to (do shell script "find ~/Downloads -type f -name '*.txt'")
on error eStr
# Do something here...
log eStr
end try

# Count the results
set n to count every paragraph in filelist

# Get a random no
set n to (get random number from 1 to n)

# Get the nth item from the results...
get paragraph n of filelist
applescript  textexpander  random_file 
13 days ago by jacobsamlarose
AppleScript: Launching Scripts From Links
Visit for in-depth information and materials regarding automation in Mac OS X.
helper  handler  urlhandler  mac  applescript  Url  OSX  macos  example  launchctl 
13 days ago by colcustard

« earlier    

related tags

acrobat  adobe  alert  alfred  aperture  app  apple  apps  archive  atomio  auto  automation  automator  bbedit  bookmarks_bar  calendar  cocoa  code  codes  coding  com  console  debug  design  developer  devonthink  devtools  dougsapplescripts  download  drive  editor  estim  evernote  example  filesystem  filesystems  finder  fritzbox  general  github  growl  growlnotify  gtd  guide  hacks  hammerspoon  handler  hazel  helper  howto  imessage  ios  iphoto  iterm  itunes  javascript  jxa  key-codes  keyboardmaestro  keynote  keys  launchctl  lifehacks  lua  mac  macadmin  macintosh  macos  macosx  mount  music  nas  network  node  notification  notifications  omnifocus  omnigraffle  open  osa  osx  osx_automation  path  persist  persistence  phone  posix  presentation  productivity  programming  property  random_file  reference  regex  regexp  rename  resource  s  safari  scripting  scripts  sdk  server  services  shell.script  simulator  software  taskpaper  tech  technology  text  textexpander  textprocessing  textwrangler  things  tool  tools  url  urlhandler  utilities  utility  validation  visualization  voip  vpn  workflow 

Copy this bookmark: