Created
February 2, 2021 15:26
-
-
Save indiscripts/164102dbf5ccd54741f92bca77f6b331 to your computer and use it in GitHub Desktop.
Test app.doScript from InDesign's modal state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Test app.doScript from InDesign's modal state | |
// - Run this jsx from your Scripts panel and click`Test` | |
// - Feedback here: https://twitter.com/indiscripts | |
// --- | |
(function(w,s,u) | |
{ | |
const V = "ID " + app.version + " / " + $.os; | |
w = new Window('dialog',"Test doScript in Modal State"); | |
w.orientation = 'row'; | |
w.add('button',u,"Test").onClick = function() | |
{ | |
try{ app.doScript("alert('SUCCESS in ' + V)") } | |
catch(e){ alert("FAILED in " + V + '\r\r' + e) } | |
}; | |
w.add('button',u,"Quit",{ name:'cancel' }); | |
w.show(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment