Jump to content

Recommended Posts

Posted

MB_OK = 0 :D

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Posted

Don't forget it also includes $MB_DEFBUTTON1 = 0 and $MB_APPLMODAL = 0. ;)

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted
  On 12/13/2013 at 4:37 AM, czardas said:

What's this all about?

  Reveal hidden contents
MB_ICONHAND = MB_ICONSTOP = MB_ICONERROR = 16 :whistle:

It means that all three are documented to be the same result. It's consistent with Win32 programming.

I prefer compile-time constants that can be optimized. Calling them global variables is asking for trouble and inefficiency.

Posted

LOL :D

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
  On 12/13/2013 at 1:25 PM, Exit said:
MsgBox("", "", "No magic numbers :-)")

Wrong! "" isn't a valid parameter that can be passed to flag.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Why? The parameter is accepted by AutoIt so it can't be wrong.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
  On 12/13/2013 at 1:38 PM, water said:

Why? The parameter is accepted by AutoIt so it can't be wrong.

Is it documented in the remarks?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

Is it accepted by AutoIt?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

As we should all know an empty string when compared to a number equals 0, so MsgBox("", "", "Text) is equivalent to MsgBox(0, "", "Text").

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted
  Quote
The day I have to type MB_DUNNOWHAT while debugging, instead using a quick zero, is the day I stop coding. Publishing code is a different matter.

 

 

If a defense for variables is later maintenance of the code. Then i think the same case could be made for production use of magic numbers commonly used in debugging.

  Reveal hidden contents

Posted
  On 12/14/2013 at 2:13 PM, czardas said:

 

;

MsgBox(Not "", "", "" = Not "documented in the remarks")

I don't get it. In the MsgBox() remarks for supported flag values it doesn't mention anything about a blank string, only numerical values and Default.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 12/14/2013 at 2:15 PM, guinness said:

I don't get it. In the MsgBox() remarks for supported flag values it doesn't mention anything about a blank string, only numerical values and Default.

 

But that is not a blank string.

Posted
  On 12/14/2013 at 2:06 PM, boththose said:

If a defense for variables is later maintenance of the code. Then i think the same case could be made for production use of magic numbers commonly used in debugging.

How would you differentiate between a numerical value and one that is a magic number?

  On 12/14/2013 at 2:17 PM, czardas said:

But that is not a blank string.

I thought "" was a blank string?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 12/14/2013 at 2:19 PM, guinness said:

How would you differentiate between a numerical value and one that is a magic number?

I thought "" was a blank string?

 

It's a joke. If you run the example, it gives the right answer.

Posted (edited)
  On 12/14/2013 at 2:06 PM, boththose said:

If a defense for variables is later maintenance of the code. Then i think the same case could be made for production use of magic numbers commonly used in debugging.

I'm not quite sure what you mean by this.


@guinness, I think it would be impossible to document all expected behaviour in every situation. Perhaps that's not so important here. The fact the interpreter is capable of doing such magic tricks makes the language extremely user friendly and flexible. It's one of the endearing features of AutoIt IMO, albeit perhaps one of a multitude of consequential side effects.

Edited by czardas

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...