Badname Posted November 22, 2010 Posted November 22, 2010 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.
enaiman Posted November 22, 2010 Posted November 22, 2010 Auto-answer input boxes and message boxes coming from an *.au3? Lol - that sounds like you arwe chasing your tail 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 :)
Badname Posted November 23, 2010 Author Posted November 23, 2010 Auto-answer input boxes and message boxes coming from an *.au3? Lol - that sounds like you arwe chasing your tail 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now