StringCaseSense, off f1:: ;-----------grab info from email----------- clipboard= Send ^c ;-----------check if owe money----------- varfrom:=SubStr(Clipboard,1,InStr(Clipboard,"`n")-1) StringReplace, varfrom, varfrom, From, , All StringReplace, varfrom, varfrom, `r, , All FileRead, varowemoney, C:\Users\Thom\Desktop\owe us money.txt varfrom=%varfrom% IfInString, varowemoney, %varfrom% { msgbox, This person owes money do not take order Return } ;-----------check what dept this goes to----------- If clipboard Contains oatmeal { If clipboard Contains %A_Space%KY%A_Space% { Msgbox, This is for the KY food dept. } If clipboard Contains %A_Space%DE%A_Space% { Msgbox, This is for the DE food dept. } } If clipboard Contains goats { If clipboard Contains %A_Space%KY%A_Space% { Msgbox, This is for the KY Animal dept. } If clipboard Contains %A_Space%DE%A_Space% { Msgbox, This is for the DE Animal dept. } }