• 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: run script error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run script error


  • Subject: Re: run script error
  • From: Deivy Marck Petrescu <email@hidden>
  • Date: Wed, 28 Jan 2009 11:04:00 -0500


On Jan 27, 2009, at 5:06 PM, Jim Brandt wrote:

... more code down to here...

tell application "Finder"
    set _Today to _Sent & yymmdd & ":" as text
    set found to exists folder _Today
    if not found then
        set new_folder to make folder at alias _Sent with properties {name:yymmdd}
        set current view of new_folder's container window to list view
    end if
    repeat with n from 1 to the count of the theList
        set _name to name of item n of theList
        

tell application "Finder"
    activate
    set _Today to _Sent & yymmdd & ":" as text
    set found to exists folder _Today
    if not found then
        set new_folder to make folder at alias _Sent with properties {name:yymmdd}
        set current view of new_folder's container window to list view
    end if
    repeat with n from 1 to the count of the theList
        set _name to name of item n of theList
        if not (_name = "Dont_Send") then move (item n of theList) to folder _Today with replacing
    end repeat
end tell


This is a part of a script (call it A.scpt). The code works when run by itself.

However, when invoked from another script via:

    run script (alias "A.scpt")

it returns an error:



"A.scpt"  is not an alias, it is a string. 
You should use:
 
run script A

where A is an alias.

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

This error occurs after moving the first file in the list "theList".

Does anyone know why it only gives the error when run from another script?

Jim

move (item n of theList) to folder _Today with replacing
    end repeat
end tell


This is a part of a script (call it A.scpt). The code works when run by itself.

However, when invoked from another script via:

    run script (alias "A.scpt")

it returns an error:

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

This error occurs after moving the first file in the list "theList".

Does anyone know why it only gives the error when run from another script?

Jim



Deivy Petrescu
email@hidden



 _______________________________________________
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

References: 
 >run script error (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: Flattening Nested Lists
  • Next by Date: Re: iPhoto in reverse: get photo from pathname?
  • Previous by thread: run script error
  • Next by thread: RE: run script error
  • Index(es):
    • Date
    • Thread