Import text works in Quark 10, not in 2015

Discuss scripting using AppleScript in QuarkXPress 2015, 2016, 2017 & 2018.
Discuss scripting using JavaScript in QuarkXPress 2018.
Post Reply
PS1
Posts: 0
Joined: 18 Sep 2015, 01:39

Import text works in Quark 10, not in 2015

Post by PS1 » 18 Sep 2015, 01:49

Hi all,

I got this piece of a (test)script which causes Quark2015 to crash. Error number -609, invalid connection.
Stripped the original script to the code below, I think it goes wrong in addressing the text box.
However, when I run it on a different Mac or on the same Mac, but in Quark 10, it works fine.

Does anyone has any ideas on this?

Thanks,
Kjeld
(not new here, but login got lost)


Code: Select all

set importFolder to (choose folder with prompt "Select a text folder") as string
set importList to list folder (importFolder as alias) without invisibles
set theFile to item 3 of importList
set textBox to "textBox"

tell application "PS1.3:Applications:QuarkXPress 2015:QuarkXPress.app:"
	tell page 1 of layout space 1 of project 1
		set story 1 of text box textBox to (importFolder & theFile) as alias --"My Project Text"
	end tell
end tell

pjanssen
Posts: 69
Joined: 31 Dec 1969, 19:00

Re: Import text works in Quark 10, not in 2015

Post by pjanssen » 21 Sep 2015, 03:57

Since you're script isn't generic, I had to change a few things to test it, and it worked for me. One of the changes is:

Code: Select all

tell application "QuarkXPress"
If I remember correctly, I had a script which also didn't worked. The reason was, I had a direct path in the "tell application", like you have.

So give it a try with the line above.

The script with all the changes I made:

Code: Select all

set importFolder to (choose folder with prompt "Select a text folder") as string
set importList to list folder (importFolder as alias) without invisibles
set theFile to item 1 of importList
-- set textBox to "textBox"

tell application "QuarkXPress"
	tell page 1 of layout space 1 of project 1
		set story 1 of text box 1 to (importFolder & theFile) as alias --"My Project Text"
	end tell
end tell

PS1
Posts: 0
Joined: 18 Sep 2015, 01:39

Re: Import text works in Quark 10, not in 2015

Post by PS1 » 21 Sep 2015, 04:12

Thanks for your reply.
Well I have tried this before, but it didn’t work. The reason for the direct path is to test both versions easier.
Just tried it again with you script, but got the same error. As said before, it works on a different Mac, but it’s difficult to find why it’s working on that one and not on my production Mac.

Looking further…

Rohit Bajaj (Quark)
Quarkian
Quarkian
Posts: 0
Joined: 15 Jul 2015, 06:40

Re: Import text works in Quark 10, not in 2015

Post by Rohit Bajaj (Quark) » 22 Sep 2015, 01:01

Hi All,

We have tested it here at our end and found that It is working fine with 2015 if folder contains only relevant files i.e. text files. Application hangs (sometimes) if try to import file other than valid file.

Please see if the folder contains any files other than text file.

Thanks
Rohit

PS1
Posts: 0
Joined: 18 Sep 2015, 01:39

Re: Import text works in Quark 10, not in 2015

Post by PS1 » 22 Sep 2015, 01:40

Hi Rohit,

Nope, there are only 4 textfiles in my testfolder, so that can’t be in the issue.
Does it make sense to send or post a crashreport here?

Thanks,
Kjeld

Rohit Bajaj (Quark)
Quarkian
Quarkian
Posts: 0
Joined: 15 Jul 2015, 06:40

Re: Import text works in Quark 10, not in 2015

Post by Rohit Bajaj (Quark) » 23 Sep 2015, 07:22

Hello Kjeld,

You can send me the crash report at my official email id. : rbajaj@quark.com.

Kindly send me the screenshot of the folder containing files so that we can have the same name folder/files to reproduce the defect here.

Thanks
Rohit

Jean-Marie Schwartz
Posts: 1168
Joined: 23 Nov 2004, 04:30

Re: Import text works in Quark 10, not in 2015

Post by Jean-Marie Schwartz » 23 Sep 2015, 07:55

Hi! Don't know if this may help but I used to get issues with any script dealing with text in the past because of XTs that were disabled (EAtext, etc.). Does it make sense to you?
Jean-Marie Schwartz

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.10.5 • QuarkXPress 9.5.4.1 + QuarkXPress 2017 • Adobe CS5 =

PS1
Posts: 0
Joined: 18 Sep 2015, 01:39

Re: Import text works in Quark 10, not in 2015

Post by PS1 » 23 Sep 2015, 08:20

Hi Jean-Marie,

Yeah, I read about that and turned them off (including a special Linebreak xt). Tried again now – with all the extension turned on again – and it seems to be working now. Hope that’s not only on Wednesdays… Strange thing.

Thanks,
Kjeld

Jean-Marie Schwartz
Posts: 1168
Joined: 23 Nov 2004, 04:30

Re: Import text works in Quark 10, not in 2015

Post by Jean-Marie Schwartz » 23 Sep 2015, 09:12

I hope so too! That's quite strange indeed. "Hasta la victoria siempre!" :)
Jean-Marie Schwartz

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.10.5 • QuarkXPress 9.5.4.1 + QuarkXPress 2017 • Adobe CS5 =

Post Reply

Return to “QuarkXPress 20xx: Scripting (AppleScript / JavaScript)”