QuarkXPress 6 - Strange behaviour
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.