try this
Function KeyUserPassword
Toolbar Toolbar1
Function KeyUserPassword
;/
function $username $password
int action=ShowMenu("1 Username only[]2 Password only[]3 Username and Password[]Cancel")
if(action=0) ret
if(action&1) key (username)
if(action=3) wait 0 ML
if(action&2) key (password)
Toolbar Toolbar1
Help :mes "Each menu item enters either username, password or username and password." "" "i" * info.ico
Menu 1 :KeyUserPassword "Username1" "Password1"
Menu 2 :KeyUserPassword "Username2" "Password2"
Menu 3 :KeyUserPassword "Username3" "Password3"
Menu 4 :KeyUserPassword "Username4" "Password4"