• 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: Still, script won't run on an older iMac.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still, script won't run on an older iMac.


  • Subject: Re: Still, script won't run on an older iMac.
  • From: KOENIG Yvan <email@hidden>
  • Date: Sat, 23 Oct 2010 10:07:01 +0200


Le 23 oct. 2010 à 01:23, Robert Poland a écrit :

Hi,

I have this script that works on My 27" iMac and works on my MBP but never works on my sisters older iMac. They all run OS 10.6.4. destFldr is set for appropriate machine.

I even tried a "new user".

I have stripped out almost everything and got rid of arbitrary items, see below.

Anyone got any more thoughts?


-- on run
set droppedItems to (choose file with prompt "Choose an image file:") as list
open (droppedItems)
-- end run

on open (droppedItems)
set destFldr to "Macintosh HD:Users:rpoland:Documents:" & "scaled_picture_folder_Originals:"
-- set destFldr to "iMac_HD:Users:RLP:Documents:" & "scaled_picture_folder_Originals:"
set the text item delimiters of AppleScript to {""}
tell application "Finder"
open destFldr
repeat with aFile in droppedItems
set theFile to (aFile as string)
set theName to the name of file aFile
set destFldr to destFldr & theName


-- display dialog destFldr as string
display dialog theName as string


tell application "GraphicConverter"
activate
open {alias theFile}
-- delay 10
save window 1 in (destFldr as string)
beep
close window 1
end tell
end repeat
end tell
end open

I edited the open handler this way :

on open (droppedItems)
set destFldr to "" & (path to documents folder) & "scaled_picture_folder_Originals:"
set the text item delimiters of AppleScript to {""}
tell application "Finder" to open destFldr 
repeat with aFile in droppedItems
set theFile to (aFile as string)
if theFile ends with ":" then
set theName to item -2 of my decoupe(theFile, ":")
else
set theName to item -1 of my decoupe(theFile, ":")
end if
set destFldr to destFldr & theName


display dialog theName as string


tell application "GraphicConverter"
activate
open {alias theFile}
repeat
try
name of window 1
exit repeat
on error
delay 1
end try
end repeat
save window 1 in (destFldr as string) 
beep
close window 1
end tell
end repeat
end open

--=====

on decoupe(t, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe

--=====

Yvan KOENIG (VALLAURIS, France) samedi 23 octobre 2010 10:06:27


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Still, script won't run on an older iMac.
      • From: Robert Poland <email@hidden>
References: 
 >Still, script won't run on an older iMac. (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Quicktime Timecode track?
  • Next by Date: Re: Search Archives Broken?
  • Previous by thread: Still, script won't run on an older iMac.
  • Next by thread: Re: Still, script won't run on an older iMac.
  • Index(es):
    • Date
    • Thread