Sign in to follow this  
Followers 0
bybordo

My script works in scite but not work when compile it

14 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Define what you mean by "doesn't work".

Also define the AutoIt3 version you use.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Define what you mean by "doesn't work".

Jos

yes does not work :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

still doesn't work. msgbox doesn't come.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Works fine here with the Pragma() line and doesn't without.

You did recompile ..right?

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

no. doesn't work here with pragma line and without too.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

bybordo,

Just look in the list of UDFs under my posts (in the signature area) - it is at top right in green. :D

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

thx :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0