Releases: mikeduglas/Script-Player
v2.02
- new procedure's attributes "starts-with" and "contains":
<procedure name="BrowseStudents"/> <!--exact proc name-->
<procedure starts-with="Browse"/> <!--any proc starting with "Browse"-->
<procedure contains="Tree"/> <!--any proc whose name contains "Tree"-->
- height of custom caption can be specified (in pixels):
<caption height="50">
- themed controls now can accept "disabled" values:
<type name="text" prop="fillcolor" color="blue" disabled="silver"/>
<type name="text" prop="fontcolor" color="yellow" disabled="gray"/>
This means TEXT controls will display yellow text on blue if enabled, and gray text on silver if disabled.
v2.01
- NEW: "inactivetext" caption's section allows to define caption text properties when a window gets inactive:
<caption useclose="1" usehelp="1">
<ImageName>DSCN0422.JPG</ImageName>
<Uri>https://github.com/mikeduglas/Script-Player</Uri>
<text>
<fontname>Segoe UI</fontname>
<fontcolor>yellow</fontcolor>
<fontsize>14</fontsize>
</text>
<inactivetext>
<fontcolor>silver</fontcolor>
</inactivetext>
</caption>
Screenshot of themed school demo. Note active and inactive caption colors.
v2.00
You can specify "theme" on global or procedure level:
<global theme="Blue theme">
An example of theme
<theme name="Blue theme">
<!-- color codes from http://www.computerhope.com/htmcolor.htm -->
<type name="window" prop="fillcolor" color="10583155"/> <!-- Slate Blue -->
<type name="list" prop="fillcolor" color="13089173"/> <!-- Baby Blue -->
<type name="list" prop="fontcolor" color="9247509"/> <!-- Denim Dark Blue -->
<type name="list" prop="fontsize" value="10"/>
<type name="list" prop="selectedfillcolor" color="8285526"/> <!-- Marble Blue -->
<type name="list" prop="flat" value="1"/>
<type name="text" prop="fontcolor" color="white"/>
<type name="button" prop="fillcolor" color="8269108"/> <!-- Blue Whale -->
<type name="button" prop="fontcolor" color="white"/>
<type name="entry" prop="fillcolor" color="gray"/>
<type name="entry" prop="fontcolor" color="yellow"/>
<type name="entry" prop="fontstyle" style="bold"/>
<type name="prompt" prop="fontcolor" color="blue"/>
<type name="prompt" prop="trn" value="1"/>
<type name="string" prop="fontcolor" color="blue"/>
<type name="string" prop="trn" value="1"/>
<!-- custom caption -->
<caption usemin="0" usemax="0" useclose="1" usehelp="1" useoptions="0">
<ImageName>DSCN0422.JPG</ImageName>
<Uri>https://github.com/mikeduglas/Script-Player</Uri>
<text>
<fontname>Segoe UI</fontname>
<fontcolor>yellow</fontcolor>
<fontsize>14</fontsize>
<!--<fontstyle>underline</fontstyle>-->
<charset>204</charset>
<align>center</align> <!-- 0-left (default), 1-center, 2-right -->
</text>
<buttons>
<!--<fontcolor>white</fontcolor>-->
<!--<fontsize>16</fontsize>-->
</buttons>
</caption>
</theme>
Screenshot of themed school demo. Left browse and form are not themed, right ones are themed and have custom caption bar.
v1.10
- NEW: inline function parameters:
<action name="Call" function="ALERT" parameter="F10Key"/>
Only one parameter allowed to be inline.
- NEW: Below is xml block from school.xml demonstrating how to prevent program hanging (caused by App frame menu activation):
<global>
<!--Prevents program hanging-->
<event name="BeforeAcceptLoop" position="1">
<action name="Call" function="ALERT" parameter="AltKeyPressed"/>
<action name="Call" function="ALERT" parameter="F10Key"/>
<action name="Call" function="ALERT" parameter="CtrlF10"/>
<action name="Call" function="ALERT" parameter="ShiftF10"/>
<action name="Call" function="ALERT" parameter="CtrlShiftF10"/>
<action name="Call" function="ALERT" parameter="AltSpace"/>
</event>
</global>
v1.09
You can now add <where>
elements under <property>
to define conditions of "SetProp".
Following example sets bold font style to ?Close button if the text is "Close":
<action name="SetProp" field="?Close">
<property name="fontstyle" value="bold">
<where field="?Close" propname="Text" value="Close"/>
</property>
</action>
More interesting example changes entry picture to @p##-##-##-##-#P of all entries whose picture is P###-##-####P or p###-##-####p:
<!-- Change 'Number' picture from @P###-##-####P to @P##-##-##-##-#P -->
<action name="SetProp" type="entry">
<property name="Text" value="@P##-##-##-##-#P">
<where propname="Text" op="match" value="P###-##-####P|p###-##-####p"/>
</property>
</action>
You can specify "op" attribute to define Boolean operation, available operations are:
- "=" or "EQ" (default, you can omit it)
- "<>" or "NE"
- "<" or "LT"
- ">" or "GT"
- "<=" or "LE"
- ">=" or "GE"
- "MATCH"
- "INRANGE"
v1.08
You can use field="?" in events. Following example performs Export action for current field:
<global>
<event name="OpenWindow">
<!-- Assign Export hot key for every list in the app -->
<action name="SetProp" type="list">
<property name="Alrt" value="CtrlShiftE"></property>
</action>
</event>
<!-- Export each list in the app -->
<event name="alertkey" field="?" key="CtrlShiftE">
<action name="Export" expression="Excel"></action>
</event>
</global>
v1.06
"Call" actions look like this:
<action name="Call" function="HIDE">
<parameter value="?Help"></parameter>
</action>
v1.05
- new ACTION:Capture to capture a window:
<?xml version="1.0" encoding="utf-8"?>
<script>
<!-- Applied to all procedures -->
<global>
<event name="OpenWindow">
<!-- Hot key Ctrl-Shift-P to capture a window -->
<action name="SetProp">
<property name="Alrt" value="CtrlShiftP"></property>
</action>
</event>
<!-- Capture active window -->
<event name="alertkey" key="CtrlShiftP">
<action name="Capture"/> <!-- autogenerated file name: "procedure_date_time.bmp" -->
</event>
</global>
</script>
- new "charset" attribute of properties (applied to "charset", "fontcharset" and "style:charset" properties).
Following lines are identical:
<property name="FontCharSet" value="204"></property>
<property name="FontCharSet" charset="Cyrillic"></property>
v1.04
- FIX: only first action "SetProp" for types worked;
- CHG: Demo app - all buttons in the app now "flat"; xml clean up;
- NEW: Template now allows to specify how to pass script name - in command line or in INI file.
v1.03
- Localization has has never been easier! New attribute "language" (global or procedure level) defines "language" section where all texts are located:
<?xml version="1.0" encoding="windows-1251"?>
<script>
<global language="Russian"/>
<!-- <procedure language="Russian"/> -->
<language name="Russian">
<!-- File menu -->
<procedure name="Main">
<field name="?MENU1">Файл</field>
<field name="?PrintSetup">Установка принтера ...</field>
<field name="?Exit">Выход</field>
</procedure>
</language>
</script>
- Pseudo-event "BeforeAcceptLoop" allows to set SYSTEM properties before ACCEPT loop (this is necessary for example to localize main frame menu: SYSTEM{PROP:CharSet}=CHARSET:CYRILLIC):
<procedure name="Main">
<event name="BeforeAcceptLoop">
<action name="SetProp" field="System">
<property name="CharSet" value="204"></property>
</action>
</event>
</procedure>
- PROPLIST:xxx allowed:
<property name="list:Underline" value="1"/>
- PROPSTYLE:xxx allowed:
<property name="style:fontname" value="Arial"/>
- For properties which expect COLOR value, now you can use "color" attribute:
<property name="list:DefHdrTextColor" color="White"/>
- Properties which are arrays now can use "index" attribute:
<property name="list:ColStyle" index="1" value="1"/>