Jump to content

My script using inputbox is not working...


Go to solution Solved by redpicker,

Recommended Posts

Posted (edited)

I am trying to get some simple input from a user.

I'm trying to use the inputbox() function.  It was working and then it stopped.

I've included the code below.  I've tried it interpreted and compiled and on multiple machines with the same result it displays the msgbox, but never the inputbox.

Oh my dev system is a Dell m6800 laptop, running windows 8.1 enterprise

#include <MsgBoxConstants.au3>
Local $sAnswer

;$sAnswer = InputBox("Backup Single User by ID", "Enter User ID of Single User to Migrate?", "", "", -1, -1,-1, -1, 30)

$sAnswer = InputBox("TITLE", "Type Something","","",-1, -1, -1, -1 )

MsgBox($MB_SYSTEMMODAL, "", $sAnswer)
Edited by Chuckconnor
Posted

Why all the stuff after your prompt?

This seems to work just fine"

#include <MsgBoxConstants.au3>
Local $sAnswer
$sAnswer = InputBox("TITLE", "Type Something")
MsgBox($MB_SYSTEMMODAL, "", $sAnswer)
Posted (edited)

I think its something in the options I'm trying to use.  I want it to time out at 30 seconds if no answer.

When I take out all of the options my code works fine.

Edited by Chuckconnor
  • Solution
Posted

OK, you have to replace the last two -1's with "Default"

Like this

#include <MsgBoxConstants.au3>

Local $sAnswer

$sAnswer = InputBox("TITLE", "","", "" ,-1,-1,Default,Default, 30 )

MsgBox($MB_SYSTEMMODAL, "", $sAnswer)

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
×
×
  • Create New...