   methods = {
     common: ->
 
+      pWin.show( )
       output.init( allThePaths[0] )
 
       for path, i in allThePaths
         output.appendPath path
+        pWin.pBar.value = Math.ceil i*1000/allThePaths.length
+        pWin.update( )
 
       output.append output.suffix( )
+      pWin.close( )
       output.merge( )
 
     collectActiveLayer: ->


  CG_createDrawingFromPoints = ( pathPoints ) ->
    drawStr = ""

    if pathPoints.length > 0
      drawStr += "CGContextMoveToPoint(ctx, #{CG_fixCoords pathPoints[0].anchor});\n"


ai2assBackend = ( options ) ->
  pWin = new Window "palette"
  pWin.pBar = pWin.add "progressbar", undefined, 0, 1000
  pWin.pBar.preferredSize = [ 300, 15 ]
  app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS
  doc = app.activeDocument
  org = doc.rulerOrigin
