• 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
Can't type " (ASCII character 34) in a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't type " (ASCII character 34) in a string


  • Subject: Can't type " (ASCII character 34) in a string
  • From: "jean.luc.bouchard" <email@hidden>
  • Date: Fri, 19 Nov 2004 02:28:11 +0000

Hey Everyone,

I'm fairly new to using AppleScript and I have started using it to create
help applications for Shake and Motion, which are visual effects software
that Apple makes.

I'm working on a configuration App that will write a text file once I've
done a couple of queries.

In that configuration file, I need to write the character " (or ASCII 34)
and I for the life of me, I can't t write it without having \ (or ASCII 92)
preceeding it... It won't come on its own.

I'm trying the following routine, which quite clearly shows the problem...

---------

choose from list {"Academy", "CinemaScope", "Full", "1.85", "HDTV 1080i/p 30
FPS", "HDTV 1080i/p 29.97 FPS ND", "HDTV 1080i/p 29.97 FPS DF", "HDTV
1080i/p 25 FPS", "HDTV 1080i/p 24 FPS", "HDTV 1080i/p 23.98 FPS", "NTSC ND
(D1 4:3)", "NTSC DF (D1 4:3)", "NTSC ND (16:9)", "NTSC DF (16:9)", "PAL (D1
4:3)", "PAL (16:9)", "PAL (Square)"} with prompt "What is your default
working resolution" & return

set temp_fn to result as string

set fn to "script.format = " & (ASCII character 34) & temp_fn & ";" & (ASCII
character 34) as string

--------

I've even tried to following script to go and fix it after the fact but it
gives me the same result

-----

set the message_text to fn as string
set the message_text to replace_chars(message_text, ASCII character 92, "")

set test to message_text as text

on replace_chars(this_text, search_string, replacement_string)
    set AppleScript's text item delimiters to the search_string
    set the item_list to every text item of this_text
    set AppleScript's text item delimiters to the replacement_string
    set this_text to the item_list as string
    set AppleScript's text item delimiters to ""
    return this_text
end replace_chars

-----

Would anyone have an idea on how to fix it?

Thanks for the help

Cheers

JL.


 _______________________________________________
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: Can't type " (ASCII character 34) in a string
      • From: Matthew Smith <email@hidden>
  • Prev by Date: Re: [ANN] New comprehensive AppleScript book
  • Next by Date: Re: Can't type " (ASCII character 34) in a string
  • Previous by thread: Re: Folder actions and Illustrator files
  • Next by thread: Re: Can't type " (ASCII character 34) in a string
  • Index(es):
    • Date
    • Thread