Sign in to follow this  
Followers 0

TaskDialog UDF

20 posts in this topic

Posted (edited)

This piece of code allows to create the neat MsgBox-alternative called TaskDialog.

Create a limitless amount of custom buttons, easily assign custom icons, create so-called commadn buttons and much more. Microsoft introducued this powerful tool in Windows Vista, but with the help of XTaskDialog, this UDF will work on Windows 2000, XP, and 2003, too. The DLLs are included as binary data in TaskDialog.dll.au3 and are extracted to the temporary directory if required. On Vista and Seven, the native calls are used.

The download includes an example and the DLL as Binary code in an au3.

DOWNLOAD TaskDialog.zip Posted Image

Enjoy ;)

Edited by ProgAndy

Share this post


Link to post
Share on other sites



Posted (edited)

I get some errors:

\...

Edit: Forgot to include file ;)

Edited by Kip

Share this post


Link to post
Share on other sites

Posted (edited)

Oops. Forgot to include the UDF in the example ........... ;)

//Edit: Should be corrected :D

Edited by ProgAndy

Share this post


Link to post
Share on other sites

Posted (edited)

yeah ;):D

Cool UDF, btw. Is there any possibility of running it without creating a temp dll?

Edited by Kip

Share this post


Link to post
Share on other sites

Posted

You could try to use the memDLL UDF ;) And on Vista, the DLL won't be created I think ( Have no Vista :D)

Share this post


Link to post
Share on other sites

Posted

The link to download opens 404 page :)

I know it's an old topic, but i would like to see what it's all about :)

Share this post


Link to post
Share on other sites

Posted (edited)

Just another link I forgot to correct after my page redesign.

I think, there will also be an update this year to the most recent DLL for XP.

Edited by ProgAndy

Share this post


Link to post
Share on other sites

Posted

Just another link I forgot to correct after my page redesign.

Thanks.

P.S

How did you got the notification for the reply in this topic, the last reply was in 2008, and as i understand it, the «Wath topic» option expired after a while, or i missing something?

Share this post


Link to post
Share on other sites

Posted

Notification? I just saw it in "View New Content" :)

Share this post


Link to post
Share on other sites

Posted

At the end i just did a GuiCreate and added some buttons to it...easiest way :graduated:

Share this post


Link to post
Share on other sites

Posted

At the end i just did a GuiCreate and added some buttons to it...easiest way :graduated:

That's another alternative.

Still I like the "command buttons" and it is not easy to rebuild them from scratch.

Btw, I updated to the most recent XTaskDlg-DLL for Windows 2000+XP and removed bugs in x64-Mode.

Share this post


Link to post
Share on other sites

Posted

Very cool UDF!

Thx

Share this post


Link to post
Share on other sites

Posted

Hi ProgAndy!

This is awesome but you are declaring a few variables that Constants.au3 already have which causes errors if both are included, you may want to fix that.

#include "TaskDialog.au3"
#include <Constants.au3>

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(215,48) : ERROR: $IDOK previously declared as a 'Const'.

Global Const $IDOK = 1 ; OK button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(216,56) : ERROR: $IDCANCEL previously declared as a 'Const'.

Global Const $IDCANCEL = 2 ; Cancel button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(217,54) : ERROR: $IDABORT previously declared as a 'Const'.

Global Const $IDABORT = 3 ; Abort button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(218,54) : ERROR: $IDRETRY previously declared as a 'Const'.

Global Const $IDRETRY = 4 ; Retry button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(219,56) : ERROR: $IDIGNORE previously declared as a 'Const'.

Global Const $IDIGNORE = 5 ; Ignore button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(220,50) : ERROR: $IDYES previously declared as a 'Const'.

Global Const $IDYES = 6 ; Yes button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\Constants.au3(221,48) : ERROR: $IDNO previously declared as a 'Const'.

Global Const $IDNO = 7 ; No button was selected

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Share this post


Link to post
Share on other sites

Posted (edited)

Those constants weren't there when I wrote it I think. I'll update ;) ... Done

Edited by ProgAndy

Share this post


Link to post
Share on other sites

Posted

Great! ;)

Note that you commented $IDCLOSE that isn't a duplicate (but I'm not sure where these are used so I don't know if it's really needed?).

Share this post


Link to post
Share on other sites

Posted

Great! Posted Image

Note that you commented $IDCLOSE that isn't a duplicate (but I'm not sure where these are used so I don't know if it's really needed?).

They are the return values of the function if you use the default buttons (same values as MsgBox) The constants are not used in the UDF directly.

Share this post


Link to post
Share on other sites

Posted

So shouldn't IDCLOSE still be declared then? Or I could add it to Constants.au3 so it's with the others (probably best to mention it in the 3.3.10 thread first, but I don't see why anyone would say no).

Share this post


Link to post
Share on other sites

Posted

So shouldn't IDCLOSE still be declared then? Or I could add it to Constants.au3 so it's with the others (probably best to mention it in the 3.3.10 thread first, but I don't see why anyone would say no).

Hmm, I don't really care, I never use IDCLOSE. This is always Case Else together with IDCANCEL ;) Why not add IDCLOSE = 8, IDHELP = 9 to constants.au3 to fill the hole between IDNO and IDTRYAGAIN?

Share this post


Link to post
Share on other sites

Posted

Why not add IDCLOSE = 8, IDHELP = 9 to constants.au3 to fill the hole between IDNO and IDTRYAGAIN?

Let's to that.

Share this post


Link to post
Share on other sites

Posted

Let's to that.

Finished. IDCLOSE and IDHELP will be in next beta.

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