UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

runSelection

Previous topic: Next topic:
inactiveTopic runSelection topic started 6/19/1999; 5:32:00 PM
last post 6/19/1999; 5:32:00 PM
user Brent Simmons - runSelection  blueArrow
6/19/1999; 5:32:00 PM (reads: 7376, responses: 0)
Syntax runSelection ()

Params None required.

Action Depends on the type of window that is frontmost:

In a menubar window, runs the script attached to the bar cursor

In a table window, runs the selected script or string

In an outline window, runs the selected headline

In a text window, runs the selected text as a string

Returns Result of the execution of the selection as a script.

Examples Open root.examples.docs and select the entry labeled "Basic1." It is a string containing: dialog.confirm ("Click OK to continue or Cancel to abort"). In the QuickScript Window, execute:
runSelection ()

   » true

Returns true regardless of your answer to the dialog, indicating that the command executed correctly.

Errors A variety of errors can be generated if the selection is not a valid Frontier script, depending on what is wrong with it.

Notes The Frontier Command-/ and ctrl-/ commands are implemented using runSelection.

If you execute runSelection in an outline structure, Frontier deposits the result of the execution as a comment immediately beneath the selected structure.

See Also evaluate


Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X