JavaScript

Discuss scripting using AppleScript in QuarkXPress 2015, 2016, 2017 & 2018.
Discuss scripting using JavaScript in QuarkXPress 2018.

JavaScript

Postby seneca » 16 May 2018, 11:30

Are you going to publish JavaScript manual for QuarkXpress?
I can't find anything relating to that.
seneca
 
Posts: 3
Joined: 16 May 2018, 11:26

Re: JavaScript

Postby franz.wohlkoenig » 16 May 2018, 12:20

You mean something like https://github.com/qxpjs/ ?
27" iMac • 3,1 GHz Intel Core i5 • 12 GB Memory • System: macOS 10.13.4
XPress since 3.1, actual 2017
User avatar
franz.wohlkoenig
 
Posts: 49
Joined: 15 Jul 2014, 05:43
Location: Carinthia, Austria, Europe

Re: JavaScript

Postby MikeWenzloff » 16 May 2018, 13:35

I suspect seneca doesn't mean the JS repository.

Real documentation of the DOM and samples tied to each element--what they and how they are used. Ya know, documentation! I need it and so does just about everyone else that is going to use JS in Q.

For now, this is the best I have found and can apply to Q2018, sans a published DOM.

https://developer.mozilla.org/en-US/doc ... xpressions

And while we're at it (the wanting/wishing part), Q needs to do what Adobe did with its ExtendScript. Much of what one can do in ID is directly tied to ES.

Mike
MikeWenzloff
 
Posts: 1255
Joined: 05 Jun 2013, 12:55

Re: JavaScript

Postby seneca » 16 May 2018, 14:28

Indeed.
The only way to see what's going on is to set breakpoints on running scripts and dig in.
All the JavaScript code used by Quark is in the QuarkXpress bundle. On macOSX right-mouse click on the application bundle to get into the folder. You should not find it too difficult to discover where it is.
Also, I can't see any UI elements except for JS prompt which is extremely basic.
I'm sure that in time this will improve or some folks will come up with some other ideas.
May we can employ Electron for that.
I suppose, we should treat the initial JavaScript support in Q18 as an early beta.
seneca
 
Posts: 3
Joined: 16 May 2018, 11:26

Re: JavaScript

Postby Matthias Guenther (Quark) » 16 May 2018, 16:17

Hi,

the JavaScript documentation is still in progress, it will appear soon on our documentation page.

We'll publish two documents, one API reference and one Scripting Guide.

Thanks
Matthias
Feel there should be more chatting, more tips, more user interaction?
Join us on Facebook, a forum-like group with over 2,000 QuarkXPress fans interacting:
http://www.facebook.com/groups/quarkxpress



Image
User avatar
Matthias Guenther (Quark)
Quarkian
Quarkian
 
Posts: 5471
Joined: 04 Jun 2004, 15:06
Location: http://bit.ly/QuarkHamburg

Re: JavaScript

Postby seneca » 16 May 2018, 17:28

That's great.
Thanks Matthias.
seneca
 
Posts: 3
Joined: 16 May 2018, 11:26

Re: JavaScript

Postby thoromyr » 29 May 2018, 06:39

Reviewing the scripts it appears that user interaction is extremely limited, e.g., getValidStringInput() and getValidNumericInput(). The sample script "Create Grid by Dividing a Box.js" requires bouncing through four dialogs which suggests that the API doesn't offer anything more sophisticated.

Is there any intention to provide a more functional dialog? Something along the lines of "new DialogWindow()" to which widgets (string inputs, combo boxes, etc.) can be added and their data collected (via something like promise) would go a long way toward making this usable.
thoromyr
 
Posts: 2
Joined: 15 Jun 2016, 20:33

Re: JavaScript

Postby Matthias Guenther (Quark) » 29 May 2018, 08:48

Hi Thoro,

yes, that's on the roadmap.

Thanks
Matthias
Feel there should be more chatting, more tips, more user interaction?
Join us on Facebook, a forum-like group with over 2,000 QuarkXPress fans interacting:
http://www.facebook.com/groups/quarkxpress



Image
User avatar
Matthias Guenther (Quark)
Quarkian
Quarkian
 
Posts: 5471
Joined: 04 Jun 2004, 15:06
Location: http://bit.ly/QuarkHamburg

Re: JavaScript

Postby Matthias Guenther (Quark) » 31 May 2018, 05:19

The JavaScript API documentation is now online:
http://www.quark.com/documentation/quar ... index.html

The JavaScript Scripting Guide is still in review and will appear soon.

Thanks
Matthias
Feel there should be more chatting, more tips, more user interaction?
Join us on Facebook, a forum-like group with over 2,000 QuarkXPress fans interacting:
http://www.facebook.com/groups/quarkxpress



Image
User avatar
Matthias Guenther (Quark)
Quarkian
Quarkian
 
Posts: 5471
Joined: 04 Jun 2004, 15:06
Location: http://bit.ly/QuarkHamburg


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

Who is online

Users browsing this forum: No registered users and 0 guests