Jump to content

Auto OK


Badname
 Share

Recommended Posts

Hello all,

I have a .AU3 script and would like to know how to auto answer the prompts that it comes up with?

Below is part of the script that I would like automate the answer as "OK".

Else

$iMsgBoxAnswer = MsgBox(49,"Begin","This will configure Proxy Host. Please press OK to continue.")

Select

Case $iMsgBoxAnswer = 1 ;OK

Case $iMsgBoxAnswer = 2 ;CANCEL

Exit 0

EndSelect

EndIf

Next section of questions are these:

If $quiet <> "1" Then

$newdisplayname = InputBox("Displayname", "Please enter the Proxy Display Name", $displayname)

If @error = 0 Then

$displayname = $newdisplayname

EndIf

$permission = MsgBox(4, "Permission", "Should the computer require permission to proxy in?")

If $permission = 7 Then

$grant = False

Else

$grant = True

EndIf

$qryrmhost = MsgBox(4, "RMHost", "Should the RMHost utility be run?")

If $qryrmhost = 7 Then

$rmhost = "0"

Else

$rmhost = "1"

Thanks so much for your help.

Link to comment
Share on other sites

Auto-answer input boxes and message boxes coming from an *.au3?

Lol - that sounds like you arwe chasing your tail :graduated:

1st - remove everyting between Else and EndIf

2nd - after removing all and assuming all true:

If $quiet <> "1" Then
$newdisplayname = "the name you want"
$grant = True
$rmhost = "1"

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Auto-answer input boxes and message boxes coming from an *.au3?

Lol - that sounds like you arwe chasing your tail :graduated:

1st - remove everyting between Else and EndIf

2nd - after removing all and assuming all true:

If $quiet <> "1" Then
$newdisplayname = "the name you want"
$grant = True
$rmhost = "1"

That was it! Thanks Enaiman for the help.
Link to comment
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
 Share

  • Recently Browsing   0 members

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