In Maxscript, there is a user input object called a “pick button.” You can create an instance of this button in your UI and when a user clicks the button at runtime it allows the user to pick and object in the scene and returns the object to the script (very handy).
objs = Blender.Object.GetSelected() - is a bit flaw’d because
its possible for the active object not to be selected.
a new and better say to do this is…
import bpy
sce = bpy.data.scenes.active
obact = sce.objects.active # last selected object
obsel = sce.objects.context # all visible, selected, non hidden objects