Jump to content

Custom Variables For MsgBox


 Share

Recommended Posts

How can i make the msgbox say something diff from OK or Yes No how can i make it say something totally differant? can someone help me thanx

"im talking about the buttons not the message"

The short answer is you can't, the long answer is you can but it would require two scripts, one that has the message box and the other would have to change the text labels of the controls.
Link to comment
Share on other sites

; Script1.au3
Run("Script2.exe"); Make sure to compile Script2.au3
MsgBox(4099, "Test", "Test")
; End Script1.au3

; Script2.au3
$szTitle = "Test"
$szText = "Test"

WinWait($szTitle, $szText)
ControlSetText($szTitle, $szText, "Button1", "Moo")
; End Script2.au3
Link to comment
Share on other sites

; Dang--Valik beat me to it. I had to logoff because I accidently told script1 to run script1 ...... :whistle:

; contents of file script1.au3

Run('"C:\Program Files\AutoIt3\AutoIt3.exe " "D:\Desktop\script2.au3"')

MsgBox(0,"TitleGoesHere","TextGoesHere")

; contents of file script2.au3

AutoItSetOption("WinWaitDelay",0) ;default is 250 ms

WinWaitActive("TitleGoesHere")

ControlSetText("TitleGoesHere", "", "Button1", "Caption" )

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

then how is it to add more options see what i wanna do is if they select Button one i want it to Edit a part of a config.ini then if they select button two i want it to edit another part of the ini also i want to do a msgbox that i can add text on it so that it adds it to a config.ini also in otherwords i just want to make a configuration util can someone help me on that.

and plus i just want this to Turn on if theres nothing Already written there.

Edited by PoisonXrX
Link to comment
Share on other sites

then how is it to add more options see what i wanna do is if they select Button one i want it to Edit a part of a config.ini then if they select button two i want it to edit another part of the ini also i want to do a msgbox that i can add text on it so that it adds it to a config.ini also in otherwords i just want to make a configuration util can someone help me on that.

and plus i just want this to Turn on if theres nothing Already written there.

You don't want a message box then, you want a GUI. Larry has written a GUI creator for AutoIt 3 called "AU3GUI". Have a look around the files section of the Yahoo! Group. Edited by Valik
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...