Guest User

Untitled

a guest
May 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. //
  2. // groovyのscriptom 経由で jsx を起動.(Windows用)
  3. //
  4.  
  5. import org.codehaus.groovy.scriptom.*
  6.  
  7. //
  8. // 引数として渡されたJSファイルのチェック
  9. //
  10. boolean ng=false
  11. if( args.size()<1 ){ ng=true }
  12. else if( new File(args[0]).exists()==false ){ ng=true }
  13.  
  14. if(ng){
  15. System.exit(0)
  16. }
  17.  
  18.  
  19. //
  20. // ExtendScriptの実行
  21. //
  22. Scriptom.inApartment
  23. {
  24. def myJS = new File(args[0]).text
  25. int lang = 1246973031 // javascript
  26. def indapp = new ActiveXObject('InDesign.Application.CS4_J')
  27. indapp.doScript(myJS, lang )
  28. }
Add Comment
Please, Sign In to add comment