Password dialog

Syntax1

inpp password [text] [caption] [flags] [hwndowner]

 

Syntax2

int inpp(password [text] [caption] [flags])

 

Parts

password - user must enter this password. Case sensitive, unless flag 1 is used. Can be encrypted (in Options -> Security, use "inpp" as function name) (QM 2.1.8.5).

text - text above password field. Default: "" ("Password:").

caption - dialog box title. Default: "" ("QM - Password").

flags - combination of the following values: 1 - password is case insensitive. Default: 0.

hwndowner (QM 2.2.1) - owner window handle. The dialog box will be on top of the owner window. The owner window, if belongs to the same thread, will be disabled. Default: 0.

 

Remarks

Shows password input dialog box. If entered password is incorrect, or pressed Cancel, silently ends macro.

 

If used as function (syntax2), does not end macro, but returns 1 if correct password is entered, or 0 if not.

 

Tips: you can also encrypt macro in Options -> Security.

 

Examples

 Ask for password, and end macro if entered password is not "55hH7pKJ":
inpp "55hH7pKJ"

 Ask for password, and throw error if entered password is not "bnfg" (in code it is encrypted):
if(!inpp("[*E12073E7509E09F804*]" "" "" 1)) end "password incorrect"