SysDialog Help File

SysDialog Help File

Plugin Name:

SysDialog

Current Version:

1.0.0.0

Description:

Enables the use of various system dialogs.

Licence:

Freeware

Author:

RizlaUK

Web:

www.luadevils.com

E-mail:

rizlauk@luadevils.com

Requirements:

AutoPlay Medis Studio 8

Copyright:

Copyright © 2010 Lua Devils

Install Notes:

Copy the folder "SysDialog" to your AMS plugind directory

EG: "C:\Program Files\AutoPlay Media Studio\Plugins\Actions"


Table of Contents

SysDialog.Color
SysDialog.Font

SysDialog.Color


(table) SysDialog.Color ( 

(number) DefColor,

(table) Flags )

Description

Shows a system color selector

Parameters

DefColor

(number) The color that is selected by default

Flags

(table) Optional flags table

Returns

(table) A table indexed by the following values

Decimal = The decimal value of the selected color.
Red = The red value of the selected color.
Green= The green value of the selected color.
Blue = The blue value of the selected color.
Hex = The hex value of the selected color.


Example

if not tFlags then
    tFlags={}
    tFlags.FullOpen=FULLOPEN_ALLOW--FULLOPEN_DISABLE--FULLOPEN_FORCE
    tFlags.Owner=DialogEx.GetWndHandle();
    tFlags.Custom={}
    tFlags.Custom[1]=255
    tFlags.Custom[2]=4578
    tFlags.Custom[16]=255
end

local tCol = SysDialog.Color(255,tFlags);
if tCol then

    Text="Decimal="..tCol.Decimal.."\r\n"
    Text=Text.."Red="..tCol.Red.."\r\n"
    Text=Text.."Green="..tCol.Green.."\r\n"
    Text=Text.."Blue="..tCol.Blue.."\r\n"
    Text=Text.."Hex="..tCol.Hex.."\r\n"
    
    if type(tCol.Custom) == "table" then
        for index, color in pairs(tCol.Custom) do
            Text=Text.."Custom="..tCol.Custom[index].."\r\n"
            
            -- set the flags custom to the return custom to preserve the custom colors
            tFlags.Custom[index]=tCol.Custom[index]
        end
    else
        Text=Text.."No Custom\r\n"
    end
    Dialog.Message("Test",Text)
end



SysDialog.Font


(table) SysDialog.Font ( 

(number) FontName,

(number) FontSize,

(table) Flags = nil )

Description

Shows a system font selector

Parameters

FontName

(number) The color that is selected by default

FontSize

(number) The size of the font.

Flags

(table) Optional flags table.

CONSTANT

VALUE

DESCRIPTION

NoExtended

Boolean

Disable the dialogs effects, including color chooser.

Bold

Boolean

Font is bold.

Italic

Boolean

Font is italic.

StrikeOut

Boolean

Font is strikeout.

Underline

Boolean

Font is underline.

Color

Number

The font color.

Returns

(table) A table indexed by the following values

Font = The name of the font.
Size = The size of the font.
Bold = The font is bold.
Italic = The font is italic.
StrikeOut = The font is strikeout.
Underline = The font is underlined.
Color = The color of the font


Example

local tFlags={}

tFlags.Bold=true
tFlags.Italic=true
tFlags.NoExtended=false
tFlags.StrikeOut=true
tFlags.Underline=true
tFlags.Color=255

local tFont = SysDialog.Font("Arial", 12, tFlags);
if tFont then

    Text="Font="..tFont.Font.."\r\n"
    Text=Text.."Size="..tFont.Size.."\r\n"
    Text=Text.."Bold="..tostring(tFont.Bold).."\r\n"
    Text=Text.."Italic="..tostring(tFont.Italic).."\r\n"
    Text=Text.."StrikeOut="..tostring(tFont.StrikeOut).."\r\n"
    Text=Text.."Underline="..tostring(tFont.Underline).."\r\n"
    Text=Text.."Color="..tFont.Color.."\r\n"
    
    Dialog.Message("Test",Text)
end




Copyright © 2010 Lua Devils
This File Was Generated With AMS ActionFile Editor