Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StringCaseSense, off
- f1::
- ;-----------grab info from email-----------
- Send ^a
- Sleep, 200
- Send ^c
- Sleep, 500
- ;-----------check if owe money-----------
- firstmail :=
- mails :=
- varfrom := Clipboard
- Pos_Found:=RegExMatch(varfrom,"i)(?:[\w_+\.-]+)@(?:[\w\.-]+)\.(?:[a-z\.]{2,6})",mail,1)
- mails.=mail "`n"
- firstmail := SubStr(mails,1,InStr(mails,"`n")-1)
- StringReplace, firstmail, firstmail, From, , All ;Deletes "From" word from varfrom
- StringReplace, firstmail, firstmail, `r, , All ;;Deletes "`r" from varfrom
- FileRead, varowemoney, %A_ScriptDir%\NoAction.txt ;Defaulter = varowemoney
- firstmail=%firstmail% ; ;Deletes Extra spaces etc from varfrom
- IfInString, varowemoney, %firstmail%
- {
- msgbox, This person owes money do not take order
- Return
- }
- ;-----------check what dept this goes to-----------
- If clipboard Contains GST
- {
- Msgbox, This is for the GST Dept.
- }
- If clipboard Contains @ICAI
- {
- Send, l
- Sleep, 500
- Send, Dream CA
- Sleep, 500
- Send, {Enter}
- }
- 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.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement