info(“activeobject”)

The info(“activeobject”) function returns the name of the currently active text editor or word processor object (if any).


Description

The info(“activeobject”) function returns the name of the currently active text editor or word processor object, if any. If no such object is currently being edited, the function returns empty text ("").

This example inserts the current date and time into whatever text is currently being edited. This procedure will work with both Text Editor and Word Processor objects. The first line of the procedure checks to make sure that there actually is an active object (i.e. something is really being edited at this time).

if info("activeobject") <> ""
activeobjectaction "InsertText",
    datepattern( today(),"mm/dd/yy")+"@"+
    timepattern( now(),"hh:mm am/pm")
endif

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but renamed from info("activesuperobject"), which will also still work.