Guest User

Untitled

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