Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (* Ask user to choose a .pages file. *)
  2. tell application "System Events"
  3.     activate
  4.     set n to ""
  5.     try
  6.        repeat while n does not end with ".pages"
  7.           set file_name_alias to choose file with prompt "Please select a .pages file"
  8.           tell disk item (file_name_alias as text)
  9.         set n to name
  10.         set d to path of container
  11.           end tell
  12.        end repeat
  13.        
  14.     on error -128 -- user cancelled
  15.         return
  16.     end try
  17. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement