QX.js API Reference

Tutorial: Hello World

Hello World

 "Hello, World!"

To create your hello world JavaScript sample in QuarkXPress, follow these steps:

  1. Open the JavaScript palette (choose Window > JavaScript) if the palette is not already visible.


  2. To add a new script, click the '+' icon.



    A new entry with 'untitled.js' will be added in the list


  3. Rename the script according to your preference.


  4. The file, initially, will be empty. To edit, click the 'Edit' button. The file will open for edit in the registered editor.


  5. Add the following code and save it.

                                    
                                    app.createProject('HelloWorld.qxp');
                                    
                                    

  6. To run the script, double click the script name or click the 'Run' button in JavaScript palette