This. Your script, in Perspective, is running on the gateway, and might find a smartcard plugged in there.
If you need this sort of thing, use Vision. It will work in a Vision client, because Vision runs UI scripts right in the client machine.
Sorry.