tabs
tabs: (Ui) -> TabsThe interface tabs.
The game's interface: tabs, keys, dialogues, widgets, and the host's dialogs.
ui| Method | Returns | Description |
|---|---|---|
tabs() | Tabs | The interface tabs. |
pressKey(number) | boolean | Press and release a key. true means queued. |
typeText(string, boolean?) | boolean | Type a string as key presses, sent to whatever has keyboard focus. It does not click a text field or give one focus: a box that takes keys… |
dialogue() | Dialogue | The open dialogue. |
widgets() | WidgetQuery | The interface registry as a QUERY, narrowed in Rust. |
messageDialog(MessageDialogSpec, (() -> ())?) | number | A message box: the immediate-mode alternative to JOptionPane.showMessageDialog; in the Swing retained UI, use JOptionPane itself. Non-b… |
confirmDialog(ConfirmDialogSpec, (number?, string?) -> ()) | number | A question with buttons: the immediate-mode alternative to JOptionPane.showConfirmDialog; in the Swing retained UI, use JOptionPane its… |
inputDialog(InputDialogSpec, (string?) -> ()) | number | A text prompt: the immediate-mode alternative to JOptionPane.showInputDialog; in the Swing retained UI, use JOptionPane itself. Drawn o… |
colorPicker(ColorPickerSpec, (Color) -> (), ((Color) -> ())?) | number | A colour picker: the alternative to ColorPickerManager. Drawn over the game, non-blocking; the callbacks run in the plugin's ticks. With… |
fileOpen(FileOpenSpec, (string?, string?) -> ()) | number | Open a file: the alternative to JFileChooser#showOpenDialog. The plugin never sees a path. Drawn over the game, non-blocking; the callbac… |
fileSave(FileSaveSpec, ((boolean, string?) -> ())?) | number | Save a file: the alternative to JFileChooser#showSaveDialog. Drawn over the game, non-blocking; the callback runs in one of the plugin's… |
openUrl(string, ((boolean, string?) -> ())?) | number? | Open an http(s) link in the browser, at once, with no confirmation. A marketplace plugin opens only an https link to oldschool.runescap… |
closeDialog(number) | boolean | Close a dialog this plugin opened. Its callback never runs. |
dialogOpen(number) | boolean | Whether a dialog this plugin opened is still up. |
tabstabs: (Ui) -> TabsThe interface tabs.
pressKeypressKey: (Ui, number) -> booleanPress and release a key. true means queued.
For an "Enter amount" prompt, ui:dialogue():typeAmount(n) types the amount and Enter, only while the prompt is open.
ui:pressKey(KeyEvent.VK_ESCAPE)vkKeyEvent.VK_* code. Enter is KeyEvent.VK_ENTER, 10.typeTexttypeText: (Ui, string, boolean?) -> booleanType a string as key presses, sent to whatever has keyboard focus. It does not click a text field or give one focus: a box that takes keys only once it is clicked gets nothing until it is. true means queued, not typed: nothing checks where the keys landed.
textpressEnterdialoguedialogue: (Ui) -> DialogueThe open dialogue.
widgetswidgets: (Ui) -> WidgetQueryThe interface registry as a QUERY, narrowed in Rust.
Filters run in Rust before anything crosses into Luau; the terminals hand out Widget handles.
messageDialogmessageDialog: (Ui, MessageDialogSpec, (() -> ())?) -> numberA message box: the immediate-mode alternative to JOptionPane.showMessageDialog; in the Swing retained UI, use JOptionPane itself. Non-blocking: it returns at once. Drawn over the game, naming the plugin that opened it; the callback runs in one of the plugin's ticks after the user answers. With eight open, the ninth raises.
speconCloseconfirmDialogconfirmDialog: (Ui, ConfirmDialogSpec, (number?, string?) -> ()) -> numberA question with buttons: the immediate-mode alternative to JOptionPane.showConfirmDialog; in the Swing retained UI, use JOptionPane itself. Drawn over the game, non-blocking; the callback runs in one of the plugin's ticks after the user answers. With eight open, the ninth raises.
speconResultnil when the window was closed.inputDialoginputDialog: (Ui, InputDialogSpec, (string?) -> ()) -> numberA text prompt: the immediate-mode alternative to JOptionPane.showInputDialog; in the Swing retained UI, use JOptionPane itself. Drawn over the game, non-blocking; the callback runs in one of the plugin's ticks after the user answers. With eight open, the ninth raises.
speconResultnil on cancel.colorPickercolorPicker: (Ui, ColorPickerSpec, (Color) -> (), ((Color) -> ())?) -> numberA colour picker: the alternative to ColorPickerManager. Drawn over the game, non-blocking; the callbacks run in the plugin's ticks. With eight open, the ninth raises.
speconCloseonChangefileOpenfileOpen: (Ui, FileOpenSpec, (string?, string?) -> ()) -> numberOpen a file: the alternative to JFileChooser#showOpenDialog. The plugin never sees a path. Drawn over the game, non-blocking; the callback runs in one of the plugin's ticks after the user answers. With eight open, the ninth raises.
speconResultnil on cancel.fileSavefileSave: (Ui, FileSaveSpec, ((boolean, string?) -> ())?) -> numberSave a file: the alternative to JFileChooser#showSaveDialog. Drawn over the game, non-blocking; the callback runs in one of the plugin's ticks after the user answers. With eight open, the ninth raises.
speconResultopenUrlopenUrl: (Ui, string, ((boolean, string?) -> ())?) -> number?Open an http(s) link in the browser, at once, with no confirmation. A marketplace plugin opens only an https link to oldschool.runescape.wiki, runescape.wiki or runescape.com (or a subdomain of one). Any other link raises.
onDoneonDone, through which the answer comes; else nil.closeDialogcloseDialog: (Ui, number) -> booleanClose a dialog this plugin opened. Its callback never runs.
dialogOpendialogOpen: (Ui, number) -> booleanWhether a dialog this plugin opened is still up.