Retrieve the display status, position, and size of the VT window in Tera Term. (version 5.3 or later)
getttpos <showflag> <window x> <window y> <window width> <window height> <client x> <client y> <client width> <client height>
The units for coordinates, width, and height are pixels.
The origin (0,0) refers to the top-left corner of the main display (primary display).
The window area refers to the entire application window, while the client area refers to the text display area excluding the title bar, menu bar, frame etc from the window area.
If the VT window is in a minimized or hidden state, the stored values for coordinates, width, and height are incorrect.
If the MACRO is not linked to Tera Term, it will result in a macro error and the execution of the macro will be temporarily paused.
testlink
if result > 0 then
:start
getttpos showflag w_x w_y w_width w_height c_x c_y c_width c_height
if showflag != 3 then
if showflag = 1 then
showtt 1
goto start
endif
setdlgpos c_x c_y
sprintf2 str 'x=%d, y=%d, width=%d, height=%d' c_x c_y c_width c_height
messagebox str 'Client Area'
endif
endif