 
 CnfFile = %A_ScriptDir%\etc\brltty.conf ; Configuration file for BRLTTY
 
+IfNotExist, %CnfFile%
+{
+  Msgbox, 0, %ScriptName%, File %CnfFile% not found.
+  ExitApp
+}
+
 Gosub SelectPortAndDisplay
 Return
 

   GuiControlGet, Terminal
   if StrLen(Terminal) == 0
   {
     Msgbox You must select a terminal
     Return
   }
   GuiControlGet, ComPort
   if StrLen(ComPort) == 0
   {
     Msgbox You must select a communication port
     Return
   }

   Msgbox 1, %ScriptName%, You selected %Terminal% attached to %ComPort%
   IfMsgBox Cancel
   {
     Gosub GuiClose

Version = 0.2
ScriptName =  BRLTTY Configurator %Version%


;----------------------------------------------------------------------------------------------------------------------------------------
; Platform:         Windows XP/Vista
; Author:           Michel Such
; AutoHotkey     	Version: 1.0.47
; Version :			Alpha release 1
;
; Script Function:
;	Facility to configure Braille device and communication port
;  for Windows version of BRLTTY

#NoTrayIcon

