Link Search Menu Expand Document

Windows

Функции


create_win

funcX

void create_win(string winName, int x, int y, int width, int height, int flags)

flags argument is optional. Works just like vanilla CreateWin function, but creates a window with MoveOnTop flag if the flags argument is not specified, and allows to set additional flags for the created window. MoveOnTop flag allows the created window to be placed on top of the game interface.


get_window_attribute

int sfall_func1("get_window_attribute", int winType)

Alternative form: int sfall_func2("get_window_attribute", int winType, int attrType) Returns the attribute of the specified interface window by the attrType argument.

  • winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
  • attrType: 0 - checks and returns a value of 1 if the specified interface window is created by the game (same as without the argument) 1 - X position, 2 - Y position (relative to the top-left corner of the game screen) 3 - interface width size, 4 - interface height size -1 - returns an associative array of keys (left, top, right, bottom) and values that define the position of the window rectangle (use standard syntax to access array values, e.g. winRect.top, winRect.bottom)
  • returns -1 if the specified attribute cannot be obtained

get_window_under_mouse

int get_window_under_mouse()

hide_window

funcX

hide_window(winName)
void sfall_func0("hide_window")
void sfall_func1("hide_window", string winName)

Hides the specified or currently active (selected) script window.

  • winName: the window name, assigned to the window by the CreateWin, or create_win functions.

set_window_flag

funcX

void set_window_flag(string winName/int winID, int flag, bool value)

Changes the specified flag for the created script or game interface window.

  • winName: the window name, assigned to the window by the CreateWin/create_win function
  • winID: the ID number of the interface or script window obtained with the get_window_under_mouse function, or 0 for the current game interface
  • flag: the flag to change (see WIN_FLAG_* constants in define_extra.h)
  • value: true - set the flag, false - unset the flag

show_window

funcX

show_window(winName)
void sfall_func0("show_window")
void sfall_func1("show_window", string winName)

Displays the specified hidden script window or the one previously hidden with the sfall_func0("hide_window") function.

  • winName: the window name, assigned to the window by the CreateWin/create_win function.