This is difficult to troubleshoot without being able to run the script directly. Also, it's always best to post the most basic example that reproduces the issue. Since you're using viztracker you might find the simple technique shown in the
Grabbing with viztracker article to help.
If you're planning to upgrade to Vizard 5, I would suggest to start using vizconnect to set up a grabber tool linked to a hand model or avatar hand.