bybordo Posted October 12, 2013 Share Posted October 12, 2013 Local $ChangeText[4] = ['', 'button1', 'button2'] If _MsgBoxEx(4, 'trying script', 'Please select', 0, $ChangeText) = 6 Then ShellExecuteWait(@TempDir & "\bbdent.exe", '/s') Else ShellExecuteWait(@TempDir & "\bbdent.exe", '/s/bm') EndIf Func _MsgBoxEx($iFlag, $sTitle, $sText, $iTime = 0, $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($sCIDChange) Then For $iCC = 1 To UBound($sCIDChange) - 1 ControlSetText($sTitle, '', 'Button' & $iCC, $sCIDChange[$iCC]) Next Else ControlSetText($sTitle, '', 'Button1', $sCIDChange) EndIf While ProcessExists($iPID) Local $iStdOut = StdoutRead($iPID) If Number($iStdOut) Then Return $iStdOut Sleep(10) WEnd If IsArray($sCIDChange) Then Return SetError(1, 0, 2) Return SetError(1, 0, 1) EndFunc ;==>_MsgBoxEx i finded script that changes msgbox button name. it is working in scite but not work in exe Link to comment Share on other sites More sharing options...
Developers Jos Posted October 12, 2013 Developers Share Posted October 12, 2013 (edited) Define what you mean by "doesn't work". Also define the AutoIt3 version you use. Jos Edited October 12, 2013 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 Define what you mean by "doesn't work". Jos yes does not work Link to comment Share on other sites More sharing options...
Developers Jos Posted October 12, 2013 Developers Share Posted October 12, 2013 What doesn't work and which version of AutoIt3 are you using ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 What doesn't work and which version of AutoIt3 are you using ? i am using 3.2.0 version. this script doesn't work when i compile it. but is working in scite editor (script.au3). when i run .exe msgbox doesn't come. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 12, 2013 Developers Share Posted October 12, 2013 Add this line at the top and try again: #pragma compile(AutoItExecuteAllowed, true) Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 still doesn't work. msgbox doesn't come. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 12, 2013 Developers Share Posted October 12, 2013 (edited) Works fine here with the Pragma() line and doesn't without. You did recompile ..right? Jos Edited October 12, 2013 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 no. doesn't work here with pragma line and without too. Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 Sory i wrote #NoAutiotExecute i forgot it. now it is working. But i want add 3. button how can add this ? If _MsgBoxEx(4, 'trying script', 'Please select', 0, $ChangeText) = 6 Then ShellExecuteWait(@TempDir & "\bbdent.exe", '/s') Else ShellExecuteWait(@TempDir & "\bbdent.exe", '/s/bm') EndIf and if _msgboxex = 2 then blabla... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 12, 2013 Moderators Share Posted October 12, 2013 bybordo,Have you looked at my ExtMsgBox UDF? The link is in my sig - you might find it easier to use if you need more buttons. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 bybordo, Have you looked at my ExtMsgBox UDF? The link is in my sig - you might find it easier to use if you need more buttons. M23 Give me link please Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 12, 2013 Moderators Share Posted October 12, 2013 bybordo,Just look in the list of UDFs under my posts (in the signature area) - it is at top right in green. Or you can just go directly to it here. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
bybordo Posted October 12, 2013 Author Share Posted October 12, 2013 thx 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