askusingform

summary: advanced usage of the form API

description:

How to query for complex user input, using IDA’s built-in forms.

Note: while this example produces full-fledged forms for complex input, simpler types of inputs might can be retrieved by using ida_kernwin.ask_str and similar functions.

keywords: forms

level: advanced

Classes

busy_form_t

multiline_text_t

Simple Form to test multilinetext

multiline_text_and_dropdowns_t

Simple Form to test multilinetext and combo box controls

Module Contents

class askusingform.busy_form_t

Bases: ida_kernwin.Form

class test_chooser_t(title, nb=5, flags=ida_kernwin.Choose.CH_MULTI)

Bases: ida_kernwin.Choose

A simple chooser to be used as an embedded chooser

items
icon = 5
OnGetLine(n)

Get data for an element

This callback is mandatory

Parameters:

n – the index to fetch data for

Returns:

a list of strings

OnGetSize()

Get the number of elements in the chooser.

This callback is mandatory

Returns:

the number of elements

invert = False
OnButton1(code=0)
OnButton2(code=0)
OnFormChange(fid)
static compile_and_fiddle_with_fields()
static test()
class askusingform.multiline_text_t

Bases: ida_kernwin.Form

Simple Form to test multilinetext

OnFormChange(fid)
static test(execute=True)
class askusingform.multiline_text_and_dropdowns_t

Bases: ida_kernwin.Form

Simple Form to test multilinetext and combo box controls

OnButtonNop(code=0)

Do nothing, we will handle events in the form callback

OnFormChange(fid)
static test(execute=True)
NON_MODAL_INSTANCE = None
static test_non_modal()