Professional Documents
Culture Documents
""""""""""""""""""""""""""
This Function Reference documents all macro language Statements,
Builtin functions, and Library functions for The Aurora Macro Language
(AML). Several editor Extension functions are also documented. For a
macro language tutorial, see the Language Reference. For information
on how to install, configure, and use Aurora, see the Users Guide.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Copyright (C) 1996 by nuText Systems. All rights reserved worldwide.
No parts of this document may be copied in part or in whole, except as
provided in the License in the accompanying documentation.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
1. Language Statements
2. Functions (builtin functions and library functions)
3. Events (builtin events)
#"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$
% Language Statements %
&"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'
break [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: The 'break' statement will force an unconditional exit
from 'for', 'loop', 'repeat', and 'while' loops.
returns: nothing
see also: for, loop, repeat, while
example: loop
keycode = getkey
casekeycode
when<esc> // <esc> exits the loop
break
otherwise
say "you pressed " + (geteventname keycode)
end
end
case [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: casecase_expr
whenwhen_expr
expressions
whenwhen_expr, when_expr, when_expr
expressions
:
otherwise
expressions
end/endcase
example: casevalue
when1
say "value is one"
when3, 7
say "value is three or seven"
when"abc" + "d"
say "value is abcd"
otherwise
say "value is " + value
end
value =casevalue
when1 "one"
when2 "two"
otherwise"undefined"
end
constant [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: constantidentifier = expression [,constant...]
constantfunction
:
end/endfunction
returns: nothing
see also: #exec, forward, function, include, variable
example: constantfive = 5
constantsix = 2 * 3
msgbox five * six // displays '30'
databuf [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: databuf buffer
:
end/enddatabuf
returns: nothing
see also: createbbuf, createbuf, destroybuf
event [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: event <key or event> (arg1 arg2 ...)
:
end/endevent
#exec [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: #exec
:
#endexec
returns: nothing
see also: constant, forward, function, include, set, variable
for [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: forvariable = startto/downtolimit [step/byexpr ]do
expressions
end/endfor
returns: nothing
see also: break, loop, repeat, return, while
returns: nothing
see also: function, key, variable
function [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: function functionname (arg1 arg2 ...)
:
end/endfunction
returns: nothing
see also: arg, event, forward, key, setfunction
#if [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: #ifif_expr
source code
#elseifelseif_expr
source code
:
#else
source code
#end/#endif
The '#elseif' and '#else' clauses are optional.
returns: nothing
if [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: ifif_exprthen
expressions
elseifelseif_exprthen
expressions
:
else
expressions
end/endif
returns: nothing
see also: constant, #exec
example: include"d:\\macros.aml"
include drive + path + filename
key [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: key <key or event> (arg1 arg2 ...)
:
end/endkey
returns: nothing
see also: arg, event, forward, function, setfunction
loop [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: loop[ expressiontimes]
expressions
end/endloop
returns: nothing
see also: break, for, repeat, return, while
menu [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: menu menuname
item description1 expressions1
item description2 expressions2
:
end/endmenu
example: menu"Colors"
item "&Red" say "you selected red"
item "&Green" say "you selected green"
item "&Blue" say "you selected blue"
end
menubar [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: menubar window bar[1-4]
item description1 expressions1
item description2 expressions2
:
end/endmenubar
object [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: objectobjectname ( parent1 parent2 ... )
example: objectabc
// makes 'abc' the current object (and creates it
// if it doesn't exist)
objectabc (def xyz)
// makes 'abc' the current object (and creates it
// if it doesn't exist). 'abc' will inherit
// code and data from objects 'def' and 'xyz'
returns: nothing
example: functionmodify (c d)
c = 13
d = 14
end
functioncallmod
a = 1
b = 2
modifyrefarefb
returna + b // returns 27
end
repeat [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: repeat
expressions
untiluntil_expr
returns: null
see also: break, for, loop, return, while
example: variablei
repeat // counts from 0 to 9
say "i is " + i
delay 500
i = i + 1
untili == 10
return expression [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This statement returns the value of 'expression'
immediately and unconditionally to the calling function.
returns: nothing
see also: forward
while [Statement]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
format: whilewhile_exprdo
expressions
end/endwhile
returns: null
see also: break, for, loop, repeat, return
#"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$
% Functions %
&"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'
about [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Displays an about box with the editor version, and the
date and time.
returns: The button pressed (Ok), or null if nothing was pressed.
actualcol apparentcolumn row buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the actual column for an apparent (visible) column
in the specified line. If the row and buffer are not
specified, the current line and buffer are assumed.
example: actualrow -5
// returns the line number which appears to be 5
// lines above the current line on the screen
returns: nothing
see also: askhistory, gethiststr, pophistory
example: addline
// adds a new blank line to the end of the
// current buffer
addline "Last line"
// adds a new line with the text 'Last line'
// after the last line in the current buffer
This function does not move the cursor in the buffer. The
window is scrolled so that the cursor appears 'col' minus
1 columns from the left edge of the client area. If 'col'
is not specified, the window is scrolled to a position
that leaves the cursor in the horizontal center of the
window.
returns: nothing
see also: adjustrow
example: adjustcol
// attempts to scroll the window so that the cursor
// is horizontally centered in the window.
adjustcol 3
// attempts to scroll the window so that the cursor
// is 3 columns from the left edge of the window
This function does not move the cursor in the buffer. The
window is scrolled so that the cursor appears 'row' minus
1 lines from the top edge of the client area. If 'row' is
not specified, the window is scrolled to a position that
leaves the cursor in the vertical center of the window.
returns: nothing
see also: adjustcol
example: adjustrow
// attempts to scroll the window so that the cursor
// is vertically centered in the window.
adjustrow 3
// attempts to scroll the window so that the cursor
// is 3 rows from the top edge of the window
example: apparentrow 5
// returns the apparent line number on the screen
// of the line 5 lines below the current line
arg n
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the 'nth' argument, or the number of arguments
passed to the currently executing function. If 'n' is
zero or not specified, then the number of arguments is
returned, otherwise the 'nth' argument is returned.
example: functionabc
say (arg) + " args passed, first is: " + (arg 1)
end
array size
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Creates an array of 'size' elements, where each element
in the array is initialized to the null string. 'size'
cannot be greater than 2000.
returns: an array
see also: array?
array? expression
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the specified expression is an array.
returns: TRUE if the exression is an array, otherwise null.
see also: array
asciibuf buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This function creates a new buffer containing an Ascii
chart with 256 lines - one for each Ascii character. The
new buffer will become the current buffer. If 'buffer' is
null or not specified, a unique bufferid will be
assigned.
example: variablevalue
// prompt for a string
ifaskboxrefvalue "File name?" _load "File.txt"then
// user string is returned in 'value'
msgbox "You entered " + value
end
askhistory [Lib][prompt]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Displays a history popup menu for the current prompt. If
a string is selected, it is entered automatically into
the prompt. This function is only for use within prompts.
returns: The string selected from the popup menu, or null if
nothing was selected or the history buffer does not
exist.
see also: pophistory
assignkey [Lib][mon]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Assigns the current scrap key macro to a key. The user is
prompted to enter the key. If the key macro is assigned,
the scrap macro is erased.
Note: key macros cannot be assigned to multi-keys with
this function.
returns: nothing
see also: assignkey, openkey, playing?, savekey, setting
base number newbase
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts a decimal or hexadecimal number to a string
representing a number of any base from 2 to 36.
returns: nothing
see also: delay
begdesk [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Clears the current desktop and marks the beginning of a
series of window 'close' calls which add each closed
window to the current desktop. This would typically be
used for exiting the editor and saving all open windows
as the current desktop.
returns: nothing
see also: close, enddesk
bin2hex binarystring
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts a binary string into a string representing its
hexadecimal value
bin2int binarystring
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts 1, 2, or 4 byte binary strings into integers.
returns: an integer.
see also: char, char2, char4
example: bin2int 'a' // returns 97
bin2int 'ab' // returns 25185
bin2int 'abcd' // returns 1684234849
blink [0/1]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Enables (1) or disables (0) the video blink mode.
Disabling the video blink mode allows the brighter
background colors (128-255) to be used.
returns: nothing
see also: display
book? bookmark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the specified bookmark exists.
returns: TRUE if the bookmark exists, otherwise null.
see also: setbook
bootpath filename
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts an unqualified or partially qualified filename
into a fully-qualified filename based on the editor
'bootpath' (the location of the main editor .Exe file).
break?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if <ctrl break> was pressed.
returns: TRUE if <ctrl break> was pressed, otherwise null.
see also: breakoff
breakoff
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Clears the break flag that was turned on by pressing the
<ctrl break> key. Calling this function will stop <ctrl
break> from exiting loops and beeps.
returns: nothing
see also: break?
bufchanged? buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if a buffer is modified by checking the buffer
'modified' flag. If 'buffer' is null or not specified,
the current buffer is assumed.
returns: non-zero if the buffer is modified, otherwise null.
see also: bufferflag
buffer? buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if a buffer exists. If 'buffer' is null or not
specified, the current buffer is assumed.
returns: TRUE if the buffer exists, otherwise null.
see also: bufferflag
button? buttonmask
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the specified mouse button(s) are currently
pressed down. 'buttonmask' can be any combination of the
following values bitwise-ORed together:
cascade [Lib][win]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Cascades all non-minimized windows on the screen.
returns: nothing
see also: splitwin, tile
returns: nothing
see also: open, save, setname
example: close
// closes the current window
close 's'
// saves the current buffer and closes the current
// window
closefile handle
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Closes a file handle opened with 'openfile'. If a file
handle is not specified, then the file handle returned
from the most recent openfile call is assumed.
returns: nothing
see also: filepos, openfile, readfile, writefile
example: closefold
// closes the open fold spanning the current line in
// the current buffer, leaving any subfolds open
closemouse
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Deactivates the mouse driver and removes the mouse
pointer from the screen. When this function is called,
mouse events will no longer be processed by the event
queue.
returns: nothing
see also: openmouse
example: col 1
// moves the cursor to column 1 of the current line
// in the current buffer
col getlinelen + 1
// moves the cursor one column past the end of the
// current line in the current buffer
example: colormark 95
// changes the color of the current mark to
// white on magenta
1301 - no terminator
1302 - unexpected end of source
1303 - no closing parenthesis
1310 - unexpected argument
1311 - unexpected terminator
1312 - unexpected function
1313 - unexpected operator
1314 - unexpected keyword
1315 - invalid redefinition
1318 - invalid number
1319 - identifier not defined (the identifier name
can be retrieved with the 'geterror' function,
using option 's')
1320 - bad assignment
1330 - bad when clause
1336 - improperly placed break
1337 - invalid reference
1501 - can't open include file (the include file name
can be retrieved with the 'geterror' function,
option 's')
1502 - include level exceeded
1504 - statement must be at top level
1507 - can't redefine builtin function
1508 - duplicated function argument
copywin [Lib][edit]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Copies the current edit window. The new edit window will
display the same file in memory as the original window.
returns: TRUE if successful, otherwise null.
see also: splitwin
The new cursor will become the current cursor for the
buffer.
createdir path
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Creates a new directory specified by 'path'. Only one
directory in the path can be created at a time.
returns: Non-zero if successful, otherwise zero.
see also: directory?, file?, locatefile
example: createfold
// creates an open fold on the current line in
// the current buffer
createwindow window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Creates a new window. If 'window' is null or not
specified, a unique windowid will be assigned. The new
window will become the current window.
currbuf buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the specified buffer the current buffer by moving
it to the top of the buffer list.
returns: nothing
see also: getcurrbuf, gotobuf
currcursor cursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the specified cursor the current cursor by moving
it to the top of the cursor list in the current buffer.
returns: TRUE if successful, otherwise null.
see also: getcurrcurs
currdesk [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Sets the 'current' desktop to the current window layout
on the screen. The current desktop can be restored later
with the 'restoredesk' function, or saved to a file with
the 'savedesk' function.
returns: nothing
see also: begdesk, enddesk, opendesk, openhistory, restoredesk,
savedesk
currmark mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the specified mark the current mark by moving it to
the top of the mark list in the current buffer. Marks at
the top of the mark list have higher priority when
displayed on the screen.
returns: TRUE if successful, otherwise null.
see also: getcurrmark
currpath path
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Changes the current Dos path to 'path' for the disk drive
specified in 'path'.
returns: Non-zero if successful, otherwise zero.
see also: getcurrpath
cursor? cursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if a cursor exists. If 'cursor' is null or not
specified, then the current cursor for the current buffer
is assumed.
returns: TRUE if the cursor exists, otherwise null.
see also: createcursor, cursor?, destroycursor, setcursor
returns: nothing
see also: hidecursor, showcursor
delay milliseconds
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Suspends execution of the editor for the specified number
of milliseconds.
returns: nothing
see also: beep, halt, system
example: delchar
// deletes the character at the cursor in the
// current buffer
delchar 4
// deletes 4 characters at the cursor in the
// current buffer
delchar 1 5 20 "abc"
// deletes the character at column 5, line 20
// in the buffer "abc"
deleteblock mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Deletes marked text and destroys the mark. If 'mark' is
not specified, the default markid is assumed.
returns: TRUE if successful, otherwise null.
see also: copyblock
deletefile filename
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Deletes the specified filename. 'filename' may also
specify an empty directory.
returns: TRUE if successful, otherwise null.
see also: copyfile, renamefile
deletewin [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Deletes the current window. For edit windows, the buffer
in the window is not destroyed.
returns: nothing
see also: close
example: delline
// deletes the line at cursor in the current buffer
delline 4
// deletes the line at cursor and 3 lines below
// it in the current buffer
delline 1 1 "abc"
// deletes the first line in the buffer "abc"
ifdelline > getrowthen
// deletes the current line and tests if it was the
// last line
:
end
destroybook bookmark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Destroys a bookmark created with the 'setbook' function.
If 'bookmark' is not specified, the current bookmark is
assumed.
returns: TRUE if successful, otherwise null.
see also: setbook
destroybuf buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Destroys a buffer, If 'buffer' is null or not specified,
then the current buffer is destroyed. All windows,
cursors, bookmarks, and marks associated with the buffer
will also be destroyed. The previous buffer in the buffer
list will become the current buffer.
returns: nothing
see also: createbbuf, createbuf, loadbuf
destroycursor cursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Destroys the specified cursor, and any window in which
the cursor is displayed. If 'cursor' is not specified,
then the current cursor in the current buffer is
destroyed. If the buffer contains more than one cursor,
the next cursor in the cursor list will become the
current cursor.
returns: TRUE if successful, otherwise null.
see also: getcurswin, setcursor
example: destroyfold
// destroys the closed fold at the current line in the
// current buffer, leaving subfolds intact
destroymark mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Destroys a mark created with the markline, markcolumn,
markchar, markstream, or copymark functions. The text
within the mark is not affected. If 'mark' is not
specified, the default markid is assumed.
returns: TRUE if successful, otherwise null.
see also: copymark, markchar, markcolumn, markline, markstream
destroyobject object
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Destroys the specified object. If 'object' is not
specified, the current object is assumed.
destroytimer timerid
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Stops and destroys the timer identified by 'timerid'.
This function will destroy both interval and alarm
timers.
returns: nothing
see also: setalarm, settimer, timer?
returns: nothing
see also: function?, lookup, set, variable?
destroywindow window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Destroys a window and removes it from the screen. If
'window' is null or not specified, then the current
window is destroyed. Any child windows of 'window' are
also destroyed. The previous window in the window list
will become the current window.
returns: nothing
see also: createwindow, window?
dispatch
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This function reads the next event from the event queue
and 'dispatches' it by calling a user-defined event
handling function associated with the event. If no events
are on the queue, this function waits for an event to
appear on the queue.
returns: TRUE if the 'endprocess' function was not called in the
user event-handling function, otherwise null.
see also: endprocess, process
display opt=[f]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Updates the display. Any windows, buffers, and marks, and
cursors which have been modified are redrawn.
Specifying option 'f' forces the entire display to be
redrawn (the background, all windows, etc.), even if
nothing has been modified within the editor. This can be
used to restore the display after another program,
utility, or Dos command has overwritten it.
returns: TRUE if the display was updated, otherwise null.
see also: setdisplay
enddesk [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Marks the end of a series of window 'close' calls which
add the closed window to the current desktop.
returns: nothing
see also: begdesk
endprocess
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Posts a special internal 'quit' event to the event queue.
When the editor processes this event, the current editor
'process' is terminated, and the editor returns to the
previous process (or to Dos if there is no previous
process). The internal 'quit' event forces the 'dispatch'
function to return null, and the 'process' function call
to return.
example: eotstring
// removes the end-of-text line in the current window
eotstring -1
// sets the end-of-text line to
// ' End of Text '
event?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Test if one or more events are currently in the event
queue, including keyboard, mouse, and user-defined
events.
returns: TRUE if an event is in the queue, otherwise null.
see also: geteventcount, keyhit?, shiftkey?
fbreak [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Breaks out of the current 'fcommand' call.
returns: nothing
see also: fcommand
returns: nothing
see also: fbreak, fmark, fmark?
fgetfile [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the fully qualified file or directory name at the
current line in the current file manager window.
returns: a fully qualified file or directory name.
fgetopt [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the file manager options of the current file
manager window.
returns: the current file manager option settings
see also: fgetsort
fgetsort [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the sort order of the current file manager
window as a one character string (n/s/d/e/o).
returns: the current file manager sort order
see also: fgetopt, fsort
a - archive
d - directory
h - hidden
r - read only
s - system
v - volume
filelist [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Displays a popup menu of buffers which have not been
'hidden'. Selecting a buffer will make it the current
buffer and display it in the current edit window. The
buffer previously displayed in the edit window will not
be destroyed.
returns: the bufferid selected, or null if nothing was selected.
see also: nextfile, prevfile
returns: nothing
see also: gotoscreen, hilite, writeline, writestr
a -
find all occurrences
b -
limit the search to the specified mark
f -
search for closed text folds
g -
start the search from the beginning or end of the
buffer, mark, or line
i - ignore case during the search
l - limit the search to the current line
n - prevent the cursor position from being updated
o - search for open text folds
r - search in reverse towards the beginning of the
buffer, rather than towards the end of the buffer
s - skip closed text folds
w - search for 'whole words' only
x - check for regular expression characters in the
search string (see Regexp.dox).
* - force the search to begin at the current cursor
position instead of the next character position
[ - search for the first character also found in the
search string. Character ranges can be specified
(a-zA-Z, etc.)
~ - search for the first character not found in the
search string. Character ranges can be specified
(a-zA-Z, etc.)
If the string is found, and options 'a' and 'n' are not
specified, then the cursor is moved to the beginning of
the matched string, otherwise the cursor does not move.
findbuf buffername
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Finds the first buffer in the buffer list with the
specified buffer name. A buffer name can be associated
with a buffer by using the 'setbufname' function. For
most ordinary editing buffers, the buffer name is usually
a fully qualified file name.
returns: The first bufferid with specified name if successful,
otherwise null.
see also: getcurrbuf, getprevbuf, setbufname
flipcase string
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Toggles the case of each character in the string.
returns: the 'flipcased' string.
see also: locase, upcase
example: flipcase "Oranges" // returns "oRANGES"
returns: nothing
see also: fbreak, fcommand, fmark?
example: fmark
// mark/unmark the file or directory at the cursor
fmark "ma"
// mark all files
fmark "ua"
// unmark all files and directories
fmark? [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if any files or directories are marked in the
current file manager window.
returns: Non-zero if a file or directory is marked, otherwise
null.
see also: fbreak, fcommand, fmark?
s - destroys subfolds
c - destroys closed folds
o - destroys open folds
example: foldblock
// creates a new closed fold spanning the default mark
foldblock 'ds'
// destroys all open and closed folds and subfolds
// in the default mark
foldblock 'o'
// opens all top level closed folds in the default mark
foldblock 'cs'
// closes all open folds and subfolds in the default
// mark
returns: nothing
see also: getfold
returns: nothing
see also: fgetopt, fgetsort, pickfile
fstatus [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Updates the status line of the current file manager
window.
returns: nothing
fup [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Reloads the current file manager window with the parent
directory of the currently displayed directory.
returns: TRUE if successful, otherwise null.
see also: open, reopen
fupdate file fmgroptions [Lib][fmgr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Updates the current file manager window without reloading
the directory (as the reopen command does). If file
manager options are not specified, the file manager
options associated with the current window are used.
returns: nothing
see also: fgetopt, reopen
getattr x y
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the color at the specified x,y position in the
current video output window. If x or y are not specified,
the current video cursor position is assumed.
getbinarylen buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the binary line length that was used to load a
binary buffer. If 'buffer' is null or not specified, then
the current buffer is assumed. This function can also be
used to test if a buffer is a binary buffer.
getbookbuf bookmark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the buffer associated with a bookmark. If
'bookmark' is not specified, the current 'bookmark' in
the current buffer is assumed.
returns: The bufferid associated with the bookmark if successful,
otherwise null.
see also: getcurrbook
getbootpath
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the editor 'boot' path. The boot path is the
location of the editor .Exe file currently executing.
returns: The boot path.
see also: bootpath, setbootpath
getbotwin
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the bottommost window on the screen.
returns: the windowid of the bottommost window on the screen
see also: getcurrwin
getbufname buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the descriptive name associated with a buffer.
If 'buffer' is null or not specified, then the current
buffer is assumed.
getbuftabs buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the tab width used for displaying real tabs. If
'buffer' is not specified, the current buffer is assumed.
returns: the tab width
see also: setbuftabs
example: getchar
// returns the character at the cursor in the
// current buffer
getchar 3 5
// returns the character at column 3, line 5 in the
// current buffer
getchar 1 1 "abc"
// returns the first character in the buffer "abc"
getchild window opt=[bt]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets a child window for a window. If 'window' is not
specified, the current window is assumed. The following
options may be specified:
getcol buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the column position of the cursor. If 'buffer is
null or not specified, the current buffer is assumed.
returns: The current cursor column position.
see also: getrow
example: getcolor 5
// returns the text color of the current window
getcolor 6
// returns the mark color of the current window
getcurrbook buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the current bookmark for the specified buffer.
If 'buffer' is null or not specified, the current buffer
is assumed.
returns: The current bookmarkid for a buffer.
see also: currbook
getcurrbuf
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current buffer at the top of the buffer list.
returns: The current bufferid if successful, otherwise null.
see also: findbuf, getprevbuf, gotobuf
getcurrcurs buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the current cursorid for the specified buffer.
If 'buffer' is null or not specified, the current buffer
is assumed.
returns: The current cursorid for a buffer.
see also: currcursor, destroycursor, setcursor
getcurrfile
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the name of the macro language file being currently
compiled or executed.
getcurrmark buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the current markid for the specified buffer. If
'buffer' is null or not specified, the current buffer is
assumed.
returns: The current markid for a buffer.
see also: currmark
getcurrobj
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current (executing) object where this function
is called.
returns: The current object.
see also: object
getcurrpath drive
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the current path for the specified disk drive.
If 'drive' is not specified, the current drive is
assumed. If a drive is specified, it must be specified
with a colon: 'C:', 'D:', etc.
returns: The current fully qualified path for the specified drive.
see also: currpath
getcurrwin opt=[c]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current (topmost) window on the screen. If no
options are specified, the topmost non-child window is
returned. If option 'c' is specified, the topmost window
is returned, whether or not the window is a child window.
returns: the current windowid
see also: getbotwin, gotowindow
getcursbuf cursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the buffer associated with a cursor. If
'cursor' is not specified, the current 'cursor' in the
current buffer is assumed.
returns: The bufferid associated with the cursor if successful,
otherwise null.
see also: getcurrbook
getcurswin cursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the windowid (if any) associated with a cursor.
If 'cursor' is not specified, the current 'cursor' in the
current buffer is assumed.
returns: The windowid associated with a cursor if successful,
otherwise null.
see also: getwincurs
getdate format
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current date in the specified format. If
'format' is not specified, the format previously passed
to the 'international' function is assumed.
button - null
field - the contents of the edit field
group - the checked items in the group box, in
'initvalue' format (see the 'groupbox'
function)
listbox - the line at the cursor within the list box
getenv variable
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the value of the specified environment variable.
'variable' must be in upper case.
geterror opt=[cfkls]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves error information after compiling macro source
code with the 'compilemacro' or 'eval' functions, or
executing macros with the 'runmacro' and 'loadobject'
functions. One of the following options can be specified:
geteventcode eventname
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the event code for the specified event name.
returns: an event code
see also: geteventname
geteventcount
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the number of real physical events (keyboard and
mouse) which have occurred in the current editing
session.
returns: The number of real events.
see also: event?, keyhit?, shiftkey?
geteventname eventcode
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the event name for the specified event code.
returns: an event name
see also: geteventcode
example: say "You pressed the key: " + (geteventname (getkey))
geteventobj
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current event object. The current event object
is the object where events are dispatched by the editor.
returns: The current event objectid.
see also: seteventobj
getexe
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the name of the currently executing editor .Exe
file, without the path or file extension.
returns: The editor .Exe name.
see also: getversion getos
example: getfold
// returns true if a closed fold exists at the cursor
// in the current buffer
getfold 'ot'
// returns true if the cursor is on the top line of
// an open fold
getfold 'ns'
// returns the total number of closed folds in the
// current buffer
getfold 's'
// returns the number of lines in the closed fold at
// the cursor in the current buffer
gethistname [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the history bufferid for the current prompt. This
function is only for use within prompts.
returns: the history bufferid for the current prompt.
see also: addhistory, askhistory, gethiststr, pophistory
example: getlinebeg
// returns the first non-blank column of the current
// line in the current buffer
getlinelen 1
// returns the first non-blank column of the first
// line in the current buffer
getlinebeg 5 "abc"
// returns the first non-blank column of line 5 in
// buffer "abc"
example: getlinelen
// returns the length of the line at the cursor in
// the current buffer
getlinelen 1
// returns the length of the first line in the
// current buffer
getlinelen 5 "abc"
// returns the length of line 5 in the buffer "abc"
getlines buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the total number of lines in a buffer. If 'buffer'
is null or not specified, then the current buffer is
assumed. A buffer will always have at least one line.
returns: The number of lines in a buffer.
getloadinfo opt=[dfst]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Obtains information about the file or directory which was
loaded by the most recent 'loadbuf' or 'insertbuf'
function call. One of the following options can be
specified:
getmarkbot mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the bottommost line of a mark. If 'mark' is not
specified, the default markid is assumed.
returns: The bottommost line of the mark if successful, otherwise
null.
see also: getmarkleft, getmarkright, getmarktop
getmarkbuf mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the buffer associated with a mark. If 'mark' is
not specified, the default markid is assumed.
returns: The bufferid of the buffer associated with the mark
if successful, otherwise null.
see also: getcurrmark
getmarkcols mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the width of a mark. For line marks, 16001 is
returned. For column, character, and stream marks, the
end column minus the start column plus 1 is returned. If
'mark' is not specified, the default markid is assumed.
returns: The mark width if successful, otherwise null.
see also: getmarkrows
getmarkleft mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the leftmost column of a mark. For line marks, zero
is returned. For character and stream marks, the starting
column of the mark is returned. If 'mark' is not
specified, the default markid is assumed.
returns: The leftmost column of the mark if successful, otherwise
null.
see also: getmarkbot, getmarkright, getmarktop
getmarkright mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the rightmost column of a mark. For line marks,
16001 is returned. For character and stream marks, the
ending column of the mark is returned. If 'mark' is not
specified, the default markid is assumed.
returns: The rightmost column of the mark if successful, otherwise
null.
see also: getmarkbot, getmarkleft, getmarktop
getmarkrows mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the mark height (the number of lines spanned by the
mark). If 'mark' is not specified, the default markid is
assumed.
returns: The mark height if successful, otherwise null.
see also: getmarkcols
getmarktop mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the topmost line of a mark. If 'mark' is not
specified, the default markid is assumed.
returns: The topmost line of the mark if successful, otherwise
null.
see also: getmarkbot, getmarkleft, getmarkright
getmarktype mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the mark type (column, line, character, or stream).
If 'mark' is not specified, the default markid is
assumed.
getmarkuse
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the default markid.
returns: the default markid.
see also: usemark
getmenu opt=[hwnxym] row menubuffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves information about a menu buffer created with
the 'menu' keyword. 'menubuffer' specifies the name of
the menu. If 'menubuffer' is null or not specified, then
the current buffer is assumed. If 'row' is not specified,
then the line at the cursor is assumed.
example: getmenubar
// returns the currently highlighted item on the
// primary menu bar (tests if an item is highlighted)
getmenubar 'n' 2
// returns the total number of menu bar items for
// menu bar 2
getmenubar 's' '' 3
// returns the description for the third menu bar item
// on the primary menu bar
getmousex opt=[e]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the virtual X coordinate of the mouse pointer. If
option 'e' is specified, the X coordinate where the last
mouse event occurred is returned.
returns: the mouse virtual X coordinate
see also: getmousex, mousepos
getmousey opt=[e]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the virtual Y coordinate of the mouse pointer. If
option 'e' is specified, the Y coordinate where the last
mouse event occurred is returned.
returns: the mouse virtual Y coordinate
see also: getmousey, mousepos
getos opt=[vml]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets information about the operating system. One of the
following options may be specified:
getpalette position
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves a color attribute from a 100-byte user-defined
palette area defined with the 'setpalette' function. If
no position is specified, the entire palette area is
returned. The editor library code (Lib.x) expects color
attributes to be in the positions defined in Color.aml.
returns: a numeric color attribute, or the 100-byte palette.
see also: Color.aml, setpalatte
getparent window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the parent window of a window. If 'window' is not
specified, the current window is assumed.
returns: the windowid of the parent window if successful,
otherwise null.
see also: getchild, setparent
getprevbook bookmark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the bookmark preceding 'bookmark' in the bookmark
list for the current buffer. If 'bookmark' is not
specified, the current bookmark in the current buffer is
assumed.
returns: The bookmarkid of the previous bookmark if successful,
otherwise null.
see also: currbook
getprevbuf buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the buffer before 'buffer' in the buffer list. If
'buffer' is null or not specified, then the current
buffer is assumed.
returns: The previous bufferid, or null if no previous buffer
exists.
see also: findbuf, getcurrbuf
getprevcurs cursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the cursor before 'cursor' in the cursor list for
the current buffer. If 'cursor' is not specified, the
current cursor in the current buffer is assumed.
returns: The cursorid of the previous cursor if successful,
otherwise null.
see also: currcursor
getprevmark mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the mark preceding 'mark' in the mark list for the
current buffer. If 'mark' is not specified, the default
markid is assumed.
returns: The markid of the previous mark if successful, otherwise
null.
see also: currmark
getrawtime
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current date and time in a 17 character string.
The format of the string is as follows:
format:
YYYYMMDDWhhmmssuu
where:
YYYY = year
MM = month [1-12]
DD = day [1-31]
W = day of the week [0-6, 0=sunday]
hh = hour [0-23]
mm = minutes [0-59]
ss = seconds [0-59]
uu = hundredths of a second [0-99]
code region
"""" """"""
0 'virtualX', 'virtualY' is not in the window
1 client area
2 north border
3 east border
4 south border
5 west border
6 northwest border corner
7 northeast border corner
8 southeast border corner
9 southwest border corner
getrow buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current line number of the cursor. If 'buffer'
is null or not specified, the current buffer is assumed.
returns: The current line number of the cursor.
see also: getcol, getlines
getsettings [Lib][mon]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current window settings as they appear on the
edit window title bar. See the 'setting' command for a
description of window settings.
returns: a string containing the current window settings.
see also: setting, setting?
getstr length x y
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets a string of the specified length at the specified
x,y position in the current video output window. If x or
y are not specified, the current video cursor position is
assumed.
getsyntax window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Retrieves the syntax highlighting object associated with
a window. If 'window' is not specified, the current
window is assumed.
returns: a syntax highlighting object
see also: setsyntax
example: gettext
// returns the line at the cursor in the current buffer
gettext 3
// returns the portion of the current line from
// column 3 to the end of the line
gettext 3 5
// returns 5 characters at column 3, on the current line
// in the current buffer
gettext 3 5 20 "abc"
// returns 5 characters at column 3, line 20 in the
// buffer "abc"
example: gettitle
// returns title 1 for the current window
gettitle 3 "abc"
// returns title 3 for window "abc"
gettime format
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current time in the specified format. If
'format' is not specified, the format previously passed
to the 'international' function is assumed. If the format
is -1, the international format is assumed, but with
seconds added (if not already present).
getversion
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the current version of the editor.
returns: The current version (major and minor) of the editor as a
string.
see also: getexe, getos
getvidbot
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the virtual coordinate of the bottommost row of the
physical screen.
returns: the bottom edge of the physical screen.
see also: getvidleft, getvidright, getvidrows, getvidtop
getvidcols
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the number of columns on the screen.
returns: the number of columns on the screen.
see also: getvidleft, getvidright, getvidrows
getvidleft
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the virtual coordinate of the leftmost column of the
physical screen.
returns: the left edge of the physical screen.
see also: getvidbot, getvidcols, getvidright, getvidtop
getvidright
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the virtual coordinate of the rightmost column of
the physical screen.
returns: the right edge of the physical screen.
see also: getvidbot, getvidcols, getvidleft, getvidtop
getvidrows
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the number of rows on the screen.
returns: the number of rows on the screen.
see also: getvidbot, getvidcols, getvidtop
getvidtop
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the virtual coordinate of the topmost row of the
physical screen.
returns: the top edge of the physical screen.
see also: getvidbot, getvidleft, getvidright, getvidrows
getviewbot window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the line number of the bottommost visible row in a
window. If 'window' is not specified, the current window
is assumed.
returns: the bottommost visible row in a window.
see also: getviewleft, getviewright, getviewtop
getviewcols window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the number of visible columns in a window. If
'window' is not specified, the current window is assumed.
returns: the number of visible columns.
see also: getviewleft, getviewright, getviewrows
getviewleft window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the leftmost column in a window. If 'window' is not
specified, the current window is assumed.
returns: the leftmost column in a window.
see also: getviewbot, getviewright, getviewtop
getviewright window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the rightmost visible column in a window. If
'window' is not specified, the current window is assumed.
returns: the rightmost visible column in a window.
see also: getviewbot, getviewleft, getviewtop
getviewrows window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the number of visible rows in a window. If 'window'
is not specified, the current window is assumed.
returns: the number of visible rows.
see also: getviewbot, getviewcols, getviewtop
getviewtop window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the line number of the topmost row in a window. If
'window' is not specified, the current window is assumed.
returns: the topmost row in a window.
see also: getviewbot, getviewleft, getviewright
getwinbuf window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the buffer associated with a window. If 'window' is
not specified, the current window is assumed.
returns: the bufferid associated with the window is successful,
otherwise null.
see also: getwincurs, setwincurs
getwincount window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the number of windows on the screen. If 'window' is
specified, this function returns the number of child
windows attached to 'window'.
returns: the number of windows on the screen, or the number of
child windows attached to a window.
see also: getchild, setparent
getwinctrl window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the title bar controls for a window. If 'window' is
not specified, the current window is assumed.
returns: a string containing all the title bar controls
see also: setwinctrl
getwincurs window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the cursor associated with a window. If 'window' is
not specified, the current window is assumed. Only
cursors associated with a buffer are returned.
returns: the cursorid of the window cursor if successful,
otherwise null.
see also: getwinbuf, setwincurs
getwinobj window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the event object associated with a window. If
'window' is not specified, the current window is assumed.
returns: the window event object.
see also: setwinobj
gety
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Gets the cursor row in the current video window. This
function is ignored for windows which contain a buffer.
returns: the cursor row in the current video window
see also: fillrect, getattr, getstr, getx, gotoxy, gotoscreen,
hilite, writeline, writestr
returns: nothing
see also: getmenubar, gotobar2, menubar
returns: nothing
see also: getmenubar, gotobar, menubar
gotobook bookmark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Moves the cursor to a bookmark. Only the current cursor
in the buffer associated with the bookmark is moved. If
'bookmark' is not specified, the current 'bookmark' in
the current buffer is assumed.
returns: TRUE if successful, otherwise null.
see also: getcurrbook, setbook
gotobuf buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the specified buffer the current buffer. If
'buffer' is not specified, the buffer at the top of the
buffer list becomes the current buffer.
returns: nothing
see also: getmenu, menu, submenu
example: gotopos 1 1
// moves the cursor to column one of the first line
gotoscreen
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Changes all video functions to operate immediately on the
actual physical screen. The physical screen becomes the
current window for all builtin video functions. Column
one and row one are located at the upper left corner of
the screen. This function can be used to perform custom
drawing of the display.
returns: nothing
see also: fillrect, getattr, getstr, getx, gety, gotowindow,
gotoxy, hilite, writeline, writestr
gotowindow window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the specified window the current window. If
'window' is not specified, the topmost window on the
screen becomes the current window.
returns: nothing
getdialog
// display the dialog box
halt
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Terminates the execution of the editor immediately and
unconditionally.
returns: nothing
see also: delay, machine, system
hex2bin hexstring
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts a hexadecimal string, composed of only the
characters 0-9 and A-F or a-f, to a binary string.
hidecursor
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Hides the physical cursor in the current window. If the
current window contains a buffer, the effects of this
function are temporary and will disappear the next time
the display is updated.
returns: nothing
see also: showcursor
hidemouse
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Hides the mouse pointer.
returns: nothing
see also: showmouse
hidewindow window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Hides a window temporarily. If 'window' is null or not
specified, then the current window is assumed. The window
will be shown again the next time the display is updated.
returns: nothing
see also: showwindow
hilite length height color col row
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Highlights a rectangular area in the current window with
the specified color attribute. 'length' and 'height'
specify the dimensions of the highlighted rectangle.
'col' and 'row' specify the upper left corner of the
rectangle. If 'col' and 'row' are not specified, the
current cursor position is assumed.
returns: nothing
example: hilite 6 1 95
// highlights a word at the cursor of length 6
// with the color 'white on magenta'
example: hilitebar
// removes the highlight from the primary menu bar
hilitebar 2 5
// highlights item 5 on menu bar 2
example: insabove
// inserts a new line above the line at the cursor
// in the current buffer
insabove "New line" 1 6
// inserts a new line with the text " New line"
// above line 6 in the current buffer
insabove "New line" 1 1 "abc"
// inserts a new line with the text "New line"
// above line 1 in the buffer "abc"
insert? buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the cursor is in insert or overstrike mode. If
'buffer' is null or not specified, the current buffer is
assumed.
returns: TRUE if the cursor is in insert mode, otherwise null.
see also: setcursor, writetext
example: insline
// inserts a new line after the line at the cursor
// in the current buffer
insline "New line" 1 (getlines)
// inserts a new line with the text "New line"
// after the last line in the current buffer
insline "New line" 1 1 "abc"
// inserts a new line with the text "New line"
// after line 1 in the buffer "abc"
instext string col row buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Inserts the specified string into a buffer at the
specified row and column. If 'buffer' is null or not
specified, the current buffer is assumed. If 'col' and
'row' are not specified, then the string is inserted at
the current cursor position.
returns: nothing
see also: getdate, gettime, thousands
example: joinline
// joins the line below the cursor to the current line
// at the cursor position in the current buffer
joinline 1
// appends the line below the cursor to the current line
// in the current buffer
returns: a multistring
see also: splitstr
keyhit?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Test if non-shift key has been pressed.
returns: TRUE if a key has been pressed and not processed,
otherwise null.
see also: event?, shiftkey?
lastpos buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Moves the cursor to the last cursor position. If 'buffer'
is null or not specified, the current buffer is assumed.
returns: TRUE if successful, otherwise null.
see also: gotopos
locase string
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts a string to lowercase.
returns: the string in lowercase.
see also: upcase, flipcase
example: locase "PEACHES" // returns "peaches"
lookup myvar
// returns the value of an object variable whose
// name is the value of 'myvar'
machine code arg1 arg2 ..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Executes machine-level code. This function executes the
string specified by 'code' directly as 80x86 machine
language code, passing the arguments arg1, arg2 on the
stack. The machine code must not contain any external
fixups or relocation items - all references must be
relative the code itself. The stack size should not be
assumed to be larger than 300 bytes.
mark? mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if a mark exists. If 'mark' is not specified, then
the default markid is assumed.
returns: TRUE if the mark exists, otherwise null.
see also: inmark?
example: markchar
// marks the character at the cursor using the default
// markid and leaves the mark 'open'.
example: markcolumn
// marks the character at the cursor using the default
// markid and leaves the mark 'open'.
markcolumn 1 1 1 (getlines)
// marks the first column of the entire buffer using
// the default markid
example: markline
// marks the current line in the current buffer using
// the default markid, and leaves the mark 'open'
markline 1 (getlines)
// marks the entire buffer using the default markid
markline '' '' 'T'
// marks the current line using the markid 'T'
example: markstream
// opens a stream mark at the cursor position with the
// default markid. Characters will not be marked
// until the cursor is moved.
maxems size
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Specifies the maximum amount of EMS memory the editor may
use, in 1k increments. If -1 is specified, the maximum
available EMS will be used. All available XMS memory will
be used before EMS memory is used.
maxxms size
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Specifies the maximum amount of XMS memory the editor may
use, in 1k increments. If -1 is specified, the maximum
available XMS will be used.
memoptions opt=[o]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Specifies memory usage options. The following options may
be specified:
returns: nothing
see also: maxems, maxxms, swapfiles
mono?
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the editor is operating in monochrome mode.
returns: TRUE if the editor is in monochrome mode, otherwise null.
mousepos virtualX virtualY
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Moves the mouse pointer to the specified virtual X and
virtual Y coordinates on the screen.
returns: nothing
see also: getmousex, getmousey, openmouse
returns: nothing
see also: openmouse
returns: nothing
see also: okbox, say, shortbox, yncbox
nextfile [Lib][edit]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the next buffer in the buffer list the current
buffer, and displays it in the current edit window. The
buffer previously displayed in the edit window will not
be destroyed.
returns: nothing
see also: filelist, prevfile
nexthist [Lib][prompt]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Displays the next history string in a prompt. This
function is only for use within prompts.
returns: nothing
see also: gethistname, prevhist
nextwindow [Lib][win]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Switches the focus to the next window on the screen.
returns: nothing
see also: prevwindow
object? object
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if an object exists. If 'object' is not specified,
then the current object is assumed.
returns: TRUE if the object exists, otherwise null.
see also: destroyobject, object, objtype?
onalarm [Lib]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor library (Lib.x) when
sounding the PC speaker to call attention to a message.
This event can be used to customize the alarm sound.
'onalarm' is sent directly to the current event object
and is not passed any parameters.
example: functiononalarm
// customized alarm sound
beep 950 30
beep 750 30
end
onclose [Lib]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor library (Lib.x) when a
file or file manager window is closed and removed from
memory.
ondesk [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor library (Lib.x) after
the desktop is restored via the restoredesk function.
returns: none required
onexit [Lib]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor library (Lib.x) when an
edit session is ended and control is returned to Dos.
This event is typically used to perform a variety of
final-exit cleanup tasks.
onfocus [Lib]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor library (Lib.x) after
the focus is switched to another file or file manager
window. 'onfocus' is sent directly to the current event
object and is not passed any parameters.
returns: none required
see also: onclose, onkillfocus, onopen, onsave
onkillfocus [Lib]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor library (Lib.x) when a
window is about to lose the focus. 'onkillfocus' is sent
directly to the current event object and is not passed
any parameters.
returns: none required
see also: onfocus
returns: nothing
see also: close, createbbuf, createbuf, loadbuf, open, opennew,
reopen, save, setname
example: openfold
// opens the closed fold at the current line in the
// current buffer, leaving any subfolds closed
returns: nothing
see also: close, open, openbuf, reopen, save, setname
openmouse opt=[dr]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks Initializes the mouse. If successful, the mouse pointer
is displayed at the center of the screen and the event
queue will process mouse events. For this function to
return successfully, a mouse driver such as Mouse.com or
Mouse.sys must be installed before the editor is started.
example: pagedown
// scrolls down one page
pagedown 1
// scrolls down one page and one line
pagedown -(getviewrows / 2)
// scrolls down one half page
example: pageup
// scrolls up one page
pageup 1
// scrolls up one page and one line
pageup -(getviewrows / 2)
// scrolls up one half page
pankey [Lib][win]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Pans through the virtual screen by using the cursor keys.
returns: nothing
see also: sizekey
example: function<lbutton>
:
// pre-processing
:
pass // pass control to <lbutton> in a parent object
:
// post-processing
.
end
returns: nothing
see also: peek
returns: nothing
see also: pushcursor
returns: The string selected from the popup menu. Returns null if
nothing was selected or the history buffer does not
exist.
returns: For popup menus defined with the 'menu' statement, the
macro expression associated with the menu item is
evaluated and the result is returned.
i - ignore case
r - search in reverse from the end of the string
w - whole words only
x - use regular expressions (see Regexp.dox)
returns: The position in 'string' where the first occurrence of
the search string is found, or zero if nothing is found.
returns: The position in the string where the first character was
found, or zero if not found.
returns: The position in the string where the first character not
in 'charclass' was found, or zero if not found.
prevfile [Lib][edit]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Makes the previous buffer in the buffer list the current
buffer, and displays it in the current edit window. The
buffer previously displayed in the edit window will not
be destroyed.
returns: nothing
see also: filelist, nextfile
prevhist [Lib][prompt]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Displays the previous history string in a prompt. This
function is only for use within prompts.
returns: nothing
see also: gethistname, nexthist
prevwindow [Lib][win]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Switches the focus to the previous window on the screen.
returns: nothing
see also: nextwindow
example: printbuf
// prints the current buffer to the device 'prn'
printbuf "c:\\print.txt"
// prints the current buffer to the file 'c:\\print.txt'
printbuf "lpt1" "Inventory" "abc"
// prints the buffer 'abc' to the device 'prn' using
// the header/footer 'Inventory'
returns: nothing
see also: printblock, printbuf
priority value
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Sets the priority for dispatching editor events in a
multitasking environment. A value of zero yields the most
time slices to the operating system, whereas a value of
-1 yields no time slices. Other values are system
dependent.
returns: nothing
see also: System.aml
process
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Creates an editor subprocess by invoking the editor
recursively. This function does not return until the
'endprocess' function is called. The effect of this
function is equivalent to the following loop:
whiledispatchdo
:
end
returns: nothing
see also: dispatch, endprocess
purgequeue
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Removes all events from the event queue.
returns: nothing
see also: queue, queueobject, sizequeue
pushcursor buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Saves the cursor position on an internal cursor stack
which is unique for each buffer. If 'buffer' is null or
not specified, the current buffer is assumed.
returns: nothing
see also: popcursor
returns: nothing
see also: geteventcode, getkey, sendkey
rand seed
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Generates a random number between 0 and 2147483647. The
random number generator can be initialized by specifying
a random number 'seed'.
redo buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Reverses the changes made by the last 'undo' function
call for a specific buffer. If 'buffer' is null or not
specified, then the current buffer is assumed.
returns: TRUE if successful, otherwise null.
see also: undo, undobegin, undocursor, undoend
example: reopen
// refreshes the current file from disk
reopen "c:\\file.txt"
// loads c:\file.txt into the current window,
// destroying the existing buffer in the window
resident [0/1]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Forces the currently executing macro (invoked by the
runmacro function) to remain resident or to be discarded
after the macro is finished executing.
returns: nothing
example: row 1
// moves the cursor to line 1 in the current buffer
row (getlines)
// moves the cursor to the last line in the current
// buffer
example: save
// saves the current buffer to the file name specified
// by the name of the buffer
save "c:\save.txt"
// saves the current buffer to c:\save.txt
example: currdesk
// set current desktop to the current window layout
savedesk "c:\\desktop.dst"
// save the current desktop to c:\desktop.dst
returns: The absolute position in the file where the search string
was found (starting with one), or zero if not found. If
the scan was interrupted by <ctrl break>, then zero is
returned.
example: scrollcol 4
// scrolls the current window so that the leftmost
// column in the window is 4. The cursor moves
// accordingly.
example: scrollrow 4
// scrolls the current window so that the topmost
// line in the window is 4. The cursor moves
// accordingly.
returns: nothing
see also: geteventcode, getkey, queuekey, send, sendobject
returns: nothing
see also: destroyvar, lookup, setfunction, variable?
setalarm timerid year mon day dayofweek hour min second object
function arg1 arg2 ...
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Sets a timer to call 'function' automatically at the
specified date and time. If -1 is specified for for any
of the date or time parameters, the timer will call the
function for any value of that parameter (the parameter
becomes a 'wildcard').
setbootpath path
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Changes the editor 'boot' path for the current session.
returns: nothing
see also: bootpath, getbootpath
i - inward 3D effect
o - outward 3D effect
s - attempts to change the size of other parts of the
window to accommodate the new border style, without
changing the overall size of the window.
0 - use 'expanded' borders (the default)
1 - single line
2 - double horizontal
3 - double vertical
4 - double line
5 - solid
6 - blank
returns: nothing
see also: getborder, setframe, setshadow
example: setborder
// removes the border
setborder "1i"
// sets the border style to a single-line border with
// an inward 3D effect
setborder '0' 2 2 3 3
// sets the border style to an 'expanded' border with
// border width 2 and corner size 3
returns: nothing
see also: getbufname
returns: nothing
see also: getbuftabs, undo, redo
0 - border
1 - border corners
2 - north and east titles
3 - south and west titles
4 - title bar controls
5 - text
6 - marks
7 - scroll bars
8 - menus
9 - menu character highlight
10 - menu disable
11 - menu bar highlight
12 - end-of-text line
13 - border highlight color
14 - folds
15 - modified lines
16 - modified line at the cursor
17 - open fold begin
18 - open fold end
returns: nothing
see also: getcolor
example: setcolor 5 95
// sets the window text color to white on magenta
setcolor 6 32
// sets the mark default color to black on green
setdisplay [-1/0/1]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Enables (1) or disables (0) updating of the display. Note
that any operations involving window sizing, movement, or
reordering will still update the display, even if the
display is disabled with this function.
returns: nothing
see also: display
0 - single lines
1 - double horizontal lines
2 - double vertical lines
3 - double horizontal and vertical lines
4 - eraser
returns: nothing
see also: setting
example: setdraw 3
// sets the line drawing style to double horizontal
// and vertical lines
returns: nothing
see also: constant, #exec, geterror
seteventobj object
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Changes the current event object to the specified object.
The current event object is the object where events are
dispatched by the editor. If 'object' is not specified,
the current (executing) object is assumed.
a - archive
h - hidden
r - read-only
s - system
null - no attributes
b - border
e - east title bar
h - horizontal scroll bar
m - primary menu bar
n - north title bar
s - south title bar
v - vertical scroll bar
w - west title bar
z -
south title controls
2 -
menu bar 2 (north)
3 -
menu bar 3 (north)
4 -
menu bar 4 (south)
5 -
menu bar 5 (west)
> -
place north title bar in the window border
(for bordertype > 0)
< - place south title bar in the window border
(for bordertype > 0)
returns: nothing
see also: frame?, setborder, setshadow
example: setframe
// removes all frame components from the current window
setframe "bn"
// replaces the current window frame components with
// a border and a north title bar
setframe "+s"
// adds a south title bar to the current window
returns: nothing
see also: destroyvar, function?, lookup, set
returns: nothing
see also: inheritkeys, object, objtype?, settype
returns: nothing
see also: setborder, setframe, setshadow2
example: setshadow
// removes any shadows from the current window
setshadow 2 1
// sets the shadow thickness to 2 on the right border
// and 1 on the bottom border
returns: nothing
see also: setshadow
a - Autoindent
b - Backup
d - Draw mode
h - Hex view
i - Insert mode
l - Live Word Wrap
m - Match Character
s - Smart tabs
t - Translate
u - Undo enabled
v - Variable tabs
w - Word Wrap (standard)
x - Syntax Highlighting
returns: nothing
see also: getsettings, setting?
example: settings "abu" 1
// turns On autoindent, backup, and undo
settings "xd" 0
// turns Off syntax highlighting and drawmode
settings "w" -1
// toggles word wrap
returns: nothing
see also: inheritkeys, object, objtype?, setobjtype
returns: nothing
see also: getwinobj, seteventobj
example: shiftblock -1
// shifts the text in default markid one space to the
// left
shiftblock 1 '' '>'
// shifts the text in the default markid one space to
// the right, filling empty spaces with '>'
shiftkey? shiftstate
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the specified shift key(s) are currently pressed
down. 'shiftstate' can be any combination of the
following values bitwise-ORed together:
example: shiftkey?
// tests if the left or right shift keys are pressed
shiftkey? 12h
// tests if the <ctrl> or <alt> keys are pressed
returns: nothing
see also: msgbox, okbox, say, yncbox
returns: nothing
see also: hidecursor
example: showcursor 0 99
// sets the cursor size to fill the entire char cell
showcursor 50 99
// sets the cursor size to fill the bottom half of
// the character cell
showdialog [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tags the current dialog box as a 'modeless' dialog box.
The dialog box will function as an independent window on
the desktop (existing windows on the screen can be placed
on top of a modeless dialog box). This function returns
immediately, without actually displaying the dialog box.
returns: nothing
see also: dialog, getdialog, whenenter, whenselect
showentry
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Temporarily displays the screen as it appeared in Dos
immediately before the editor was started. Pressing any
key or mouse button will restore the editor screen.
returns: nothing
see also: display
showmouse
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Shows the mouse pointer.
returns: nothing
see also: hidemouse
showwindow window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Re-displays a window that was previously hidden with the
'hidewindow' function. If 'window' is null or not
specified, then the current window is assumed.
returns: nothing
see also: hidewindow
sizekey [Lib][win]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Resizes the current window using the cursor keys.
returns: nothing
see also: pankey, sizewin
sizequeue size
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Removes all events from the event queue and changes the
event queue size to 'size' events. Values of 5 through
200 may be specified. The default queue size is 20 when
the editor is started.
returns: Non-zero if successful, otherwise zero.
see also: dispatch, process
returns: nothing
see also: movewindow, sizewindow
example: sizewindow -1 -1 1 1
// expands the current window size by 1 in all four
// directions
sizewindow 0 0 0 0 "rd"
// sizes the current window to fill the entire screen
// with all the borders visible
sizewindow 6 5 72 20 "ad"
// sizes the current window relative to the upper
// left corner of the screen
sizewindow 6 5 72 20 "a1" '' "abc"
// sizes the current window relative to the upper
// left corner of the client area of window 'abc'
For column marks, the text between the left and right
edges of the mark is used as the sort key.
For line marks, the text between 'column' and the end of
the line is used as the sort key. If 'column' is not
specified, one is assumed.
For all other marks, the entire line is used as the sort
key. In any case, all lines spanned by the mark are
sorted, not just the text within the mark.
speaker [0/1]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Enables (1) or disables (0) sound from the PC speaker.
returns: nothing
see also: beep
example: splitline
// splits the current line at the cursor in the
// current buffer
splitline 10
// splits the current line at column 10
stopmark mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Closes an 'open' mark created with the markline,
markcolumn, markchar, or markstream functions. This stops
the automatic extension of the mark when the cursor is
moved. If 'mark' is not specified, the default markid is
assumed.
returns: nothing
see also: extendmark, markchar, markcolumn, markline, markstream
i - ignore case
r - search in reverse from the end of the string
w - whole words only
x - use regular expressions (see Regexp.dox)
b -
highlighting shows through marked blocks
c -
enable highlighting for the cursor line
d -
enable highlighting for closed fold lines
f -
use only the foreground portion of the specified
colors, and use the existing background color of
the window
i - ignore keyword case
n - automatically highlight numbers
returns: nothing
see also: getsyntax, keyword, setsyntax
thousands number
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts a number into a thousands-separated string. The
'international' function determines what thousands
separator character is used.
returns: nothing
see also: cascade, splitwin, tilewindow
example: tilewindow
// tiles all windows horizontally on the screen
tilewindow 'lv'
// vertically tiles any windows which display
// the same buffer as the current window
timer? timerid
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if the specified timer is active.
returns: TRUE if timerid is active, otherwise null.
see also: destroytimer, setalarm, settimer
toolbar [Lib][edit]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Toggles the display of a toolbar on the current edit
window. The toolbar is defined in Menu.aml.
returns: nothing
see also: togglestyle
touchfile filename
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Changes the last-modified date and time for the specified
file to the current date and time.
returns: Non-zero if successful, otherwise zero.
see also: copyfile, setfileattr
trackmouse [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Moves the cursor to the mouse pointer in the current
buffer.
returns: nothing
see also: getmousex, getmousey, mousepos, virtocol, virtorow
undo buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Reverses the changes made by the last undoable function
(or group of functions marked with undobegin - undoend)
for a specific buffer. If 'buffer' is null or not
specified, then the current buffer is assumed.
returns: TRUE if successful, otherwise null.
see also: redo, undobegin, undoend
undobegin
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Marks the beginning of a group of function calls which
are considered to be one undoable/redoable editing
operation. The group is terminated by a matching
'undoend' function. 'undobegin' and 'undoend' pairs may
be nested.
returns: nothing
see also: redo, undo, undocursor, undoend
undocursor buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Saves the current window size, window view, and cursor
position on the undo/redo stack as one undoable
operation. If 'buffer' is null or not specified, then the
current buffer is assumed.
returns: nothing
see also: redo, undo, undobegin, undoend
undoend
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Marks the end of a group of undoable/redoable function
calls started with the 'undobegin' function (see
'undobegin' above).
returns: nothing
see also: redo, undo, undobegin
returns: nothing
see also: redo, undo, undobegin, undoend
example: undosize
// disables undo for the current buffer
undosize 200
// deletes the current undo stack and sets the undo
// stack size for the current buffer to 200
// editing operations
up rows buffer
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Moves the cursor upward. 'rows' specifies the number of
lines to move. If 'rows' is not specified, then one is
assumed. If 'buffer' is null or not specified, the
current buffer is assumed.
upcase string
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Converts a string to uppercase.
returns: the string in uppercase.
see also: flipcase, locase
example: upcase "peaches" // returns "PEACHES"
usemark mark
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Sets the default markid to 'mark'. If 'mark' is not
specified, the markid '*' is assumed. When the editor is
started, the default markid is '*'.
videoborder color
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Changes the video overscan border color to the specified
color.
returns: nothing
returns: nothing
see also: setvideo
returns: nothing
see also: dialog, getdialog, showdialog, whenselect
returns: nothing
see also: dialog, getdialog, showdialog, whenenter
window? window
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Tests if a window exists. If 'window' is not specified,
the current window is assumed.
returns: TRUE if the window exists, otherwise null.
see also: frame?, wintype?
z - resizeable window
winlist [Lib][a]
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: Displays a list of open windows. If a window is selected,
it becomes the current window.
returns: nothing
see also: currwin
- Hex View
- Live Word Wrap
- Match Character
- Standard Word Wrap
- Translate
returns: nothing
see also: instext, ovltext, writetext
returns: nothing
see also: fillrect, getattr, getstr, getx, gety, gotoscreen,
gotoxy, hilite, writestr
returns: nothing
#"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$
% Builtin Events %
&"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'
<destroy>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor (A.exe) to an object
immediately before it is destroyed. It can be used to
perform cleanup tasks in external macros, such as closing
windows, setting flags, destroying buffers, timers, etc.
returns: None required
<display>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor (A.exe) to the current
event object immediately after the display is updated.
see also: <paint>, <status>
<loading> linenumber
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor (A.exe) as a file is
being loaded, and can be used to show progress when
loading a file.
<loading> is sent directly to the current event object
and is passed the line number of the last line loaded.
After the file is loaded, <loading> is sent again with no
arguments.
returns: none required
see also: <compiling>, <printing>, <saving>
example: see the configuration file Ext.aml
<paint>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor (A.exe) immediately
after a window client area is updated (the 'd' window
flag must be turned on - see the 'windowflag' function).
<paint> can be used to perform custom drawing or
highlighting of the window client area.
<printing> linenumber
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is called by the editor (A.exe) as a file is
being printed, and can be used to show progress when
printing a file.
<saving> linenumber
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor (A.exe) as a file is
being saved, and can be used to show progress when saving
a file.
<status>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
remarks: This event is sent by the editor (A.exe) immediately
before an edit window status line is updated (the 's'
window flag must be turned on - see the 'windowflag'
function). The return value of <status> will become the
actual status line, allowing the status line to be
customized.
<status> is sent directly to the window event object with
no arguments. Before calling this function, the editor
sets the current window, current event object, and
current buffer to those values associated with the window
being drawn.