Have a look at the extension object "Better Current Selections" created by swr
You can have a look at the code to see how he's doing it and snip parts of it to use in your extension script.
You can only make selections in the dimensions that are exposed to the extension.
The extension functions like any chart in QlikView meaning that it can only select in the underlying hypercube.
There are numerous selection methods on the class Qv.Document.Object.Data