1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-22 01:02:17 -05:00

Fixed some little things + Tray has now Run/Pause/Stop. Oh and GPL @ framescript

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@165 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2009-10-31 23:31:51 +00:00
parent 5318273524
commit f304e759fa
5 changed files with 184 additions and 102 deletions

View File

@ -1,3 +1,25 @@
{
This file is part of the Mufasa Macro Library (MML)
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
MML is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MML is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MML. If not, see <http://www.gnu.org/licenses/>.
See the file COPYING, included in this distribution,
for details about the copyright.
framescript for the Mufasa Macro Library
}
unit framescript; unit framescript;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@ -120,9 +142,9 @@ procedure TScriptFrame.ErrorThread(ErrorAtLine, ErrorPosition: integer;
begin begin
MakeActiveScriptFrame; MakeActiveScriptFrame;
ScriptErrorLine:= ErrorAtLine; ScriptErrorLine:= ErrorAtLine;
SynEdit.Invalidate;
SynEdit.SelStart:= ErrorPosition; SynEdit.SelStart:= ErrorPosition;
Writeln(Format('Error: %s at line %d',[errorstr,erroratline])); Writeln(Format('Error: %s at line %d',[errorstr,erroratline]));
SynEdit.Invalidate;
end; end;
procedure TScriptFrame.MakeActiveScriptFrame; procedure TScriptFrame.MakeActiveScriptFrame;
@ -133,6 +155,7 @@ begin
if OwnerPage.Pages[i] = OwnerSheet then if OwnerPage.Pages[i] = OwnerSheet then
begin; begin;
OwnerPage.TabIndex := i; OwnerPage.TabIndex := i;
OwnerSheet.SetFocus;
exit; exit;
end; end;
end; end;

View File

@ -7,7 +7,7 @@
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="Mufasa Stand Alone"/> <Title Value="Mufasa Stand Alone"/>
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="7"/> <ActiveEditorIndexAtStart Value="1"/>
</General> </General>
<VersionInfo> <VersionInfo>
<ProjectVersion Value=""/> <ProjectVersion Value=""/>
@ -33,16 +33,14 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="167"> <Units Count="170">
<Unit0> <Unit0>
<Filename Value="project1.lpr"/> <Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="project1"/> <UnitName Value="project1"/>
<CursorPos X="43" Y="35"/> <CursorPos X="43" Y="35"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="10"/>
<UsageCount Value="205"/> <UsageCount Value="205"/>
<Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="unit1.pas"/> <Filename Value="unit1.pas"/>
@ -170,8 +168,8 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/> <UnitName Value="TestUnit"/>
<CursorPos X="120" Y="12"/> <CursorPos X="31" Y="489"/>
<TopLine Value="1"/> <TopLine Value="486"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<UsageCount Value="202"/> <UsageCount Value="202"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -227,8 +225,8 @@
<Filename Value="../../Units/MMLCore/client.pas"/> <Filename Value="../../Units/MMLCore/client.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="Client"/> <UnitName Value="Client"/>
<CursorPos X="79" Y="41"/> <CursorPos X="28" Y="34"/>
<TopLine Value="23"/> <TopLine Value="25"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="201"/> <UsageCount Value="201"/>
<Loaded Value="True"/> <Loaded Value="True"/>
@ -314,18 +312,14 @@
<UnitName Value="mmlpsthread"/> <UnitName Value="mmlpsthread"/>
<CursorPos X="20" Y="236"/> <CursorPos X="20" Y="236"/>
<TopLine Value="218"/> <TopLine Value="218"/>
<EditorIndex Value="9"/>
<UsageCount Value="202"/> <UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit37> </Unit37>
<Unit38> <Unit38>
<Filename Value="../../Units/PascalScript/uPSComponent.pas"/> <Filename Value="../../Units/PascalScript/uPSComponent.pas"/>
<UnitName Value="uPSComponent"/> <UnitName Value="uPSComponent"/>
<CursorPos X="42" Y="625"/> <CursorPos X="42" Y="625"/>
<TopLine Value="625"/> <TopLine Value="625"/>
<EditorIndex Value="13"/>
<UsageCount Value="38"/> <UsageCount Value="38"/>
<Loaded Value="True"/>
</Unit38> </Unit38>
<Unit39> <Unit39>
<Filename Value="../../../FPC/FPCCheckout/rtl/objpas/classes/classesh.inc"/> <Filename Value="../../../FPC/FPCCheckout/rtl/objpas/classes/classesh.inc"/>
@ -377,17 +371,15 @@
<Unit46> <Unit46>
<Filename Value="../../../lazarus/components/synedit/synedit.pp"/> <Filename Value="../../../lazarus/components/synedit/synedit.pp"/>
<UnitName Value="SynEdit"/> <UnitName Value="SynEdit"/>
<CursorPos X="127" Y="1949"/> <CursorPos X="19" Y="6368"/>
<TopLine Value="1933"/> <TopLine Value="6343"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
</Unit46> </Unit46>
<Unit47> <Unit47>
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
<CursorPos X="73" Y="81"/> <CursorPos X="73" Y="81"/>
<TopLine Value="63"/> <TopLine Value="63"/>
<EditorIndex Value="11"/>
<UsageCount Value="74"/> <UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit47> </Unit47>
<Unit48> <Unit48>
<Filename Value="../../../FPC/FPCCheckout/rtl/win/tthread.inc"/> <Filename Value="../../../FPC/FPCCheckout/rtl/win/tthread.inc"/>
@ -399,9 +391,7 @@
<Filename Value="../../../FPC/FPCCheckout/rtl/inc/objpash.inc"/> <Filename Value="../../../FPC/FPCCheckout/rtl/inc/objpash.inc"/>
<CursorPos X="21" Y="184"/> <CursorPos X="21" Y="184"/>
<TopLine Value="156"/> <TopLine Value="156"/>
<EditorIndex Value="2"/>
<UsageCount Value="36"/> <UsageCount Value="36"/>
<Loaded Value="True"/>
</Unit49> </Unit49>
<Unit50> <Unit50>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/> <Filename Value="../../Units/MMLCore/bitmaps.pas"/>
@ -483,7 +473,7 @@
<UnitName Value="IntfGraphics"/> <UnitName Value="IntfGraphics"/>
<CursorPos X="84" Y="1334"/> <CursorPos X="84" Y="1334"/>
<TopLine Value="1334"/> <TopLine Value="1334"/>
<UsageCount Value="0"/> <UsageCount Value="10"/>
</Unit61> </Unit61>
<Unit62> <Unit62>
<Filename Value="../../../lazarus/lcl/graphtype.pp"/> <Filename Value="../../../lazarus/lcl/graphtype.pp"/>
@ -574,7 +564,7 @@
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/mouse.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/mouse.inc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="0"/> <UsageCount Value="10"/>
</Unit75> </Unit75>
<Unit76> <Unit76>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/>
@ -587,9 +577,7 @@
<UnitName Value="uPSCompiler"/> <UnitName Value="uPSCompiler"/>
<CursorPos X="3" Y="1696"/> <CursorPos X="3" Y="1696"/>
<TopLine Value="1686"/> <TopLine Value="1686"/>
<EditorIndex Value="12"/>
<UsageCount Value="31"/> <UsageCount Value="31"/>
<Loaded Value="True"/>
</Unit77> </Unit77>
<Unit78> <Unit78>
<Filename Value="../../Units/MMLCore/macro/ColorSame.inc"/> <Filename Value="../../Units/MMLCore/macro/ColorSame.inc"/>
@ -614,9 +602,7 @@
<UnitName Value="uPSRuntime"/> <UnitName Value="uPSRuntime"/>
<CursorPos X="1" Y="5864"/> <CursorPos X="1" Y="5864"/>
<TopLine Value="5854"/> <TopLine Value="5854"/>
<EditorIndex Value="15"/>
<UsageCount Value="17"/> <UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit81> </Unit81>
<Unit82> <Unit82>
<Filename Value="../../Units/MMLAddon/plugins.pas"/> <Filename Value="../../Units/MMLAddon/plugins.pas"/>
@ -679,9 +665,11 @@
<Unit91> <Unit91>
<Filename Value="../../../lazarus/lcl/controls.pp"/> <Filename Value="../../../lazarus/lcl/controls.pp"/>
<UnitName Value="Controls"/> <UnitName Value="Controls"/>
<CursorPos X="14" Y="1371"/> <CursorPos X="15" Y="1937"/>
<TopLine Value="1356"/> <TopLine Value="1926"/>
<UsageCount Value="8"/> <EditorIndex Value="2"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit91> </Unit91>
<Unit92> <Unit92>
<Filename Value="../../../lazarus/lcl/include/control.inc"/> <Filename Value="../../../lazarus/lcl/include/control.inc"/>
@ -716,14 +704,14 @@
<UnitName Value="dtm"/> <UnitName Value="dtm"/>
<CursorPos X="34" Y="141"/> <CursorPos X="34" Y="141"/>
<TopLine Value="113"/> <TopLine Value="113"/>
<UsageCount Value="190"/> <UsageCount Value="192"/>
</Unit96> </Unit96>
<Unit97> <Unit97>
<Filename Value="../../../cogat/Units/CogatUnits/comppicker.pas"/> <Filename Value="../../../cogat/Units/CogatUnits/comppicker.pas"/>
<UnitName Value="CompPicker"/> <UnitName Value="CompPicker"/>
<CursorPos X="47" Y="240"/> <CursorPos X="47" Y="240"/>
<TopLine Value="213"/> <TopLine Value="213"/>
<UsageCount Value="0"/> <UsageCount Value="10"/>
</Unit97> </Unit97>
<Unit98> <Unit98>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/> <Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
@ -731,7 +719,7 @@
<UnitName Value="colourpicker"/> <UnitName Value="colourpicker"/>
<CursorPos X="26" Y="198"/> <CursorPos X="26" Y="198"/>
<TopLine Value="191"/> <TopLine Value="191"/>
<UsageCount Value="186"/> <UsageCount Value="188"/>
</Unit98> </Unit98>
<Unit99> <Unit99>
<Filename Value="../../../cogat/Units/CogatUnits/compdragger.pas"/> <Filename Value="../../../cogat/Units/CogatUnits/compdragger.pas"/>
@ -756,29 +744,27 @@
<UnitName Value="windowselector"/> <UnitName Value="windowselector"/>
<CursorPos X="32" Y="12"/> <CursorPos X="32" Y="12"/>
<TopLine Value="31"/> <TopLine Value="31"/>
<UsageCount Value="176"/> <UsageCount Value="178"/>
</Unit101> </Unit101>
<Unit102> <Unit102>
<Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/objpas/classes/classesh.inc"/> <Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/objpas/classes/classesh.inc"/>
<CursorPos X="3" Y="319"/> <CursorPos X="3" Y="319"/>
<TopLine Value="319"/> <TopLine Value="319"/>
<UsageCount Value="0"/> <UsageCount Value="10"/>
</Unit102> </Unit102>
<Unit103> <Unit103>
<Filename Value="../../../lazarus/lcl/forms.pp"/> <Filename Value="../../../lazarus/lcl/forms.pp"/>
<UnitName Value="Forms"/> <UnitName Value="Forms"/>
<CursorPos X="17" Y="285"/> <CursorPos X="17" Y="285"/>
<TopLine Value="276"/> <TopLine Value="276"/>
<EditorIndex Value="8"/>
<UsageCount Value="16"/> <UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit103> </Unit103>
<Unit104> <Unit104>
<Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/> <Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<UnitName Value="cthreads"/> <UnitName Value="cthreads"/>
<CursorPos X="28" Y="1077"/> <CursorPos X="28" Y="1077"/>
<TopLine Value="1070"/> <TopLine Value="1070"/>
<UsageCount Value="0"/> <UsageCount Value="10"/>
</Unit104> </Unit104>
<Unit105> <Unit105>
<Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/inc/threadh.inc"/> <Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/inc/threadh.inc"/>
@ -792,14 +778,14 @@
<UnitName Value="dtmutil"/> <UnitName Value="dtmutil"/>
<CursorPos X="32" Y="18"/> <CursorPos X="32" Y="18"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="163"/> <UsageCount Value="165"/>
</Unit106> </Unit106>
<Unit107> <Unit107>
<Filename Value="../../../cogat/Units/CogatUnits/compmaths.pas"/> <Filename Value="../../../cogat/Units/CogatUnits/compmaths.pas"/>
<UnitName Value="CompMaths"/> <UnitName Value="CompMaths"/>
<CursorPos X="15" Y="640"/> <CursorPos X="15" Y="640"/>
<TopLine Value="636"/> <TopLine Value="636"/>
<UsageCount Value="0"/> <UsageCount Value="10"/>
</Unit107> </Unit107>
<Unit108> <Unit108>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/dtm.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/dtm.inc"/>
@ -834,7 +820,7 @@
<UnitName Value="mmath"/> <UnitName Value="mmath"/>
<CursorPos X="32" Y="42"/> <CursorPos X="32" Y="42"/>
<TopLine Value="16"/> <TopLine Value="16"/>
<UsageCount Value="143"/> <UsageCount Value="145"/>
</Unit112> </Unit112>
<Unit113> <Unit113>
<Filename Value="../../../Documents/fpc/rtl/objpas/types.pp"/> <Filename Value="../../../Documents/fpc/rtl/objpas/types.pp"/>
@ -870,7 +856,7 @@
<UnitName Value="ocr"/> <UnitName Value="ocr"/>
<CursorPos X="43" Y="42"/> <CursorPos X="43" Y="42"/>
<TopLine Value="5"/> <TopLine Value="5"/>
<UsageCount Value="113"/> <UsageCount Value="115"/>
</Unit117> </Unit117>
<Unit118> <Unit118>
<Filename Value="../../Units/PascalScript/uPSR_extctrls.pas"/> <Filename Value="../../Units/PascalScript/uPSR_extctrls.pas"/>
@ -885,7 +871,7 @@
<UnitName Value="project"/> <UnitName Value="project"/>
<CursorPos X="46" Y="15"/> <CursorPos X="46" Y="15"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="110"/> <UsageCount Value="112"/>
</Unit119> </Unit119>
<Unit120> <Unit120>
<Filename Value="../../../FPC/FPCCheckout/rtl/inc/heap.inc"/> <Filename Value="../../../FPC/FPCCheckout/rtl/inc/heap.inc"/>
@ -977,9 +963,7 @@
<UnitName Value="ComCtrls"/> <UnitName Value="ComCtrls"/>
<CursorPos X="15" Y="283"/> <CursorPos X="15" Y="283"/>
<TopLine Value="265"/> <TopLine Value="265"/>
<EditorIndex Value="3"/>
<UsageCount Value="22"/> <UsageCount Value="22"/>
<Loaded Value="True"/>
</Unit134> </Unit134>
<Unit135> <Unit135>
<Filename Value="../../../lazarus/lcl/imglist.pp"/> <Filename Value="../../../lazarus/lcl/imglist.pp"/>
@ -993,9 +977,7 @@
<UnitName Value="uPSDebugger"/> <UnitName Value="uPSDebugger"/>
<CursorPos X="3" Y="450"/> <CursorPos X="3" Y="450"/>
<TopLine Value="450"/> <TopLine Value="450"/>
<EditorIndex Value="14"/>
<UsageCount Value="17"/> <UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit136> </Unit136>
<Unit137> <Unit137>
<Filename Value="../../Units/MMLCore/web.pas"/> <Filename Value="../../Units/MMLCore/web.pas"/>
@ -1003,7 +985,7 @@
<UnitName Value="web"/> <UnitName Value="web"/>
<CursorPos X="90" Y="16"/> <CursorPos X="90" Y="16"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="38"/> <UsageCount Value="40"/>
</Unit137> </Unit137>
<Unit138> <Unit138>
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/> <Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
@ -1122,9 +1104,7 @@
<Filename Value="../../../FPC/FPCCheckout/rtl/inc/system.inc"/> <Filename Value="../../../FPC/FPCCheckout/rtl/inc/system.inc"/>
<CursorPos X="38" Y="913"/> <CursorPos X="38" Y="913"/>
<TopLine Value="906"/> <TopLine Value="906"/>
<EditorIndex Value="16"/>
<UsageCount Value="17"/> <UsageCount Value="17"/>
<Loaded Value="True"/>
</Unit152> </Unit152>
<Unit153> <Unit153>
<Filename Value="../../../Compilertje/PascalScript/Samples/Lazarus/unit1.pas"/> <Filename Value="../../../Compilertje/PascalScript/Samples/Lazarus/unit1.pas"/>
@ -1204,10 +1184,10 @@
<ComponentName Value="ScriptFrame"/> <ComponentName Value="ScriptFrame"/>
<ResourceBaseClass Value="Frame"/> <ResourceBaseClass Value="Frame"/>
<UnitName Value="framescript"/> <UnitName Value="framescript"/>
<CursorPos X="65" Y="151"/> <CursorPos X="26" Y="125"/>
<TopLine Value="114"/> <TopLine Value="107"/>
<EditorIndex Value="7"/> <EditorIndex Value="4"/>
<UsageCount Value="31"/> <UsageCount Value="33"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit162> </Unit162>
<Unit163> <Unit163>
@ -1220,148 +1200,166 @@
<Filename Value="../../../lazarus/lcl/include/pagecontrol.inc"/> <Filename Value="../../../lazarus/lcl/include/pagecontrol.inc"/>
<CursorPos X="15" Y="58"/> <CursorPos X="15" Y="58"/>
<TopLine Value="56"/> <TopLine Value="56"/>
<EditorIndex Value="4"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit164> </Unit164>
<Unit165> <Unit165>
<Filename Value="../../../lazarus/lcl/extctrls.pp"/> <Filename Value="../../../lazarus/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/> <UnitName Value="ExtCtrls"/>
<CursorPos X="14" Y="211"/> <CursorPos X="14" Y="211"/>
<TopLine Value="193"/> <TopLine Value="193"/>
<EditorIndex Value="5"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit165> </Unit165>
<Unit166> <Unit166>
<Filename Value="../../../lazarus/lcl/include/customnotebook.inc"/> <Filename Value="../../../lazarus/lcl/include/customnotebook.inc"/>
<CursorPos X="122" Y="456"/> <CursorPos X="122" Y="456"/>
<TopLine Value="446"/> <TopLine Value="446"/>
<EditorIndex Value="6"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit166> </Unit166>
<Unit167>
<Filename Value="../../../lazarus/components/synedit/syneditpointclasses.pas"/>
<UnitName Value="SynEditPointClasses"/>
<CursorPos X="36" Y="515"/>
<TopLine Value="513"/>
<UsageCount Value="10"/>
</Unit167>
<Unit168>
<Filename Value="../../../lazarus/components/synedit/synedittextbase.pas"/>
<UnitName Value="SynEditTextBase"/>
<CursorPos X="3" Y="405"/>
<TopLine Value="399"/>
<EditorIndex Value="5"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit168>
<Unit169>
<Filename Value="../../../lazarus/lcl/include/wincontrol.inc"/>
<CursorPos X="3" Y="5295"/>
<TopLine Value="5288"/>
<EditorIndex Value="3"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit169>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="596" Column="3" TopLine="594"/> <Caret Line="677" Column="26" TopLine="638"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="278" Column="1" TopLine="230"/> <Caret Line="159" Column="15" TopLine="131"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="593" Column="25" TopLine="591"/> <Caret Line="12" Column="120" TopLine="1"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="framescript.pas"/> <Filename Value="framescript.pas"/>
<Caret Line="41" Column="6" TopLine="15"/> <Caret Line="124" Column="17" TopLine="78"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="testunit.pas"/> <Filename Value="../../../lazarus/components/synedit/synedittextbase.pas"/>
<Caret Line="236" Column="138" TopLine="217"/> <Caret Line="396" Column="25" TopLine="392"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="4" Column="143" TopLine="1"/> <Caret Line="72" Column="38" TopLine="72"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="173" Column="25" TopLine="145"/> <Caret Line="362" Column="7" TopLine="360"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="174" Column="25" TopLine="145"/> <Caret Line="290" Column="16" TopLine="286"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="337" Column="28" TopLine="309"/> <Caret Line="52" Column="21" TopLine="36"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="359" Column="28" TopLine="309"/> <Caret Line="367" Column="10" TopLine="365"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="361" Column="13" TopLine="309"/> <Caret Line="4" Column="69" TopLine="1"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="554" Column="13" TopLine="526"/> <Caret Line="528" Column="9" TopLine="526"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="641" Column="21" TopLine="613"/> <Caret Line="336" Column="18" TopLine="329"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="686" Column="19" TopLine="658"/> <Caret Line="530" Column="9" TopLine="528"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="348" Column="13" TopLine="337"/> <Caret Line="344" Column="27" TopLine="329"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="173" Column="26" TopLine="129"/> <Caret Line="343" Column="30" TopLine="329"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="18" Column="124" TopLine="12"/> <Caret Line="349" Column="14" TopLine="347"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="51" Column="121" TopLine="44"/> <Caret Line="208" Column="28" TopLine="196"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="228" Column="40" TopLine="192"/> <Caret Line="209" Column="28" TopLine="196"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="framescript.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="47" Column="54" TopLine="22"/> <Caret Line="208" Column="28" TopLine="196"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="framescript.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="16" Column="127" TopLine="7"/> <Caret Line="209" Column="28" TopLine="196"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="framescript.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="76" Column="14" TopLine="48"/> <Caret Line="210" Column="28" TopLine="196"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="281" Column="1" TopLine="249"/> <Caret Line="23" Column="108" TopLine="1"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="165" Column="1" TopLine="137"/> <Caret Line="587" Column="73" TopLine="558"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="518" Column="19" TopLine="490"/> <Caret Line="567" Column="29" TopLine="547"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="366" Column="1" TopLine="323"/> <Caret Line="562" Column="18" TopLine="554"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="568" Column="9" TopLine="565"/> <Caret Line="558" Column="20" TopLine="555"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="36" Column="3" TopLine="8"/> <Caret Line="575" Column="18" TopLine="566"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="677" Column="26" TopLine="638"/> <Caret Line="553" Column="33" TopLine="546"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="159" Column="15" TopLine="131"/> <Caret Line="499" Column="27" TopLine="486"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>

View File

@ -1,7 +1,7 @@
object Form1: TForm1 object Form1: TForm1
Left = 251 Left = 356
Height = 553 Height = 553
Top = 340 Top = 220
Width = 723 Width = 723
Caption = 'Mufasa v2' Caption = 'Mufasa v2'
ClientHeight = 533 ClientHeight = 533
@ -1352,7 +1352,21 @@ object Form1: TForm1
left = 464 left = 464
end end
object TrayPopup: TPopupMenu object TrayPopup: TPopupMenu
Images = Mufasa_Image_List
left = 600 left = 600
object TrayStop: TMenuItem
Caption = 'Stop'
OnClick = TrayStopClick
end
object TrayPause: TMenuItem
Caption = 'Pause'
Enabled = False
OnClick = TrayPauseClick
end
object TrayPlay: TMenuItem
Caption = 'Play'
OnClick = TrayPlayClick
end
object MenuItemShow: TMenuItem object MenuItemShow: TMenuItem
Caption = 'Show' Caption = 'Show'
OnClick = MenuItemShowClick OnClick = MenuItemShowClick

View File

@ -1,5 +1,7 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[ LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#251#0#6'Height'#3')'#2#3'Top'#3'T'#1#5'Wi' 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'd'#1#6'Height'#3')'#2#3'Top'#3#220#0#5'Wi'
+'dth'#3#211#2#7'Caption'#6#9'Mufasa v2'#12'ClientHeight'#3#21#2#11'ClientWid' +'dth'#3#211#2#7'Caption'#6#9'Mufasa v2'#12'ClientHeight'#3#21#2#11'ClientWid'
+'th'#3#211#2#4'Menu'#7#9'MainMenu1'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7 +'th'#3#211#2#4'Menu'#7#9'MainMenu1'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7
+#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#8'Position'#7#14'poScreenCent' +#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#8'Position'#7#14'poScreenCent'
@ -1440,7 +1442,11 @@ LazarusResources.Add('TForm1','FORMDATA',[
+#0#0#0#0#0#0#0#240#0#0#0#224#0#0#0#224#0#0#0#224#0#0#0#224#0#0#0#224#0#0#0 +#0#0#0#0#0#0#0#240#0#0#0#224#0#0#0#224#0#0#0#224#0#0#0#224#0#0#0#224#0#0#0
+#224#0#0#0#240#0#0#0#240#1#0#0#240#3#0#0#240#7#0#0#248#15#0#0#254#31#0#0#255 +#224#0#0#0#240#0#0#0#240#1#0#0#240#3#0#0#240#7#0#0#248#15#0#0#254#31#0#0#255
+#255#0#0#7'Visible'#9#7'OnClick'#7#6'NoTray'#4'left'#3#208#1#0#0#10'TPopupMe' +#255#0#0#7'Visible'#9#7'OnClick'#7#6'NoTray'#4'left'#3#208#1#0#0#10'TPopupMe'
+'nu'#9'TrayPopup'#4'left'#3'X'#2#0#9'TMenuItem'#12'MenuItemShow'#7'Caption'#6 +'nu'#9'TrayPopup'#6'Images'#7#17'Mufasa_Image_List'#4'left'#3'X'#2#0#9'TMenu'
+#4'Show'#7'OnClick'#7#17'MenuItemShowClick'#0#0#9'TMenuItem'#12'MenuItemExit' +'Item'#8'TrayStop'#7'Caption'#6#4'Stop'#7'OnClick'#7#13'TrayStopClick'#0#0#9
+#7'Caption'#6#4'Exit'#7'OnClick'#7#17'MenuItemExitClick'#0#0#0#0 +'TMenuItem'#9'TrayPause'#7'Caption'#6#5'Pause'#7'Enabled'#8#7'OnClick'#7#14
+'TrayPauseClick'#0#0#9'TMenuItem'#8'TrayPlay'#7'Caption'#6#4'Play'#7'OnClick'
+#7#13'TrayPlayClick'#0#0#9'TMenuItem'#12'MenuItemShow'#7'Caption'#6#4'Show'#7
+'OnClick'#7#17'MenuItemShowClick'#0#0#9'TMenuItem'#12'MenuItemExit'#7'Captio'
+'n'#6#4'Exit'#7'OnClick'#7#17'MenuItemExitClick'#0#0#0#0
]); ]);

View File

@ -62,6 +62,9 @@ type
Memo1: TMemo; Memo1: TMemo;
MenuFile: TMenuItem; MenuFile: TMenuItem;
MenuEdit: TMenuItem; MenuEdit: TMenuItem;
TrayPlay: TMenuItem;
TrayStop: TMenuItem;
TrayPause: TMenuItem;
MenuItemPause: TMenuItem; MenuItemPause: TMenuItem;
MenuItemStop: TMenuItem; MenuItemStop: TMenuItem;
MenuItemShow: TMenuItem; MenuItemShow: TMenuItem;
@ -137,6 +140,9 @@ type
procedure ButtonStopClick(Sender: TObject); procedure ButtonStopClick(Sender: TObject);
procedure ButtonTrayClick(Sender: TObject); procedure ButtonTrayClick(Sender: TObject);
procedure MenuItemUndoClick(Sender: TObject); procedure MenuItemUndoClick(Sender: TObject);
procedure TrayPauseClick(Sender: TObject);
procedure TrayPlayClick(Sender: TObject);
procedure TrayStopClick(Sender: TObject);
private private
function GetScriptState: TScriptState; function GetScriptState: TScriptState;
procedure SetScriptState(const State: TScriptState); procedure SetScriptState(const State: TScriptState);
@ -205,6 +211,7 @@ begin
Writeln('The script hasn''t stopped yet, so we cannot start a new one.'); Writeln('The script hasn''t stopped yet, so we cannot start a new one.');
exit; exit;
end; end;
ScriptErrorLine:= -1;
CurrentSyncInfo.SyncMethod:= @Self.SafeCallThread; CurrentSyncInfo.SyncMethod:= @Self.SafeCallThread;
ScriptThread := TMMLPSThread.Create(True,@CurrentSyncInfo); ScriptThread := TMMLPSThread.Create(True,@CurrentSyncInfo);
ScriptThread.SetPSScript(CurrScript.SynEdit.Lines.Text); ScriptThread.SetPSScript(CurrScript.SynEdit.Lines.Text);
@ -340,6 +347,8 @@ begin
StatusBar.Panels[Panel_ScriptName].Text:= Script.ScriptName; StatusBar.Panels[Panel_ScriptName].Text:= Script.ScriptName;
StatusBar.Panels[Panel_ScriptPath].text:= Script.ScriptFile; StatusBar.Panels[Panel_ScriptPath].text:= Script.ScriptFile;
SetScriptState(Tab.ScriptFrame.FScriptState);//To set the buttons right SetScriptState(Tab.ScriptFrame.FScriptState);//To set the buttons right
if Self.Showing then
CurrScript.SynEdit.SetFocus;
end; end;
procedure TForm1.ButtonRunClick(Sender: TObject); procedure TForm1.ButtonRunClick(Sender: TObject);
@ -477,6 +486,7 @@ end;
procedure TForm1.MenuItemShowClick(Sender: TObject); procedure TForm1.MenuItemShowClick(Sender: TObject);
begin begin
Self.Show; Self.Show;
Self.WindowState := wsNormal;
end; end;
procedure TForm1.MenuItemStopClick(Sender: TObject); procedure TForm1.MenuItemStopClick(Sender: TObject);
@ -544,6 +554,21 @@ begin
CurrScript.Undo; CurrScript.Undo;
end; end;
procedure TForm1.TrayPauseClick(Sender: TObject);
begin
Self.PauseScript;
end;
procedure TForm1.TrayPlayClick(Sender: TObject);
begin
Self.RunScript;
end;
procedure TForm1.TrayStopClick(Sender: TObject);
begin
Self.StopScript;
end;
function TForm1.GetScriptState: TScriptState; function TForm1.GetScriptState: TScriptState;
begin begin
result := CurrScript.FScriptState; result := CurrScript.FScriptState;
@ -554,10 +579,26 @@ begin
CurrScript.FScriptState:= State; CurrScript.FScriptState:= State;
with Self.StatusBar.panels[Panel_State] do with Self.StatusBar.panels[Panel_State] do
case state of case state of
ss_Running : begin Text := 'Running'; TB_Run.Enabled:= False; {$ifdef MSWindows}TB_Pause.Enabled:= True; {$endif} TB_Stop.ImageIndex := Image_Stop; TB_Stop.Enabled:= True; end; ss_Running : begin Text := 'Running'; TB_Run.Enabled:= False; {$ifdef MSWindows}TB_Pause.Enabled:= True; {$endif}
ss_Paused : begin Text := 'Paused'; TB_Run.Enabled:= True; {$ifdef MSWindows}TB_Pause.Enabled:= True; {$endif} TB_Stop.ImageIndex := Image_Stop; TB_Stop.Enabled:= True; end; TB_Stop.ImageIndex := Image_Stop; TB_Stop.Enabled:= True;
ss_Stopping: begin Text := 'Stopping';TB_Run.Enabled:= False; TB_Pause.Enabled:= False; TB_Stop.Enabled:= True; TB_Stop.ImageIndex := Image_Terminate end; TrayPlay.Checked := True; TrayPlay.Enabled := False; {$ifdef MSWindows}TrayPause.Checked := false; TrayPause.Enabled := True;{$endif}
ss_None : begin Text := 'Done'; TB_Run.Enabled:= True; TB_Pause.Enabled:= False; TB_Stop.Enabled:= False; TB_Stop.ImageIndex := Image_Stop end; TrayStop.Enabled:= True; TrayStop.Checked:= False;
end;
ss_Paused : begin Text := 'Paused'; TB_Run.Enabled:= True; {$ifdef MSWindows}TB_Pause.Enabled:= True; {$endif}
TB_Stop.ImageIndex := Image_Stop; TB_Stop.Enabled:= True;
TrayPlay.Checked := false; TrayPlay.Enabled := True; {$ifdef MSWindows}TrayPause.Checked := True; TrayPause.Enabled := True;{$endif}
TrayStop.Enabled:= True; TrayStop.Checked:= False;
end;
ss_Stopping: begin Text := 'Stopping';TB_Run.Enabled:= False; TB_Pause.Enabled:= False; TB_Stop.Enabled:= True;
TB_Stop.ImageIndex := Image_Terminate;
TrayPlay.Checked := False; TrayPlay.Enabled := False; {$ifdef MSWindows}TrayPause.Checked := false; TrayPause.Enabled := False;{$endif}
TrayStop.Enabled:= True; TrayStop.Checked:= True;
end;
ss_None : begin Text := 'Done'; TB_Run.Enabled:= True; TB_Pause.Enabled:= False; TB_Stop.Enabled:= False;
TB_Stop.ImageIndex := Image_Stop;
TrayPlay.Checked := false; TrayPlay.Enabled := True; {$ifdef MSWindows}TrayPause.Checked := false; TrayPause.Enabled := False;{$endif}
TrayStop.Enabled:= false; TrayStop.Checked:= False;
end;
end; end;
end; end;