Jump to content

Recommended Posts

Posted

Just an FYI, with the following code: hitting "ESC" on the inputbox would generate a $temp with a value of "" and @error with a value of zero....

ToggleKeys("ON")
$temp = InputBox("SSN Entry", "Please enter Social", "", "", -1, -1, @DesktopWidth / 4, @DesktopHeight / 3)
ToggleKeys("OFF")
Select
    Case @error = 1
        MyExit (100) ; cancel
    Case @error = 2
        MyExit (200) ; timeout
    Case @error = 3
        MyExit (300) ; faiure
EndSelect
    _cs ($c, "{end}" & $temp & "{numpadenter}")
Sleep(175)
$temp = waitscreen ($c, "end of matching ssn", 10)
If @error > 0 Or $temp < 1 Then MyExit (400)
oÝ÷ Ø%¹Øv)Ú§]ب©jǬµ«^éí¶^²×è®Ë©Þ½éí¹©b·&®¶­s`¢66Rb33c·FV×ÒgV÷C²gV÷C²æBW'&÷"Ò¢×WBS²77VÖRW66Rv2&W76V@

Is the current return value expected behaviour on the inputbox when "ESC" is pressed?

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Posted

Your code is unworkable in it's present state.

But this InputBox() does return "Cancel" when "Esc" is pressed.

InputBox("SSN Entry", "Please enter Social", "", "", -1, -1, @DesktopWidth / 4, @DesktopHeight / 3)
Switch @error
    Case 0
        MsgBox(0, '', 'Valid', 3)
    Case 1
        MsgBox(0, '', 'Cancel', 3)
    Case 2
        MsgBox(0, '', 'Timeout', 3)
    Case 3
        MsgBox(0, '', 'Failed to open Inputbox', 3)
EndSwitch

Seems fine to me.

Perhaps you are checking ToggleKeys() for @error instead?

:)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...