Yes i kow that im a little newbie, i couldnt figure out how to make a random number that is not an integer, so i just created variables with arrays.Dialog>Dialog1
Caption=Dialog1
Width=445
Height=250
Top=119
Left=16
Label=Welcome to atuotyper 1.00,160,8,true
Button=Start,24,32,75,25,1,,Starts Typing
Memo=type,24,112,185,89,Type in the auto type message here
Button=Stop,24,64,75,25,2,,Stops Typing
Button=Exit,344,168,75,25,4
ComboBox=Delay_Message,120,32,145,Delay between each message%CRLF%1%CRLF%1.5%CRLF%2%CRLF%3%CRLF%4
Button=Setup Message,232,112,185,25,3
ProgressBar=msProgressBar1,232,144,185,17,0
Button=Clean Up,288,32,121,65,7
EndDialog>Dialog1
let>p=0
let>wait[1]=0.05
let>wait[2]=0.06
let>wait[3]=0.07
let>wait[4]=0.08
let>wait[5]=0.09
let>wait[6]=0.10
let>wait[7]=0.11
let>wait[8]=0.12
let>wait[9]=0.13
let>wait[10]=0.14
let>wait[12]=0.15
let>wait[13]=0.16
let>wait[14]=0.18
let>wait[15]=0.19
let>wait[16]=0.20
let>wait[17]=0.21
let>wait[18]=0.22
let>wait[19]=0.23
let>wait[20]=0.24
let>wait[21]=0.456
Show>Dialog1
Label>ActionLoop
GetDialogAction>Dialog1,r
if>r=1,Start
if>r=2,Stop
if>r=3,Setup
if>r=4,bexit
if>r=5,exit
if>r=7,clean
Goto>ActionLoop
Label>exit
SRT>Start
PlayWav>c:\windows\media\ding.wav
wait>5
label>mainloop
let>n=1
let>m=1
random>19,ra
let>ra=ra+1
Length>message[%ra%],Len
label>loop
MidStr>message[%ra%],%n%,%m%,mes2
Send Character/Text>mes2
if>n=len
press enter
random>20,random
let>rnd=dialog1.delay_message+wait[%random%]
wait>rnd
if>end=1
else
goto>mainloop
endif
else
let>n=n+1
let>m=m
random>21,random
wait>wait[%random%]
goto>loop
endif
ResetDialogAction>Dialog1
END>Start
SRT>Stop
PlayWav>c:\windows\media\ding.wav
let>end=1
END>Start
ResetDialogAction>Dialog1
END>Stop
SRT>Setup
let>message[1]=dialog1.type
let>message[2]=dialog1.type
let>message[3]=dialog1.type
let>message[4]=dialog1.type
let>message[5]=dialog1.type
let>message[6]=dialog1.type
let>message[7]=dialog1.type
let>message[8]=dialog1.type
let>message[9]=dialog1.type
let>message[10]=dialog1.type
let>string=dialog1.type
StringReplace>string,a,s,string2
let>message[11]=string2
StringReplace>string,s,d,string2
let>message[12]=string2
StringReplace>string,e,r,string2
let>message[13]=string2
StringReplace>string,b,n,string2
let>message[14]=string2
StringReplace>string,o,p,string2
let>message[15]=string2
StringReplace>string,v,b,string2
let>message[16]=string2
StringReplace>string,g,h,string2
let>message[17]=string2
StringReplace>string,i,u,string2
let>message[18]=string2
StringReplace>string,t,y,string2
let>message[19]=string2
StringReplace>string,l,;,string2
let>message[20]=string2
let>dialog1.msprogressbar1=100
ResetDialogAction>Dialog1
END>Setup
SRT>bexit
PlayWav>c:\windows\media\chimes.wav
let>end=1
let>r=5
DeleteFile>c:\scripts\autot\*.*
END>bexit
Anyways, here is the question, right now, i have an infinite loop for my message program, and im wondering, after i hit start, is there any wya i can make it stop, after i hit the stop button on my dialog?
As you can see i alrleady tried ...

Its a little messy, but advanced scripters should be able to figure it out
