Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alert boxes with perl

Status
Not open for further replies.

sun9

Programmer
Dec 13, 2006
31
US
hi,

Is it possible to create alert boxes like in javascript using perl?

Thanks.
 
Do you mean from a web page? If so I usually just use perl to write out javascript to call alert :)
 
alert box in a console, probably, alert box on a web page, no. Use javascript for that like travs69 says.

- Kevin, perl coder unexceptional!
 
To make an alert box from the console, look into the Win32 module. Specifically:

Code:
Win32::MsgBox(MESSAGE [, FLAGS [, TITLE]])

    [EXT] Create a dialogbox containing MESSAGE. FLAGS specifies the required icon and buttons according to the following table:

            0 = OK
            1 = OK and Cancel
            2 = Abort, Retry, and Ignore
            3 = Yes, No and Cancel
            4 = Yes and No
            5 = Retry and Cancel

            MB_ICONSTOP          "X" in a red circle
            MB_ICONQUESTION      question mark in a bubble
            MB_ICONEXCLAMATION   exclamation mark in a yellow triangle
            MB_ICONINFORMATION   "i" in a bubble

    TITLE specifies an optional window title. The default is "Perl".

    The function returns the menu id of the selected push button:

            0  Error

            1  OK
            2  Cancel
            3  Abort
            4  Retry
            5  Ignore
            6  Yes
            7  No

-------------
Cuvou.com | The NEW Kirsle.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top