Thank you for your response however I've checked and the files are not write protected. Basically when clicking on the Close button that error occurs and is related to the check/uncheck of the checkbox in the list of nicks/passwords and/or list of auto join channels. The boxes are checked by default and when unchecked they do not uncheck.

; ## On CONNECT

on *:connect: {
if ($rconf(Autos,Join) = on) { .timer 1 1 _aj }
if ($rconf(Autos,Identify) = on) && ($rconf(Autos,IDevent) = connect) && ($network != UnderNet) && ($network != QuakeNet) { _id $cid }
elseif ($rconf(Autos,Identify) = on) && ($network = QuakeNet) || ($network = UnderNet) { _id $cid }
}

; ## on NOTICE

on *:notice:*:*: {
if ($rconf(Autos,Identify) = on && $rconf(Autos,IDEvent) = notice) {
if ($nick = Nickserv) {
if (*identify* iswm $1-) { _id $cid }
}
}
}

; ## Join channels on active network

alias _aj {
var %i = 1,%n = $network
while %i <= $lines($_doc(Autojoin)) {
var %r = $read($_doc(Autojoin),%i)
if ($gettok(%r,3,42) = %n) && ($gettok(%r,1,42) = 2) {
join $gettok(%r,2,42) $iif($gettok(%r,4,42),$ifmatch)
}
inc %i
}
}

; ## Identify to active nickname on active network

alias _id {
var %cid = $1
var %i = 1
while (%i <= $lines($_doc(AutoID))) {
if ($me = $gettok($read($_doc(AutoID),%i),2,42) && $network = $gettok($read($_doc(AutoID),%i),3,42)) && ($gettok($read($_doc(AutoID),%i),1,42) = 2) {
if (%cid) scid %cid $gettok($read($_doc(AutoID),%i),5-,42) $gettok($read($_doc(AutoID),%i),4,42))
else { $gettok($read($_doc(AutoID),%i),5-,42) $gettok($read($_doc(AutoID),%i),4,42)) }
}
inc %i
}
unset %cid
}

; ## Call module dialog

alias _autos { dodialog autos }

; ## Check if state is on or off (autojoin)

alias conf { if ($1) && ($2) && ($3) { writeini $+(scripts\data\autos.ini) $1 $2 $3- } | else { return } }
alias rconf { if ($1-2) { return $readini($+(scripts\data\autos.ini),$1,$2) } }
alias _doc { return $+(scripts\data\,$1,.ini) }

alias find_cboxaj {
if $dialog(autos) {
var %c = $read($_doc(AutoJoin),$calc(%_i -1)),%g = $gettok(%c,2-,42)
write -l $+ $calc(%_i -1) $_doc(AutoJoin) $gettok($did(autos,2,%_i),5,32) $+ * $+ %g
inc %_i
}
}

; ## Load autojoin information to list

alias load_aj {
if $dialog(autos) {
did -a autos 2 $gettok($1-,2,42) $chr(9) $gettok($1-,3,42) $chr(9) $iif($gettok($1-,4,42),$ifmatch,-)
did -o autos 2 %_i 0 0 0 $gettok($1-,1,42) $gettok($did(autos,2,%_i),6-,32))
inc %_i
}
}

; ## Load auto identify information to list

alias load_ai {
if $dialog(autos) {
did -a autos 8 $gettok($1-,2,42) $chr(9) $gettok($1-,3,42) $chr(9) $str(*,$len($gettok($1-,4,42))) $chr(9) $gettok($1-,5-,42)
did -o autos 8 %_i 0 0 0 $gettok($1-,1,42) $gettok($did(autos,8,%_i),6-,32))
inc %_i
}
}

; ## Check if state is on or off (auto identify)

alias find_cboxai {
if $dialog(autos) {
var %c = $read($_doc(AutoID),$calc(%_i -1)),%g = $gettok(%c,2-,42)
write -l $+ $calc(%_i -1) $_doc(AutoID) $gettok($did(autos,8,%_i),5,32) $+ * $+ %g
inc %_i
}
}

; ## Auto join/identify dialog table/events

dialog autos {
title "Auto Join/Identify"
size -1 -1 169 167
option dbu notheme
tab "Auto Join", 1, 2 31 164 117
list 2, 5 51 158 79, tab 1 size
check "Enable", 3, 5 133 37 12, tab 1 push
button "Add", 4, 86 133 37 12, tab 1
button "Delete", 5, 126 133 37 12, tab 1
tab "Auto Identify", 7
list 8, 5 51 158 79, tab 7 size
check "Enable", 9, 5 133 37 12, tab 7 push
button "Add", 10, 86 133 37 12, tab 7
button "Delete", 11, 126 133 37 12, tab 7
text "Identify on:", 12, 3 155 29 8, tab 7
combo 13, 35 153 43 50, tab 7 size drop
button "&Done", 6, 130 153 37 12, ok
text "", 14, 2 3 165 26
list 15, 143 6 21 18, disable size
text " - set up channels to join and nicknames to identify to on connect", 16, 3 13 121 13
text " Auto Join/Identify", 17, 3 5 68 7
}

on *:dialog:autos:init:0: {
dicon $dname $script
$iif(!$isfile($_doc(AutoID)),.write -c $_doc(AutoID))
$iif(!$isfile($_doc(AutoJoin)),.write -c $_doc(AutoJoin))
mdx.load
mdx SetFont $dname 2,4,5,6,8,10,11,12,13 12 550 Verdana
mdx SetFont $dname 3,9 12 700 Verdana

mdx SetFont $dname 17 -11 700 Tahoma
mdx SetColor $dname 17 text $rgb(255,255,255)

mdx SetColor $dname 14,16,17 background $rgb(111,132,161)
mdx SetColor $dname 14,16,17 textbg $rgb(111,132,161)
mdx SetBorderStyle $dname 14 staticedge

mdx SetControlMDX $dname 15 Toolbar flat wrap nodivider list > $bars
mdx SetBorderStyle $dname 15

mdx SetColor $dname 15 background $rgb(111,132,161)
did -i $dname 15 1 bmpsize 32 32
did -i $dname 15 1 setimage icon large $icon1
did -a $dname 15 +a 1 $chr(9) Nothing

mdx SetControlMDX $dname 2,8 Listview report single rowselect checkboxes > $views
did -i $dname 2 1 headerdims 130 110 72
did -i $dname 2 1 headertext Channel $chr(9) Network $chr(9) Key
did -i $dname 8 1 headerdims 100 100 90 100
did -i $dname 8 1 headertext Nickname $chr(9) Network $chr(9) Password $chr(9) String

didtok $dname 13 32 Connect Notice
$iif($rconf(Autos,Join) = on,did -c $dname 3)
$iif($rconf(Autos,Identify) = on,did -c $dname 9)
$iif($rconf(Autos,IDEvent) = connect,did -c $dname 13 1,did -c $dname 13 2)
set %_i 2
.filter -k $_doc(AutoJoin) load_aj
set %_i 2
.filter -k $_doc(AutoID) load_ai
unset %_i
}

on *:dialog:autos:sclick:4: {
var %c = $$?="Enter channel:",%n = $$?="Enter network:"
if %c && %n {
var %k = $?!="Is there a key?"
if %k = $true {
%k = $$?="Enter channel key"
write $_doc(AutoJoin) $+(2,*,%c,*,%n,*,%k)
}
else {
write $_doc(AutoJoin) $+(2,*,%c,*,%n)
}
did -r autos 2
set %_i 2
.filter -k $_doc(AutoJoin) load_aj
unset %_i
}
}

on *:dialog:autos:sclick:5: {
if $did($dname,2).sel {
var %s = $calc($ifmatch -1)
write -dl $+ %s $_doc(AutoJoin)
did -r autos 2
set %_i 2
filter -k $_doc(AutoJoin) load_aj
unset %_i
}
}

on *:dialog:autos:sclick:6: {
conf Autos Join $iif($did($dname,3).state = 1,on,off)
conf Autos Identify $iif($did($dname,9).state = 1,on,off)
conf Autos IDEvent $iif($did($dname,13).sel = 1,connect,notice)
set %_i 2
filter -k $_doc(AutoJoin) find_cboxaj
set %_i 2
filter -k $_doc(AutoID) find_cboxai
unset %_i
}

on *:dialog:autos:sclick:10: {
var %c = $$?="Enter nickname:",%n = $$?="Enter network:",%p = $$?="Enter password:",%s = $$?="Enter string to identify:"
if %c && %n && %p && %s {
write $_doc(AutoID) $+(2,*,%c,*,%n,*,%p,*,%s)
did -r autos 8
set %_i 2
.filter -k $_doc(AutoID) load_ai
unset %_i
}
}

on *:dialog:autos:sclick:11: {
if $did($dname,8).sel {
var %s = $calc($ifmatch -1)
write -dl $+ %s $_doc(AutoID)
did -r autos 8
set %_i 2
filter -k $_doc(AutoID) load_ai
unset %_i
}
}