; DEFAULT.WBT
; Whne WinBatch is executed without any parameters, it attempts to locate
; and execute this DEFAULT.WBT file.

ActWin=WinGetActive()                  ;Get currently active Window
VerWB=Version()                        ;Get Version numbers for title
VerDLL=VersionDLL()

xyzzyTitle=strcat("WinBatch ",VerWB,"   DLL ",VerDll)

while @TRUE
   BoxShut()
   WinTitle("","WinBatch")
   xyzzywbtfile=strlower(AskFileName(xyzzyTitle,"","WinBatch (*.WBT)|*.WBT|","*.WBT",1))
   if xyzzywbtfile!=""
      if strcat(FileRoot(xyzzywbtfile),".",FileExtension(xyzzywbtfile))=="default.wbt"
         Message("Already running default.wbt","Try looking in the samples directory for sample wbt scripts to run.")
      else
         call(xyzzywbtfile,"")
      endif
   else 
      break
   endif
endwhile
exit

:cancel
display(1,"Exiting","Default.wbt")
exit                                    ;Bye Bye
