• 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
QuarkXPress 6 - Strange behaviour
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QuarkXPress 6 - Strange behaviour


  • Subject: QuarkXPress 6 - Strange behaviour
  • From: Luca BASSINI <email@hidden>
  • Date: Wed, 24 Mar 2004 17:37:00 +0100

Hi guys,
look at this script (I'm running QuarkXPress Passport 6.1 on Mac OS X 10.3.3). Run it after having a text box selected on your page:

tell application "QuarkXPress Passport"
-- activate
tell document 1
set Story_Name to name of story 1 of current box
set oldNameToReturn to Story_Name
if Story_Name is "" then
set Story_Display_Name to "NO NOME"
else
set Story_Display_Name to Story_Name
end if

display dialog "The name of this story is:" & return & ,
"" & Story_Display_Name & "" & return & ,
"New name?" default answer Story_Name buttons {"Cancel", "Ok"} default button 2 with icon 1
if button returned of result is "Cancel" then
return "1"
else
set Text_Name to text returned of result
end if
-- CALLING THE HANDLER
my textBox(Text_Name)
end tell
end tell

on textBox(Text_Name)
tell application "QuarkXPress Passport"
tell document 1
set name of story 1 of current box to Text_Name
end tell
end tell
end textBox


Now try to run this simple script to get the name of the current story:

tell application "QuarkXPress Passport"
tell document 1
get name of story 1 of current box
end tell
end tell

Are you getting a strange random character after the text you inserted as the name of the story?


Then, change the after the comment -- CALLING THE HANDLER and just type:
set name of story 1 of current box to Text_Name

The name is now correctly assigned... What this all could be?

Ciao
Luca
_______________________________________________
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: AW: Apple can it do this?
  • Next by Date: Possible to simulate just the control key?
  • Previous by thread: AW: Apple can it do this?
  • Next by thread: Possible to simulate just the control key?
  • Index(es):
    • Date
    • Thread