Scripts window

Overview
Invocation
Tabs
Snippets
Managing snippets

Recent scripts

Examples

Search


Running scripts
The editor

Import as snippet


Export for headless use
Configuration
Related topics
Last updated
Was this helpful?
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 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.
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.
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.
The snippet toolbar / context menu provides:
Clone — duplicate the selected snippet;
Import from file... / Export to file... — move snippets to and from disk;
Run current... — execute the selected snippet;
Change tab size... — set the editor's tab width.

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 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.

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.

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

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 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.

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.


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.
Script command... — the command-line input line at the bottom of the IDA window.
Last updated
Was this helpful?
Was this helpful?
# Auto-generated 'headless' prologue
import idapro
idapro.open_database(r"/path/to/file.i64", run_auto_analysis=True)