Jump to content

Recommended Posts

Posted (edited)

Hi, after years of use autoit i am tired to type all time:

msgbox('','','Hi')

So, wanna mod the function for set default values... or some more changes.
where is the function?
or there are another modes for debug messages that i do not knowed ? XD [just wanna like alert('text')]

And is there any place for all integrates functions ?

Thank. Sry my english =E

Edited by editcheck
  • Developers
Posted

This is an internal function, so use write your own Func to wrap the MsgBox() function, should be a piece of cake when you code for years. ;)

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

Posted
2 hours ago, editcheck said:

Hi, after years of use autoit i am tired to type all time:

msgbox('','','Hi')

So, wanna mod the function for set default values... or some more changes.

@editcheck

If you use the SciTE4AutoIt3 editor, then you create all the default MsgBoxes that you want with the Abbreviation Manager.  You can read more about it in the SciTE4AutoIt3 editor documentation under "Extra Utilities".  It looks like this:

 

image.png.3af32440dd49cc7da746b3b6076bb100.png

Posted

@Jos
I have, but wanna not have to add the #include all time. Some time i need just one time the msgbox for a simple script.

@Earthshine
Yes, i know, but do not like the debugger interface xD (talking about debugger v0.47 or there is any better ?)

@TheXman
Thanks. But some time i do not use the scite (use notepad2mod and some register modify for the association). But your solution is good.


So, can not modify the internal function.  Thank to all for the replies =)

Posted (edited)
11 hours ago, editcheck said:

where is the function?

MsgBox (and its A/W variants) are windows OS functions in user32.dll/user32.lib; AutoIt just wraps these.

Edited by RTFC
Posted

Here is something I made many years ago.

Dialog Maker.au3

It uses magic numbers and is untested with more recent AutoIt.
However, I recall guinness modifying it at one point, a version of which you might find with a search.

In any case, should be easy for an experienced coder to modify to suit.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

  • Developers
Posted
10 hours ago, editcheck said:

@Jos
I have, but wanna not have to add the #include all time. Some time i need just one time the msgbox for a simple script.

What can I say other than that this sounds pretty silly. ;) 

10 hours ago, editcheck said:

So, can not modify the internal function.  Thank to all for the replies =)

No.

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

Posted (edited)
_MsgBox("It Is A Message !")

Func _MsgBox($text = "", $title = "", $flag = 262144, $timeout = 0, $hwnd = "")
    Local $Return
    If IsHWnd($hwnd) Then
        $Return = MsgBox($flag, $title, $text, $timeout, $hwnd)
    Else
        $Return = MsgBox($flag, $title, $text, $timeout)
    EndIf
    Return SetError(@error, 0, $Return)
EndFunc   ;==>_MsgBox

 

Edited by VIP
Beautify code

Regards,
 

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
×
×
  • Create New...