Dlg [v5.02]

Author: majkinetor Last Modified: 20090930


This library contains some standard dialogs which are used often at another programs. They are not supported natively in AutoHotkey, so this library adds the possibilty to use them. In example we have missed in Ahk the Color and Font select dialog. Now we have them.

Dlg_callback(Handler,"","","")
Dlg_Color(ByRef Color, hGui=0)
Dlg_Find( hGui, Handler, Flags="d", FindText="")
Dlg_Font(ByRef Name, ByRef Style, ByRef Color, Effects=true, hGui=0)
Dlg_Icon(ByRef Icon, ByRef Index, hGui=0)
Dlg_Open( hGui=0, Title="", Filter="", DefaultFilter="", Root="", DefaultExt="", Flags="FILEMUSTEXIST HIDEREADONLY" )
Dlg_Replace( hGui, Handler, Flags="", FindText="", ReplaceText="")
Dlg_Save( hGui=0, Title="", Filter="", DefaultFilter="", Root="", DefaultExt="", Flags="" )

For the functions's parameters and return value, please see it's source code or the document.

Remarks

Requires at least Ahk v1.0.46.08.

For update's details and remarks related to the functions, please see the AutoHotkey Forum: http://www.autohotkey.com/forum/viewtopic.php?t=21172

For update's details and remarks related to the functions, please see the AutoHotkey Forum: http://www.autohotkey.com/forum/topic17230.html

License

The functions is an open source item under the BSD license.
For details, please see http://creativecommons.org/licenses/BSD/

Example

; #Include Dlg.ahk
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

 ;basic usage
if Dlg_Icon(icon, idx := 4)
	msgbox Icon:   %icon%`nIndex:  %idx%

if Dlg_Color( color := 0xFF00AA )
	msgbox Color:  %color%

if Dlg_Font( font := "Courier New", style := "s16 bold underline italic", color:=0x80)
	msgbox Font:  %font%`nStyle:  %style%`nColor:  %color%

res := Dlg_Open("", "Select several files", "", "", "c:\Windows\", "", "ALLOWMULTISELECT FILEMUSTEXIST HIDEREADONLY")
IfNotEqual, res, , MsgBox, %res%

ExitApp