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

run script with parameters


  • Subject: run script with parameters
  • From: "Nigel Garvey" <email@hidden>
  • Date: Tue, 3 Oct 2006 15:16:19 +0100

I'm just wondering if this is a bug or a feature. This test script ...

  set params to {1, {a:1, b:2}, me}

  run script "on run paramList
  return paramList
  end run" with parameters params

... returns {1, {a:1, b:2}, «script»} as expected.

If params isn't a list, though - say it's just 1 or "Fred" - the result
is still {1} or {"Fred"}, suggesting that some process tries to ensure
the text script receives a list parameter. With AS 1.8.3 and 1.9.1, the
result is similar when params is a record: the script returns a record in
a list. With AS 1.10.7, the result with a record is simply «script»,
whose properties are those of Script Editor.

But the point of this query concerns when params is a script or a script
object. The result in this case, with AS 1.9.1 or 1.10.7, is a list
containing the decompiled text of the script or script object.

  set params to me

  run script "on run paramList
  return paramList
  end run" with parameters params
  (* --> {"set params to me

  run script \"on run paramList
  return paramList
  end run\" with parameters params"} *)

This works however the main script's run (unless it's a run-only
application) and can be very useful - but is it supposed to happen?

NG

 _______________________________________________
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: run script with parameters
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: Write file command in Filemaker
  • Next by Date: Excel Script can't get proper values
  • Previous by thread: Rép: Write file command in Filemaker
  • Next by thread: Re: run script with parameters
  • Index(es):
    • Date
    • Thread