CommonDialogs Help File

CommonDialogs Help File

Plugin Name:

CommonDialogs

Current Version:

1.0.0.0

Author:

Ceone

E-mail:

produceone@gmail.com


Table of Contents

CommonDialogs.FileOpen
CommonDialogs.FileSave
CommonDialogs.Color
CommonDialogs.Font

CommonDialogs.FileOpen


(string) CommonDialogs.FileOpen ( 

(string) DialogTitle = "Open",

(string) InitialDirectory = "C:\\Windows\\System32\\",

(string) Filter = "Dll Files (*.dll)|*.dll|ALL Files (*.*)|*.*|" )

Description

Presents a file browse dialog to the user to collect the paths to one file.

Parameters

DialogTitle

(string) To set Dialog Title

InitialDirectory

(string) To set Initial Directory

Filter

(string) To set Extension Filter.

Returns

(string) A string containing file, if user presed cancel function return "". for more perception See below example.


Example

result = CommonDialogs.FileOpen("Dialog Open Title Here", "C:\\Windows\\System32\\", "Dll Files (*.dll)|*.dll|ALL Files (*.*)|*.*|");

if result ~= "" then
    Dialog.Message("CommonDialog Save Info", result);
end



CommonDialogs.FileSave


CommonDialogs.FileSave ( 

(string) DialogTitle = "Open",

(string) InitialDirectory = "C:\\Windows\\System32\\",

(string) Filter = "Dll Files (*.dll)|*.dll|ALL Files (*.*)|*.*|" )

Description

Presents a file browse dialog to the user to collect the paths to one file.

Parameters

DialogTitle

(string) To set Dialog Title

InitialDirectory

(string) To set Initial Directory

Filter

(string) To set Extension Filter.

Returns

This action dose not return any value.


Example

result = CommonDialogs.FileSave("Dialog Save Title Here", "C:\\Windows\\System32\\", "Dll Files (*.dll)|*.dll|ALL Files (*.*)|*.*|");

if result ~= "" then
    Dialog.Message("CommonDialog Save Info", result);
end



CommonDialogs.Color


CommonDialogs.Color ( 

(number) Style = BasicColorBox,

(number) StartColor = nil )

Description

Opens the standard requester to choose a color. The chosen color is returned under a 24 bit number containing the red, green and blue value, as usual.

Parameters

Style

(number) To set Dialog Color Style

CONSTANT

VALUE

DESCRIPTION

BasicColorBox

1

BasicColorBox Style.

FullColorBox

2

FullColorBox Style.

PreventFullOpen

4

PreventFullOpen Style.

StartColor

(number) StartColor

Returns

This action dose not return any value.


Example

result = CommonDialogs.Color(FullColorBox);

if result ~= nil then
    text = "Dec : " .. result.Dec .. "\r\n"
    text = text .. "Hex: " .. result.Hex .. "\r\n"
    text = text .. "Red: " .. result.Red .. "\r\n"
    text = text .. "Green: " .. result.Green .. "\r\n"
    text = text .. "Blue: " .. result.Blue
    
    Dialog.Message("CommonDialog Color Info", text);
end



CommonDialogs.Font


CommonDialogs.Font ( 

(table) tblFontValue = nil )

Description

Opens the standard requester to choose a font.

Parameters

tblFontValue

(table) To set table font values

Returns

This action dose not return any value.


Example

tblFont = {}
tblFont.Name = "Arial"
tblFont.Size = "12"
tblFont.Bold = true
tblFont.Italic = true
tblFont.StrikeThru = false
tblFont.UnderLine = false
tblFont.Color = 255

result = CommonDialogs.Font(tblFont);

if result ~= "" then
    text = "Name: " .. result.Name .. "\r\n"
    text = text .. "Size: " .. result.Size .. "\r\n"
    text = text .. "Bold: " .. tostring(result.Bold) .. "\r\n"
    text = text .. "Italic: " .. tostring(result.Italic) .. "\r\n"
    text = text .. "StrikeThru: " .. tostring(result.StrikeThru) .. "\r\n"
    text = text .. "UnderLine: " .. tostring(result.UnderLine) .. "\r\n"
    text = text .. "Color: " .. result.Color
    
    Dialog.Message("Font Info", text);
end





This File Was Generated With AMS ActionFile Editor