{% extends "base.html" %} {% block title %}Macro Subroutines (24){% endblock %} {% block content %}
These variables are read-only and cannot be changed by direct assignment.
$1
, $2
, $3
, $4
, $5
, $6
, $7
, $8
, $9
$args[expr]
$active_pane
$auto_indent
$calltip_ID
$cursor
$column
$display_width
$em_tab_dist
$empty_array
$file_format
$file_name
$file_path
$font_name
$font_name_bold
$font_name_bold_italic
$font_name_italic
$highlight_syntax
$incremental_backup
$incremental_search_line
$language_mode
$line
$locked
$make_backup_copy
$max_font_width
$min_font_width
$modified
$VERSION
$n_display_lines
$n_panes
$overtype_mode
$read_only
$selection_start, $selection_end
$selection_left, $selection_right
$server_name
$show_line_numbers
$show_matching
$match_syntax_based
$statistics_line
$sub_sep
$tab_dist
$text_length
$top_line
$use_tabs
$wrap_margin
$wrap_text
append_file( string, filename )
beep()
calltip( "text_or_key" [, pos [, mode or position_modifier, ...]] )
Pops up a calltip. <pos> is an optional position in the buffer where the tip will be displayed. Passing -1 for <pos> is equivalent to not specifying a position, and it guarantees that the tip will appear on-screen somewhere even if the cursor is not. The upper-left corner of the calltip will appear below where the cursor would appear if it were at this position.
<mode> is one of "tipText" (default), "tipKey", or "tagKey". "tipText" displays the text as-is, "tagKey" uses it as the key to look up a tag, then converts the tag to a calltip, and "tipKey" uses it as the key to look up a calltip, then falls back to "tagKey" behavior if that fails. You'll usually use "tipKey" or "tipText".
Finally, you can modify the placement of the calltip relative to the cursor position (or <pos>) with one or more of these optional position modifiers: "center" aligns the center of the calltip with the position. "right" aligns the right edge of the calltip with the position. ("center" and "right" may not both be used.) "above" places the calltip above the position. "strict" does not allow the calltip to move from its position in order to avoid going off-screen or obscuring the cursor.
Returns the ID of the calltip if it was found and/or displayed correctly, 0 otherwise.
clipboard_to_string()
dialog( message, btn_1_label, btn_2_label, ... )
filename_dialog( [title[, mode[, defaultPath[, filter[, defaultName]]]]] )
Presents a file selection dialog with the given title to the user that prompts for a new or existing file.
Options are: title will be the title of the dialog, defaults to "Choose file". If mode is set to "exist" (default), the "New File Name"TextField of the FSB will be unmanaged. If "new", the TextField will be managed. defaultPath is the default path to use. Default (or "") will use the active document's directory. filter is the file glob which determines which files to display. Is set to "*" if filter is "" and by default. defaultName is the default filename that is filled in automatically. (Note that the default_filename argument does not work on all Motif implementations.)
Returns "" if the user cancelled the dialog, otherwise returns the fully-qualified path, including the filename.
focus_window( window_name )
get_character( position )
get_range( start, end )
get_selection()
getenv( name )
kill_calltip( [calltip_ID] )
length( string )
list_dialog( message, text, btn_1_label, btn_2_label, ... )
max( n1, n2, ... )
min( n1, n2, ... )
read_file( filename )
replace_in_string( string, search_for, replace_with [, type, "copy"] )
replace_range( start, end, string )
replace_selection( string )
replace_substring( string, start, end, replace_with )
revert_to_saved()
search( search_for, start [, search_type, wrap, direction] )
search_string( string, search_for, start [, search_type, direction] )
select( start, end )
select_rectangle( start, end, left, right )
set_cursor_pos( position )
shell_command( command, input_string )
split(string, separation_string [, search_type])
string_dialog( message, btn_1_label, btn_2_label, ... )
string_compare(string1, string2 [, consider-case])
string_to_clipboard( string )
substring( string, start [, end] )
t_print( string1, string2, ... )
tolower( string )
toupper( string )
valid_number( string )
write_file( string, filename )
Some functions are included only for supporting legacy macros. You should not use any of these functions in any new macro you write. Among these are all action routines with hyphens in their names; use underscores instead ('find-dialog' → 'find_dialog').
match()