Impulse08 Posted September 6, 2006 Share Posted September 6, 2006 I couldn't find this in the support forums, but if anyone knows let me know. Is there a way to get the MsgBox to have different buttons than the default Yes and No and Cancel. I want the buttons to say something like Enable, Disable, and Quit. Anyone know if this is possible? Thanks. -- If the apocalypse comes... beep me. Link to comment Share on other sites More sharing options...
MHz Posted September 6, 2006 Share Posted September 6, 2006 (edited) Unless you want to hack some windows source files then you may need to use Gui functions. Someone not long ago made a msgbox UDF in script'n'scraps that makes a standard msgbox look very ordinary. Just use search.Edit:found here http://www.autoitscript.com/forum/index.ph...c=30758&hl= Edited September 6, 2006 by MHz Link to comment Share on other sites More sharing options...
BigDod Posted September 6, 2006 Share Posted September 6, 2006 You can always make your own msgbox and call the buttons whatever you want Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 6, 2006 Moderators Share Posted September 6, 2006 (edited) Hmm, this was fun$iMsg = _MsgBoxEx(0, 'nothing', 'something', 0, 'Button1', 'Changed') MsgBox(64, 'Info', 'The Return Was: ' & $iMsg) Func _MsgBoxEx($iFlag, $sTitle, $sText, $iTime = 0, $sCID = '', $sCIDChange = '') Local $_MsgBox_ = """ConsoleWrite(MsgBox(" & $iFlag & ', ""' & $sTitle & '"", ""' & $sText & '"", ' & $iTime & '"))' Local $iPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $_MsgBox_, '', @SW_SHOW, 6) Do Sleep(10) Until WinExists($sTitle) If IsArray($sCID) Then For $iCC = 1 To UBound($sCID) - 1 ControlSetText($sTitle, '', $sCID[$iCC], $sCIDChange) Next Else ControlSetText($sTitle, '', $sCID, $sCIDChange) EndIf While ProcessExists($iPID) Local $iStdOut = StdoutRead($iPID) If Number($iStdOut) > 0 Then Return $iStdOut Sleep(10) WEnd EndFuncoÝ÷ ØGb´v¶!jxÖÖ®¶sdÆö6Âb33c´6ævUFWE³5ÒÒ²b33²b33²Âb33´6ævVBb33²Âb33´6ævVC"b33µÐ¢b33c¶×6rÒô×6t&÷WcÂb33¶æ÷Færb33²Âb33·6öÖWFærb33²ÂÂb33c´6ævUFWB¤×6t&÷cBÂb33´æfòb33²Âb33µFR&WGW&âv3¢b33²fײb33c¶×6r ¤gVæ2ô×6t&÷Wb33c¶fÆrÂb33c·5FFÆRÂb33c·5FWBÂb33c¶FÖRÒÂb33c·44D6ævRÒb33²b33² Æö6Âb33cµô×6t&÷òÒgV÷C²gV÷C²gV÷C´6öç6öÆUw&FR×6t&÷gV÷C²fײb33c¶fÆrfײb33²ÂgV÷C²gV÷C²b33²fײb33c·5FFÆRfײb33²gV÷C²gV÷C²ÂgV÷C²gV÷C²b33²fײb33c·5FWBfײb33²gV÷C²gV÷C²Âb33²fײb33c¶FÖRfײb33²gV÷C²b33° Æö6Âb33c¶BÒ'VâWFôDWRfײb33²ôWFôC4WV7WFTÆæRb33²fײb33cµô×6t&÷òÂb33²b33²Â5uõ4õrÂb Fð 6ÆVW VçFÂväW7G2b33c·5FFÆR b4'&b33c·44D6ævRFVà f÷"b33c¶42ÒFòT&÷VæBb33c·44D6ævRÒ 6öçG&öÅ6WEFWBb33c·5FFÆRÂb33²b33²Âb33´'WGFöâb33²fײb33c¶42Âb33c·44D6ævU²b33c¶45Ò æW@ VÇ6P 6öçG&öÅ6WEFWBb33c·5FFÆRÂb33²b33²Âb33´'WGFöãb33²Âb33c·44D6ævR VæD` vÆR&ö6W74W7G2b33c¶B Æö6Âb33c¶7FD÷WBÒ7FF÷WE&VBb33c¶B bçVÖ&W"b33c¶7FD÷WBfwC²FVâ&WGW&âb33c¶7FD÷W@ 6ÆVW tVæ@¤VæDgVæ Edited September 6, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 6, 2006 Moderators Share Posted September 6, 2006 Saw you pondering around in here, ... was this not what you were looking for? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Impulse08 Posted September 6, 2006 Author Share Posted September 6, 2006 Hmm, this was fun$iMsg = _MsgBoxEx(0, 'nothing', 'something', 0, 'Button1', 'Changed') MsgBox(64, 'Info', 'The Return Was: ' & $iMsg) Func _MsgBoxEx($iFlag, $sTitle, $sText, $iTime = 0, $sCID = '', $sCIDChange = '') Local $_MsgBox_ = """ConsoleWrite(MsgBox(" & $iFlag & ', ""' & $sTitle & '"", ""' & $sText & '"", ' & $iTime & '"))' Local $iPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & $_MsgBox_, '', @SW_SHOW, 6) Do Sleep(10) Until WinExists($sTitle) If IsArray($sCID) Then For $iCC = 1 To UBound($sCID) - 1 ControlSetText($sTitle, '', $sCID[$iCC], $sCIDChange) Next Else ControlSetText($sTitle, '', $sCID, $sCIDChange) EndIf While ProcessExists($iPID) Local $iStdOut = StdoutRead($iPID) If Number($iStdOut) > 0 Then Return $iStdOut Sleep(10) WEnd EndFuncoÝ÷ ØGb´v¶!jxÖÖ®¶sdÆö6Âb33c´6ævUFWE³5ÒÒ²b33²b33²Âb33´6ævVBb33²Âb33´6ævVC"b33µÐ¢b33c¶×6rÒô×6t&÷WcÂb33¶æ÷Færb33²Âb33·6öÖWFærb33²ÂÂb33c´6ævUFWB¤×6t&÷cBÂb33´æfòb33²Âb33µFR&WGW&âv3¢b33²fײb33c¶×6r ¤gVæ2ô×6t&÷Wb33c¶fÆrÂb33c·5FFÆRÂb33c·5FWBÂb33c¶FÖRÒÂb33c·44D6ævRÒb33²b33² Æö6Âb33cµô×6t&÷òÒgV÷C²gV÷C²gV÷C´6öç6öÆUw&FR×6t&÷gV÷C²fײb33c¶fÆrfײb33²ÂgV÷C²gV÷C²b33²fײb33c·5FFÆRfײb33²gV÷C²gV÷C²ÂgV÷C²gV÷C²b33²fײb33c·5FWBfײb33²gV÷C²gV÷C²Âb33²fײb33c¶FÖRfײb33²gV÷C²b33° Æö6Âb33c¶BÒ'VâWFôDWRfײb33²ôWFôC4WV7WFTÆæRb33²fײb33cµô×6t&÷òÂb33²b33²Â5uõ4õrÂb Fð 6ÆVW VçFÂväW7G2b33c·5FFÆR b4'&b33c·44D6ævRFVà f÷"b33c¶42ÒFòT&÷VæBb33c·44D6ævRÒ 6öçG&öÅ6WEFWBb33c·5FFÆRÂb33²b33²Âb33´'WGFöâb33²fײb33c¶42Âb33c·44D6ævU²b33c¶45Ò æW@ VÇ6P 6öçG&öÅ6WEFWBb33c·5FFÆRÂb33²b33²Âb33´'WGFöãb33²Âb33c·44D6ævR VæD` vÆR&ö6W74W7G2b33c¶B Æö6Âb33c¶7FD÷WBÒ7FF÷WE&VBb33c¶B bçVÖ&W"b33c¶7FD÷WBfwC²FVâ&WGW&âb33c¶7FD÷W@ 6ÆVW tVæ@¤VæDgVæNice. Very cool. Thanks. -- If the apocalypse comes... beep me. Link to comment Share on other sites More sharing options...
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