Problems porting Quark scripts from OS9 to X

I am in the process of moving my scripts from OS 9.2.2. to OS 10.3. I am having trouble with my Quark Scripts (so far).

Did Quark or AS change the command to get text or “set story 1 of text box i to” alias? My script can’t get past this line?

set adListExport to (choose file with prompt �
	"Choose the export for this section." of type {"TEXT"}) as text

--make new doc and pull filenames from ad run export
tell application "QuarkXPress"
	activate
	make document at beginning with properties {page width:"51 p", page height:"66p", top margin:"3p", left margin:"3p", bottom margin:"3p", right margin:"3p", automatic text box:true}
	tell document 1
		if not (text box 1 exists) then
			make text box at beginning with properties {bounds:{"3p", "3p", "60p", "48p"}}
		else
			set bounds of text box 1 to {"3p", "3p", "60p", "48p"}
		end if
		
		set story 1 to alias adListExport
		tell story 1
			repeat with i from 1 to (count of paragraphs)
				set x to contents of paragraph i as text
				set adRunList to (adRunList & x) as list
			end repeat
		end tell
		close saving no
	end tell
end tell

Brand new to AS in OS 10. Any help would be great.

Thank you,

Steven
OS 10.3
Quark 6.0
AS - not sure what version. How do I check?

Hi :slight_smile:
I think you must tell the text box for working with it:

set adListExport to (choose file with prompt ¬
	"Choose the export for this section." of type {"TEXT"}) as text

--make new doc and pull filenames from ad run export
tell application "QuarkXPress"
	activate
	make document at beginning with properties {page width:"51 p", page height:"66p", top margin:"3p", left margin:"3p", bottom margin:"3p", right margin:"3p", automatic text box:true}
	tell document 1
		if not (text box 1 exists) then
			make text box at beginning with properties {bounds:{"3p", "3p", "60p", "48p"}}
		else
			set bounds of text box 1 to {"3p", "3p", "60p", "48p"}
		end if
		
		tell text box 1
		  set story 1 to alias adListExport
		  tell story 1
			  repeat with i from 1 to (count of paragraphs)
			  	set x to contents of paragraph i as text
			  	set adRunList to (adRunList & x) as list
			  end repeat
		  end tell
    end tell

		close saving no
	end tell
end tell

:wink:

welcome to my world :rolleyes: :rolleyes:
I’m in the same boat transferring my scripts and will now avidly watch your posts to glean more info.

JA