• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Image Events - some kind of bug ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Image Events - some kind of bug ?


  • Subject: Re: Scripting Image Events - some kind of bug ?
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 13 Sep 2005 13:34:24 +0200


Le 13 sept. 2005 , à 10:34, Jay Louvion a écrit :
… This is the script, I commented out the bits using 24U appearance OSAX.

set thisFolder to (choose folder)
set decided_width to text returned of (display dialog "What width in pixels should the images be resized to ?" default answer "")
tell application "Finder" to set EveryPicture to (every item of entire contents of thisFolder whose name extension is "jpg") as alias list
(*
set NumberOfFiles to number of items in EveryPicture
set incrementprogress to 0
set ImageResizeProgress to create progress indicator with properties {global window:true, name:"Resizing Pictures", closeable:true, indeterminate:false, top message:"This might take some time.", bottom message:"Please be patient...", current value:0, minimum:0, maximum:NumberOfFiles}
*)
with timeout of (length of EveryPicture) * 5 seconds
   repeat with OneFile in EveryPicture
       tell application "Finder" to set FileName to name of OneFile as text
       set LDFileName to ("LD_" & FileName) as string

why not add here something like

if not exist folder (thisFolder as text) & "bogus_folder_name" then make new folder (thisFolder as text) & "bogus_folder_name" (* check the syntax *)

       tell application "Image Events"
            launch
           set TheFinalFileString to ((thisFolder as text) & "bogus_folder_name" & ":" & LDFileName) as string
           set this_image to open OneFile
           scale this_image to size (decided_width as integer)
            save this_image in file TheFinalFileString with icon
           close this_image
       end tell
       
        (*
set incrementprogress to incrementprogress + 1
        update progress indicator ImageResizeProgress current value incrementprogress
*)
    end repeat
end timeout
--close progress indicator ImageResizeProgress



Yvan KOENIG

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Scripting Image Events - some kind of bug ?
      • From: Jay Louvion <email@hidden>
References: 
 >Scripting Image Events - some kind of bug ? (From: Jay Louvion <email@hidden>)

  • Prev by Date: Scripting Image Events - some kind of bug ?
  • Next by Date: Re: Scripting Image Events - some kind of bug ?
  • Previous by thread: Scripting Image Events - some kind of bug ?
  • Next by thread: Re: Scripting Image Events - some kind of bug ?
  • Index(es):
    • Date
    • Thread