• 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: AppleScript-Users Digest, Vol 4, Issue 442
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 4, Issue 442


  • Subject: Re: AppleScript-Users Digest, Vol 4, Issue 442
  • From: Jim Brandt <email@hidden>
  • Date: Tue, 11 Sep 2007 14:49:33 -0500


Any other suggestions?


Post more detailed code. Where are the variables coming from?


Shane,
Here's script 1. It works standalone.

global My_Lib
set script_filename to "OSX:Library:Scripts:My_Lib.scpt"
set My_Lib to load script file script_filename
set yymmdd to Get_yymmdd(current date) of My_Lib
tell application "Finder"
set HD1 to "HD1:"
set sourceFolder to (HD1 & "Misc:Other:")
set Pics to (HD1 & " Pics:")
set destFolder to (HD1 & " Pics:" & yymmdd & ":")
if not (exists folder destFolder) then
set _new_folder to make folder at (Pics as alias) with properties {name:yymmdd}
set current view of _new_folder's container window to list view
end if
move every item of folder sourceFolder to folder destFolder
end tell
--------------------------------------------------
Here's script 2:

global My_Lib
set script_filename to "OSX:Library:Scripts:My_Lib.scpt"
set My_Lib to load script file script_filename
set _sf to path to scripts folder
set _log to _sf & "OS X Scripts: Others:Pics.log" as string
set _date to short date string of (current date)
set _time to time string of (current date)
set date_time to _date & " " & _time
set mess to date_time & "   - "
tell application "Finder"
activate
set HD1 to "HD1:"
set _Others to (HD1 & "Misc:Other:")
set _the_count to count of items in folder _Others
if _the_count > 0 then
set mess to mess & (_the_count as text) & " files renamed" & return
set _Move_It to _sf & "OS X Scripts: Others:Move Pics.scpt" as text
with timeout of 300 seconds
run script (alias (_Move_It))
end timeout
else
set mess to mess & "nothing to move" & return
end if
end tell
tell me to Message(mess, _log) of My_Lib
--------------------------------------------------

Script 1 is saved in the file designated as "_Move_It"

The error:

Finder got an error: Finder got an error: AppleEvent timed out.

happens during the "run script" command.

Jim Brandt
 _______________________________________________
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: AppleScript-Users Digest, Vol 4, Issue 442
      • From: Shane Stanley <email@hidden>
  • Prev by Date: [OT] iSync and one other (silly) question
  • Next by Date: Re: AppleScript-Users Digest, Vol 4, Issue 442
  • Previous by thread: Re: [OT] iSync and one other (silly) question
  • Next by thread: Re: AppleScript-Users Digest, Vol 4, Issue 442
  • Index(es):
    • Date
    • Thread