Thanks for your reply. Actually I know how to use geGetSelSet() to obtain a net name, but it is based on you have a selected a net in the schematic at first. Let me restate my problem more clear.
My issue is that I created a form using the following code with one string field and one button named "Select"; the default value of the string field is "vdd!". What I want to implement is when I click the "Select" button, the active window will change to a schematic and it will wait until I choose a net. After I sucessfully choose a net from the schematic, the active window should change to my form and the selected net name will automatically appear at my string field.
myVdd = hiCreateStringField(
?prompt "Power Supply:"
slectVddButton = hiCreateButton(
list( myVdd 15:10 200:25 100)
list( slectVddButton 220:10 50:25 ))
The issue that stuggles me is that how to automatically change the active window from the form to the schematic and form the schematic to the form and how to let the system wait my mouse action until I selcet a net.