ну вот попробуй такой вариант
//A_KEYSTRING
SUB(A_KEYSTRING, $A_str, $A_delay, $A_hwnd)
$A_kbl=GETKBLAYOUT($A_hwnd)
IF($A_kbl ! 1049)
setkblayout($A_hwnd, 1049)
END_IF
FOR($A_nstr=1,$A_nstr<STRLEN ($A_str)+1)
$A_l=STRCUT ($A_str, $A_nstr, 1)
IF(ARRSIZE ($A_keys_arr) = 0)
TFREADARR ("keys.txt", $A_keys_arr)
END_IF
IF(STRMD5($A_l) = "518ED29525738CEBDAC49C49E60EA9D3")
$A_mess = 0x0102
postmessage($A_hwnd,$A_mess,64,0)
waitms($A_delay)
print("дополнение @")
ELSE
IF(STRMD5($A_l) = "5058F1AF8388633F609CADB75A75DC9D")
$A_mess = 0x0102
postmessage($A_hwnd,$A_mess,46,0)
waitms($A_delay)
print("дополнение .")
ELSE
FOR($A_a=1,$A_a<ARRSIZE ($A_keys_arr),2)
IF($A_keys_arr[$A_a] = $A_l)
$A_key = $A_keys_arr[$A_a-1]
IF($A_key = 46)
IF(STRMD5($A_l) ! "5058F1AF8388633F609CADB75A75DC9D")
$A_key = 48
END_IF
END_IF
IF((($A_key > 64)&($A_key < 91))|(($A_key > 185)&($A_key < 223)))
$A_mess = 0x0100
else
$A_mess = 0x0102
END_IF
IF($A_key > 0)
postmessage($A_hwnd,$A_mess,$A_key,0)
waitms($A_delay)
END_IF
$A_a=999
END_IF
END_CYC
END_IF
END_IF
END_CYC
IF($A_kbl!GETKBLAYOUT($A_hwnd))
setkblayout($A_hwnd, $A_kbl)
END_IF
END_SUB
$hwnd = wndfind("BlueStacks App Player")
wait(5)
A_KEYSTRING ("test@тест.ру", 5, $hwnd)
halt
опять же, keys.txt рядом с основным скриптом.