• 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
Stupid questions: \' & lazy parameter passing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stupid questions: \' & lazy parameter passing


  • Subject: Stupid questions: \' & lazy parameter passing
  • From: Alex Robinson <email@hidden>
  • Date: Thu, 9 May 2002 20:27:58 +0100

This may be a very stupid question...

I'm passing arguments through to a perl script (do shell script "perl -e
'script_goes_here'")

Obviously I need to ensure that single quotes get escaped in time for the
script to be executed.

But...

1. set escaped_quote to "\\'" returns \\' (eh?)
2. set escaped_quote to "\'" gives expected """ but found unknown token (as
expected)

So how do I manage to get \' in a string? I thought 1 was correct but why
isn't \\ ending up as \ ?


As I'm already asking one stupid question I might as well ask another...

If I have a function eg.

on somefunction given paramA:val1, paramB:val2, paramC:val3
--code

is it possible to call that function without explicitly passing each and
every parameter?

And in a quasi-related stupid question, is it possible to test whether a
variable/element of a record exists/has been defined? Or have I just gone
perl crazy in all my time away from applescript?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: On variable naming... [was Re: AsciiNumber & AsciiCharacter Handlers]
  • Next by Date: Re: On variable naming... [was Re: AsciiNumber & AsciiCharacter Handlers]
  • Previous by thread: Re: On variable naming... [was Re: AsciiNumber & AsciiCharacter Handlers]
  • Next by thread: Reversing the lines in a file
  • Index(es):
    • Date
    • Thread