Jump to content
Sign in to follow this  
Chuckconnor

My script using inputbox is not working...

Recommended Posts

Chuckconnor

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

Share this post


Link to post
Share on other sites
redpicker

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)

Share this post


Link to post
Share on other sites
Chuckconnor

Don't know why but I copied your code and it works fine on my system.

I'm not sure why my code won't.

Share this post


Link to post
Share on other sites
Chuckconnor

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

Share this post


Link to post
Share on other sites
redpicker

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)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×