Jump to content

Recommended Posts

Posted

I recently put a msgbox in my script with yes no buttons

and wanted to set yes as a default ..i found this informaion

Hidden/default-button flags

  • 256Default button = 1st button
  • 512 → Default button = 2nd button
  • 768 → Default button = 3rd button

⚠️ These aren’t documented in the help file for MsgBox, but they work because AutoIt passes them through to the underlying Windows API.

in the msgbox(4 + 256...)  toset a yes button

 

Posted

sorry my bad this is the correct one

  • 0  Default button = 1st button
  • 256 → Default button = 2nd button
  • 512 → Default button = 3rd button

        they have to be tested sometimes they may not work

 

Posted

As per help file of MsgBox :

Quote
Constant Name decimal flag Default-related Result hexadecimal flag
$MB_DEFBUTTON1 0 First button is default button 0x0
$MB_DEFBUTTON2 256 Second button is default button 0x100
$MB_DEFBUTTON3 512 Third button is default button 0x200
$MB_DEFBUTTON4 768 Fourth button is default button 0x300

 

Posted
3 hours ago, richardss said:

sorry my bad this is the correct one

2 hours ago, Nine said:

As per help file of MsgBox :

 

3 hours ago, richardss said:

they have to be tested sometimes they may not work

I've never seen them not work. 🤔

Can you post an example so that I can run it 1000 times ( I'll automate that part ) to see if it fails at any moment ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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