For the complete documentation index, see llms.txt. This page is also available as Markdown.

Scripts window

The Scripts window is IDA's home for running and managing scripts. It is a dockable window organized into four vertical tabs — Snippets (stored in the IDB), Recent scripts (external files), Examples and Search — each backed by its own tree of scripts and a shared editor pane.

The Scripts window, showing the Snippets tab

Overview

The window is split into three areas:

  • the vertical tab strip on the left, selecting the active source (Snippets, Recent scripts, Examples, Search);

  • the source tree, listing the scripts of the active tab — with a Last run column showing when each entry was last executed (hover for the absolute timestamp);

  • the editor pane, showing the selected script, together with a language indicator and run controls.

The dock title reflects the active tab (for example Scripts - Snippets), and the active tab is remembered across desktop save/restore.

Invocation

  • Open it from the View menu, or press Alt+F9 (Recent scripts) to open it directly on the Recent scripts tab.

  • The window is dockable; it can be tabbed or floated like any other IDA widget.

Tabs

Snippets

Snippets are short scripts stored inside the IDB, so they travel with the database. They are editable in place, and the tab remembers the last-selected snippet and a per-IDB tab size.

When no database is loaded, the tab works in scratch mode, backed by an implicit default snippet, so snippets can still be edited and run.

Managing snippets

The snippet toolbar / context menu provides:

The Snippets context menu

Recent scripts

The external script files you have run, tracked by their path on disk. Each row carries a language icon (Python or IDC), and single-child folder chains are coalesced so the tree stays shallow. Entries are shown read-only in the editor; from here you can run them or import them as snippets.

The Recent scripts tab

Examples

The IDAPython examples shipped with IDA, browsable directly inside the window. Like Recent scripts, entries are read-only and can be run or imported as snippets.

The Examples tab

Searches across all three sources — Snippets, Recent scripts and Examples — at once. Selecting a hit previews it, with the matching line highlighted in the editor.

The Search tab, with a hit selected and its matching line highlighted

Double-clicking a hit (or pressing Enter) jumps to its native tab, scrolled to the matched line.

Activating a hit jumps to its source tab

Running scripts

A selected entry can be run by pressing Enter, double-clicking it, or using the Run control. The Last run column records when each entry was last executed. Snippets run with or without a database (see scratch mode above).

The editor

The editor shows the selected script. Snippets are editable; Recent scripts and Examples are shown read-only. A language indicator shows the script's interpreter (Python or IDC) — editable for snippets, fixed for the other sources. Press Ctrl+Space for auto-completion while editing; the completion list is dismissed with Esc, and pressing Ctrl+Space again brings it back.

Auto-completion in the editor

Import as snippet

From the Recent scripts or Examples tab, Import as snippet copies the selected script into a new snippet and selects it on the Snippets tab, so it can be edited and kept with the database.

Import as snippet in the Recent scripts context menu
The imported script, now an editable snippet on the Snippets tab

Export for headless use

From the Snippets tab, Export Headless... saves the selected snippet to a file on disk, in a headless form. Then, the exported script can be run directly with idalib, no IDA GUI required.

To do so, it prepends an auto-generated prologue that opens the current database via idalib.

Configuration

Last updated

Was this helpful?