This is a tutorial on getting you started on using JavaScript in QuarkXPress 2018:
More information on QuarkXPress and how to use JavaScript in QuarkXPress can be found here:
QX.js API Reference:
http://www.quark.com/documentation/quarkXPress/2018/english/QX.js%20API%20Reference/index.html
QX.js Scripting Guide:
http://files.quark.com/download/documentation/QuarkXPress/2018/english/QX.js%20Scripting%20Guide.pdf