I'm trying to write an event in a sim to catch each sign-in and determine if a magnetic card was used, but it doesn't seem to be working.
I am aware of the setting to require magnetic cards in both employee class and the option to override that on each terminal. I have to allow keyed ID entry for other features in the sim, but I would like to prevent users from manually entering an ID for a user that requires a magnetic card.
Event SignIn
if @magstatus = "n"
call GetSeqFromOBJ
if len(empPW) > 9
loadkybdmacro key(1,458755)
infomessage "sorry, please use your magnetic card"
endif
endevent
The sub "getseqfromobj" just gets the "ID" field from emp_def and stores in the variable "empPW" to be used to sign in. The goal here is to catch a password with a length of 10 or more (IDs that are mag cards) and automatically sign them out if they did not use a magnetic card.
The problem here is that @magstatus doesn't appear to work with the signIn event, so @MAGSTATUS is always "n" even if a card was swiped.
Also, I have written a sign-in event INQ in the sim, but I need to prevent users from manually entering an ID using an external keyboard.
I am aware of the setting to require magnetic cards in both employee class and the option to override that on each terminal. I have to allow keyed ID entry for other features in the sim, but I would like to prevent users from manually entering an ID for a user that requires a magnetic card.
Event SignIn
if @magstatus = "n"
call GetSeqFromOBJ
if len(empPW) > 9
loadkybdmacro key(1,458755)
infomessage "sorry, please use your magnetic card"
endif
endevent
The sub "getseqfromobj" just gets the "ID" field from emp_def and stores in the variable "empPW" to be used to sign in. The goal here is to catch a password with a length of 10 or more (IDs that are mag cards) and automatically sign them out if they did not use a magnetic card.
The problem here is that @magstatus doesn't appear to work with the signIn event, so @MAGSTATUS is always "n" even if a card was swiped.
Also, I have written a sign-in event INQ in the sim, but I need to prevent users from manually entering an ID using an external keyboard.