Sign in to follow this  
Followers 0
amokoura

MsgBox: Text as 1st param

22 posts in this topic




How would you like Msgbox() having the text parameter to be the first (and others optional)?

I sent a request

http://svn.autoitscript.com/trac/ticket/524

but it would be nice to hear your opinion.

Your idea is not so bad. Maybe for many people will be useful and more quickly.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Func _MsgBox($sText, $sTitle, $sIcon, ... )
MsgBox($sIcon, $sText, $sTitle)
EndFunc
I'm using that solution currently ;)

Or msg()-function more precisely, to code it quickly.

Still, I'm longing for a perfect native function.

Edited by amokoura

Share this post


Link to post
Share on other sites

Not going to happen, this would break every existing call to MsgBox(). Also is this really so different?

MsgBox(0,"","Message")

MsgBox("Message")

If this is for debugging purposes, use ConsoleWrite. If this is for the end user to see then you will probably be using the first two parameters anyways.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I presume breaking the previous msgbox calls is the worst side of my suggestion.

BUT... is that the only thing blocking the feature request?

Due to AutoIt being simple, fast and furious, a minimal MsgBox function would match the nature of the develompent.

Usually when prototyping or debugging, there's no need for other parameters than text.

And in scenarios where coding speed matters and user experience can be whatever, the simple msgbox rocks.

Edited by amokoura

Share this post


Link to post
Share on other sites

I presume breaking the previous msgbox calls is the worst side of my suggestion.

BUT... is that the only thing blocking the feature request?

It's the number one reason. But the second reason is: This is trivial for you to do yourself. It's already been mentioned, but if you don't like the order of parameters in a function call, the simplest answer is wrap the function in your own function that takes the parameters in the order you want. Obviously ticket was closed as rejected.

Share this post


Link to post
Share on other sites

If there's coming a version of AutoIt that will break everything else in old scripts anyways, maybe the gods will be graceful and change MsgBox then also.

Share this post


Link to post
Share on other sites

If there's coming a version of AutoIt that will break everything else in old scripts anyways, maybe the gods will be graceful and change MsgBox then also.

Yea... that would make people real happy ...

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

Share this post


Link to post
Share on other sites

I'm curious on how much time it saves you doing:

MsgBox("Title", "Text") as it does MsgBox(0, "Title", "Text")?


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.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

I'm curious on how much time it saves you doing:

MsgBox("Title", "Text") as it does MsgBox(0, "Title", "Text")?

Well if he is typing 60 wpm or 1 word per second, and the average word size is 6 characters then...500 milliseconds.

Edited by weaponx

Share this post


Link to post
Share on other sites

I'm curious on how much time it saves you doing:

MsgBox("Title", "Text") as it does MsgBox(0, "Title", "Text")?

I'm just a purist. If AutoIt can be improved and developing could be easier and faster, then why not?

Things don't have to stay the same just because they've always been like that.

I know it would be currently insane to change such a fundamental function, though. I can live with a custom helper function ;)

Share this post


Link to post
Share on other sites

Well if he is typing 60 wpm or 1 word per second, and the average word size is 6 characters then...500 milliseconds.

I can type 63 wpm! ;)

Share this post


Link to post
Share on other sites

I can type 63 wpm! ;)

Whaaaat? I can only type 50 WPM. I could do 30 when I was in 3rd grade though.

Back on topic.

A wrapper udf is much better suited for this case obviously. MsgBox is probably one of the most used functions, and chances are it would break 90% of scripts written. If it is for debug purposes, I suggest ConsoleWrite.

Share this post


Link to post
Share on other sites

You are talking about the VB type of msgbox and there is nothing "pure" about vb. This is a script breaker to end all script breakers.

Use the work-around. You are not saving enough time with this change to make it worthwhile.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

You are talking about the VB type of msgbox and there is nothing "pure" about vb. This is a script breaker to end all script breakers.

Use the work-around. You are not saving enough time with this change to make it worthwhile.

Yeah, VB isn't the golden path. But the parameter order in MsgBox in there is better than in AutoIt, in my opinion.

And the point isn't in saving some seconds. It's about having usable functions and improving the AutoIt language. I get annoyed of useless parameters.

None has yet said anything against the basic idea. If it wouldn't break anything, would it be implemented?

Edited by amokoura

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

None has yet said anything against the basic idea. If it wouldn't break anything, would it be implemented?

http://www.autoitscript.com/forum/index.ph...st&p=567910

Looks pretty clear that the subject is rejected and not going to be an option..

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

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/forum/index.ph...st&p=567910

Looks pretty clear that the subject is rejected and not going to be an option..

Yeah I'm currently living in a "What if.." world. I just like to talk about the subject.

Everybody's repeating "It breaks everything, do it yourself".

My primary intention was just to discuss about the idea, in general. If AutoIt would be created right NOW, what would MsgBox look like?

Share this post


Link to post
Share on other sites

Who gives a damn? It's already written and over with. There's no point discussing something now when it was done years ago.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0