├── BinSearchValues.pas
├── BitmapConv.pas
├── BitmapProcessing.pas
├── ClickerActionExecution.pas
├── ClickerActionPluginLoader.pas
├── ClickerActionValues.pas
├── ClickerActionsArrFrame.frm
├── ClickerActionsArrFrame.pas
├── ClickerActionsForm.frm
├── ClickerActionsForm.pas
├── ClickerActionsFrame.frm
├── ClickerActionsFrame.pas
├── ClickerActionsPaletteFrame.frm
├── ClickerActionsPaletteFrame.pas
├── ClickerBMPTextFrame.frm
├── ClickerBMPTextFrame.pas
├── ClickerCallTemplateFrame.frm
├── ClickerCallTemplateFrame.pas
├── ClickerClient
├── ClickerClient.ctpr
├── ClickerClient.ctps
├── ClickerClient.dll
├── ClickerClient.ppr
├── ClickerClientAPI.pas
├── ClickerClientIntf.pas
├── ClickerClientLoggingForm.frm
├── ClickerClientLoggingForm.pas
└── DllUtils.pas
├── ClickerConditionEditorForm.frm
├── ClickerConditionEditorForm.pas
├── ClickerConditionEditorFrame.frm
├── ClickerConditionEditorFrame.pas
├── ClickerExecAppFrame.frm
├── ClickerExecAppFrame.pas
├── ClickerFindControlFrame.frm
├── ClickerFindControlFrame.pas
├── ClickerFontFinderSettingsForm.frm
├── ClickerFontFinderSettingsForm.pas
├── ClickerPluginArchive.pas
├── ClickerPluginFrame.frm
├── ClickerPluginFrame.pas
├── ClickerPreviewForm.frm
├── ClickerPreviewForm.pas
├── ClickerPrimitiveUtils.pas
├── ClickerPrimitiveValues.pas
├── ClickerPrimitivesCompEditors.pas
├── ClickerPrimitivesCompositor.pas
├── ClickerPrimitivesFrame.frm
├── ClickerPrimitivesFrame.pas
├── ClickerRemoteScreenForm.frm
├── ClickerRemoteScreenForm.pas
├── ClickerSetVarFrame.frm
├── ClickerSetVarFrame.pas
├── ClickerSleepFrame.frm
├── ClickerSleepFrame.pas
├── ClickerTemplateCallTreeForm.frm
├── ClickerTemplateCallTreeForm.pas
├── ClickerTemplateNotesForm.frm
├── ClickerTemplateNotesForm.pas
├── ClickerUtils
├── ClickerActionPlugins.pas
├── ClickerActionProperties.pas
├── ClickerActionsClient.pas
├── ClickerExtraUtils.pas
├── ClickerFileProviderClient.pas
├── ClickerFileProviderUtils.pas
├── ClickerIniFiles.pas
├── ClickerOIUtils.pas
├── ClickerPluginInMemFileSystem.pas
├── ClickerPrimitives.pas
├── ClickerTemplates.pas
├── ClickerUtils.pas
├── ClickerVstUtils.pas
└── DoubleList.pas
├── ClickerWinInterpForm.frm
├── ClickerWinInterpForm.pas
├── ClickerWinInterpFrame.frm
├── ClickerWinInterpFrame.pas
├── ControlInteraction.pas
├── LICENSE
├── MouseStuff.pas
├── README.md
├── TestDriver
├── ActionTemplates
│ ├── ActionsToDrag.clktmpl
│ ├── ActivateServerOnAppUnderTest.clktmpl
│ ├── AddActionButtonOnAppUnderTest.clktmpl
│ ├── ArrangeActionWindowsUnderTest.clktmpl
│ ├── ArrangeMainUIClickerWindows.clktmpl
│ ├── ArrangeOneActionWindowUnderTest.clktmpl
│ ├── AutoCompleteTextOnAppUnderTest.clktmpl
│ ├── BasicCaller.clktmpl
│ ├── BasicLoopedCaller.clktmpl
│ ├── Bmps
│ │ ├── StopButtonIcon_Idle.png
│ │ └── StopButtonIcon_Running.png
│ ├── CacheStepIntoButtonPosOnAppUnderTest.clktmpl
│ ├── CacheStepOverButtonPosOnAppUnderTest.clktmpl
│ ├── CacheStopButtonPosOnAppUnderTest.clktmpl
│ ├── DeleteAllActionsFromList.clktmpl
│ ├── DragActionOnAppUnderTest.clktmpl
│ ├── DragActionToListOnAppUnderTest.clktmpl
│ ├── DuplicateActionFromAddActionButton.clktmpl
│ ├── EditProperty.clktmpl
│ ├── FindColorErrorFromGradientOnServer.clktmpl
│ ├── FindConsoleEditBox.clktmpl
│ ├── FindExecutionModeComboBox.clktmpl
│ ├── FindMinErrorLevel.clktmpl
│ ├── FindOIPropertyByName.clktmpl
│ ├── GetAllowedDirsFromSettings.clktmpl
│ ├── GetAllowedFileExtensionsFromSettings.clktmpl
│ ├── GoToActionPlayer.clktmpl
│ ├── LoadCallerTemplateIntoAppUnderTest.clktmpl
│ ├── MenuCheckmark.pmtv
│ ├── OpenOIEditorPopUpMenuFromRightClick.clktmpl
│ ├── PlayAllActionsFromAppUnderTest.clktmpl
│ ├── PlayAllActionsFromAppUnderTestWithDebugging.clktmpl
│ ├── PlayAllActionsFromAppUnderTestWithDebuggingAndSteppingInto.clktmpl
│ ├── PrepareClientActionsWindowForEditingSettings.clktmpl
│ ├── PrepareClientActionsWindowForInteraction.clktmpl
│ ├── PrepareOIForReadingValues.clktmpl
│ ├── PrepareSearchAreaInteraction.clktmpl
│ ├── SetExecModeToClient.clktmpl
│ ├── SetExecModeToLocal.clktmpl
│ ├── SetExecModeToServer.clktmpl
│ ├── SetExecutionModeOnAppUnderTest.clktmpl
│ ├── StepOverOnAppUnderTest.clktmpl
│ ├── TemplateToBeCalled.clktmpl
│ ├── ValidateDraggingAction.clktmpl
│ ├── VerifyIfTheSubTemplateIsClosed.clktmpl
│ ├── VerifyOIDefaultValuesOnAppUnderTest.clktmpl
│ └── WaitForExecutionOnAppUnderTest.clktmpl
├── ClientUnderTestIcon.png
├── DrvIcon.png
└── ReadMe.txt
├── Tests
├── ActionsStuff.pas
├── BuiltInFunctions
│ ├── TestBuiltInFunctionArgParser.pas
│ ├── TestBuiltInFunctions.ctpr
│ ├── TestBuiltInFunctions.ctps
│ ├── TestBuiltInFunctions.ico
│ ├── TestBuiltInFunctions.ppr
│ └── TestBuiltInFunctions.res
├── DeniedTestFiles
│ └── ADeniedFile.clktmpl
├── TestClickerClientHTTPAPI.pas
├── TestClickerClientMemPlugins.pas
├── TestFiles
│ ├── ClickDebuggingButton.clktmpl
│ ├── ClickMeasurements.clktmpl
│ ├── CloseRenderingServer.clktmpl
│ ├── DragMeasurements.clktmpl
│ ├── FindBitOnMainNoFastSearch.clktmpl
│ ├── FindBitOnMainNoFastSearchWithSleepySearch.clktmpl
│ ├── FindBitOnMainWithFastSearch.clktmpl
│ ├── FindBitOnMainWithFastSearchWithSleepySearch.clktmpl
│ ├── FindSaveTemplateButtonAsSubControl.clktmpl
│ ├── FindTextOnAppIgnoreBG.clktmpl
│ ├── GradientText
│ │ ├── GradientText.ctpr
│ │ ├── GradientText.ctps
│ │ ├── GradientText.exe
│ │ ├── GradientText.ico
│ │ ├── GradientText.ppr
│ │ ├── GradientText.res
│ │ ├── GradientTextMainForm.frm
│ │ ├── GradientTextMainForm.pas
│ │ └── TestRenderingPage.html
│ ├── MouseWheelOnWinInterp.clktmpl
│ ├── MyLongText_GreenBlue.bmp
│ ├── MyLongText_RedYellow.bmp
│ ├── PartialTrackBar.pmtv
│ ├── PreviewButtonIcon.pmtv
│ ├── PreviewButtonIcon64.pmtv
│ ├── RenderGradientOnBrowser.clktmpl
│ ├── RenderGradientOnBrowser.pmtv
│ ├── RenderGradientOnServer.clktmpl
│ ├── RenderGradientWithCustomTextOnServer.pmtv
│ ├── RenderMultiBmpOnServer.clktmpl
│ ├── RenderMultiBmpOnServerWithTwoProfiles.clktmpl
│ ├── RenderMultiPmtvOnServer.clktmpl
│ ├── RenderMultiPmtvOnServerWithTwoProfiles.clktmpl
│ ├── RenderMultiTextOnServer.clktmpl
│ ├── RenderMultiTextOnServerWithTwoProfiles.clktmpl
│ ├── RenderMultiTextOnServerWithTwoProfilesAndOneBmp.clktmpl
│ ├── RenderMultiTextOnServerWithTwoProfilesAndOneBmpAndOnePmtv.clktmpl
│ ├── RenderMultiTextOnServerWithTwoProfilesAndOnePmtv.clktmpl
│ ├── RenderMultiTextOnServerWithTwoProfilesAndTextAndOneBmpAndOnePmtv.clktmpl
│ ├── RenderMultiTextOnServerWithTwoProfilesAndTextAndPmtvWithTwoOrders.clktmpl
│ ├── RenderTextOnServerForMultiSearchGB.pmtv
│ ├── RenderTextOnServerForMultiSearchGBRY.pmtv
│ ├── RenderTextOnServerForMultiSearchRY.pmtv
│ ├── ResetDeniedFileExecutedVar.clktmpl
│ ├── SearchGradientWithCustomTextOnServer.pmtv
│ ├── StartRenderingTestServer.clktmpl
│ ├── TestEditTemplateWithVars.clktmpl
│ ├── TestFindSubControlInWinOverlayWithCropFromScreenshot.clktmpl
│ ├── TestPlugin
│ │ ├── TestPlugin.ctpr
│ │ ├── TestPlugin.ctps
│ │ └── TestPlugin.ppr
│ ├── WinInterpTopSelectionLine.pmtv
│ └── WinSearchOverlayBlankRectangle.pmtv
├── TestHTTPAPI.pas
├── TestLowLevelHTTPAPI.pas
├── TestMiscHTTPAPI.pas
├── TestTemplateLevelHTTPAPI.pas
├── UI
│ ├── TestUI.pas
│ ├── UIActionsStuff.pas
│ ├── UIClickerUITests.ctpr
│ ├── UIClickerUITests.ctps
│ ├── UIClickerUITests.ico
│ ├── UIClickerUITests.ppr
│ ├── UIClickerUITests.res
│ └── UITestUtils.pas
├── UIClickerHTTPTests.ctpr
├── UIClickerHTTPTests.ctps
├── UIClickerHTTPTests.ico
├── UIClickerHTTPTests.ppr
└── UIClickerHTTPTests.res
├── Tools
└── ClkDbgSym
│ ├── ClkDbgSym.ctpr
│ ├── ClkDbgSym.ctps
│ ├── ClkDbgSym.exe
│ └── ClkDbgSym.ppr
├── UIClicker.ctpr
├── UIClicker.ctps
├── UIClicker.ico
├── UIClicker.ppr
├── UIClicker.res
├── UIClickerMainFormFP.frm
├── UIClickerMainFormFP.pas
└── py
├── Tests
├── RunExecuteCallTemplateAction.py
├── RunExecuteClickAction.py
├── RunExecuteEditTemplateAction.py
├── RunExecuteExecAppAction.py
├── RunExecuteFindControlAction.py
├── RunExecuteFindSubControlAction.py
├── RunExecuteLoadSetVarFromFileAction.py
├── RunExecutePluginAction.py
├── RunExecuteSaveSetVarToFileAction.py
├── RunExecuteSetControlTextAction.py
├── RunExecuteSetVarAction.py
├── RunExecuteSleepAction.py
└── RunExecuteWindowOperationsAction.py
├── UIClickerClient.py
├── UIClickerTypes.py
├── bmps
├── PreviewButtonIcon.pmtv
├── PreviewButtonIcon64.pmtv
├── ShowActionsWindow_Focused.bmp
├── ShowActionsWindow_FocusedHighlighted.bmp
├── ShowActionsWindow_Unfocused.bmp
├── ShowWindowInterpreter32.bmp
├── ShowWindowInterpreter64.bmp
└── ShowWindowInterpreter_Wine.bmp
└── wrapper.py
/BinSearchValues.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Dec 2019
4 | initial release date: 13 Sep 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit BinSearchValues;
26 |
27 | interface
28 |
29 | type
30 | TIntArr = array of Integer;
31 | TIntArrArr = array of TIntArr;
32 |
33 | procedure GenerateBinarySearchValuesForImage(ImageWidth, ImageHeight: Integer; var XValues, YValues: TIntArrArr);
34 | procedure GenerateBinarySearchValues(SpaceWidth: Integer; var Values: TIntArrArr);
35 | procedure ClearUsedValues(var Values: TIntArrArr);
36 |
37 |
38 | implementation
39 |
40 |
41 | uses
42 | SysUtils;
43 |
44 |
45 | procedure GenerateBinarySearchValues(SpaceWidth: Integer; var Values: TIntArrArr);
46 | var
47 | i, j, n, x: Integer;
48 | PartExt, HalfExt: Extended;
49 | begin
50 | PartExt := SpaceWidth;
51 | SetLength(Values, 1);
52 |
53 | for i := 1 to SpaceWidth do
54 | begin
55 | HalfExt := PartExt / 2;
56 |
57 | for j := 0 to Round(SpaceWidth / PartExt) do
58 | begin
59 | x := Round(HalfExt + j * PartExt);
60 | if x > SpaceWidth then
61 | Continue;
62 |
63 | n := Length(Values) - 1;
64 | SetLength(Values[n], Length(Values[n]) + 1);
65 | Values[n][Length(Values[n]) - 1] := x;
66 | end;
67 |
68 | PartExt := PartExt / 2; //do not use shifting, let it be extended
69 | if PartExt <= 3 then //3
70 | Break;
71 |
72 | SetLength(Values, Length(Values) + 1);
73 | end;
74 | end;
75 |
76 |
77 | procedure ExtendIntArrArr(var Values: TIntArrArr; NewLen: Integer);
78 | var
79 | i, j, OldLen: Integer;
80 | begin
81 | OldLen := Length(Values);
82 | SetLength(Values, NewLen);
83 |
84 | for i := OldLen to NewLen - 1 do
85 | begin
86 | SetLength(Values[i], Length(Values[OldLen - 1]));
87 | for j := 0 to Length(Values[i]) - 1 do
88 | Values[i][j] := Values[OldLen - 1][j];
89 | end;
90 | end;
91 |
92 |
93 | procedure GenerateBinarySearchValuesForImage(ImageWidth, ImageHeight: Integer; var XValues, YValues: TIntArrArr);
94 | begin
95 | GenerateBinarySearchValues(ImageWidth, XValues);
96 | GenerateBinarySearchValues(ImageHeight, YValues);
97 |
98 | if Length(XValues) > Length(YValues) then
99 | ExtendIntArrArr(YValues, Length(XValues))
100 | else
101 | if Length(YValues) > Length(XValues) then
102 | ExtendIntArrArr(XValues, Length(YValues));
103 |
104 | if Length(YValues) <> Length(XValues) then
105 | raise Exception.Create('Bug in extend');
106 | end;
107 |
108 |
109 | procedure ClearUsedValues(var Values: TIntArrArr);
110 | var
111 | i: Integer;
112 | begin
113 | for i := 0 to Length(Values) - 1 do
114 | SetLength(Values[i], 0);
115 |
116 | SetLength(Values, 0);
117 | end;
118 |
119 |
120 | end.
121 |
--------------------------------------------------------------------------------
/BitmapConv.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2023 VCC
3 | creation date: 07 Dec 2023
4 | initial release date: 07 Dec 2023
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit BitmapConv;
26 |
27 | {$IFDEF FPC}
28 | {$MODE Delphi}
29 | {$ENDIF}
30 |
31 | interface
32 |
33 | uses
34 | {$IFDEF Windows}
35 | Windows, ShellAPI,
36 | {$ENDIF}
37 | SysUtils, Graphics, ExtCtrls;
38 |
39 | procedure WipeBitmap(ABitmap: TBitmap; NewWidth, NewHeight: Integer);
40 | procedure WipeImage(AImg: TImage; NewWidth, NewHeight: Integer);
41 |
42 | procedure DrawExeIconOnBmp(ABitmap: TBitmap; AFileName: string);
43 | procedure DrawPngOnBmp(ABitmap: TBitmap; AFileName: string);
44 | procedure DrawJpgOnBmp(ABitmap: TBitmap; AFileName: string);
45 | procedure DrawIcoOnBmp(ABitmap: TBitmap; AFileName: string);
46 |
47 |
48 | implementation
49 |
50 |
51 | procedure DrawWipeRect(ACanvas: TCanvas; NewWidth, NewHeight: Integer);
52 | begin
53 | ACanvas.Lock;
54 | try
55 | ACanvas.Brush.Style := bsSolid;
56 | ACanvas.Brush.Color := clWhite;
57 | ACanvas.Pen.Color := clWhite;
58 | ACanvas.Rectangle(0, 0, NewWidth {- 1}, NewHeight {- 1});
59 | finally
60 | ACanvas.Unlock
61 | end;
62 | end;
63 |
64 |
65 | procedure WipeBitmap(ABitmap: TBitmap; NewWidth, NewHeight: Integer);
66 | begin
67 | //ABitmap.Clear;
68 | ABitmap.SetSize(NewWidth, NewHeight);
69 | DrawWipeRect(ABitmap.Canvas, NewWidth, NewHeight);
70 | end;
71 |
72 |
73 | procedure WipeImage(AImg: TImage; NewWidth, NewHeight: Integer);
74 | begin
75 | //AImg.Picture.Clear;
76 | AImg.Width := NewWidth;
77 | AImg.Height := NewHeight;
78 | AImg.Picture.Bitmap.SetSize(NewWidth, NewHeight);
79 |
80 | DrawWipeRect(AImg.Canvas, NewWidth, NewHeight);
81 | //AImg.Repaint;
82 | end;
83 |
84 |
85 | procedure DrawExeIconOnBmp(ABitmap: TBitmap; AFileName: string);
86 | var
87 | IconHandle: THandle;
88 | begin
89 | WipeBitmap(ABitmap, 32, 32);
90 |
91 | {$IFDEF Windows}
92 | IconHandle := ExtractIcon(HINSTANCE, PChar(AFileName), 0);
93 | try
94 | if IconHandle > 1 then
95 | begin
96 | if not DrawIcon(ABitmap.Canvas.Handle, 0, 0, IconHandle) then
97 | begin
98 | ABitmap.Canvas.Font.Color := clYellow;
99 | ABitmap.Canvas.Brush.Color := clGreen;
100 | ABitmap.Canvas.TextOut(1, 1, 'SysErr:');
101 | ABitmap.Canvas.TextOut(1, 16, IntToStr(GetLastError));
102 | end;
103 | end
104 | else
105 | begin
106 | ABitmap.Canvas.Font.Color := clFuchsia;
107 | ABitmap.Canvas.Brush.Color := clYellow;
108 | ABitmap.Canvas.TextOut(1, 1, 'Handle:');
109 | ABitmap.Canvas.TextOut(1, 16, IntToStr(IconHandle));
110 | end;
111 | finally
112 | DestroyIcon(IconHandle);
113 | end;
114 | {$ELSE}
115 | ABitmap.Canvas.Font.Color := clLime;
116 | ABitmap.Canvas.Brush.Color := clGreen;
117 | ABitmap.Canvas.TextOut(1, 1, 'MSWin');
118 | ABitmap.Canvas.TextOut(1, 16, 'Only');
119 | {$ENDIF}
120 | end;
121 |
122 |
123 | procedure DrawPngOnBmp(ABitmap: TBitmap; AFileName: string);
124 | var
125 | TempPng: TPNGImage;
126 | begin
127 | TempPng := TPNGImage.Create;
128 | try
129 | TempPng.LoadFromFile(AFileName);
130 | WipeBitmap(ABitmap, TempPng.Width, TempPng.Height);
131 |
132 | ABitmap.Canvas.Draw(0, 0, TempPng);
133 | finally
134 | TempPng.Free;
135 | end;
136 | end;
137 |
138 |
139 | procedure DrawJpgOnBmp(ABitmap: TBitmap; AFileName: string);
140 | var
141 | TempJpg: TJPEGImage;
142 | begin
143 | TempJpg := TJPEGImage.Create;
144 | try
145 | TempJpg.LoadFromFile(AFileName);
146 | WipeBitmap(ABitmap, TempJpg.Width, TempJpg.Height);
147 |
148 | ABitmap.Canvas.Draw(0, 0, TempJpg);
149 | finally
150 | TempJpg.Free;
151 | end;
152 | end;
153 |
154 |
155 | procedure DrawIcoOnBmp(ABitmap: TBitmap; AFileName: string);
156 | var
157 | TempIco: TIcon;
158 | begin
159 | TempIco := TIcon.Create;
160 | try
161 | TempIco.LoadFromFile(AFileName);
162 | WipeBitmap(ABitmap, TempIco.Width, TempIco.Height);
163 |
164 | ABitmap.Canvas.Draw(0, 0, TempIco);
165 | finally
166 | TempIco.Free;
167 | end;
168 | end;
169 |
170 |
171 | end.
172 |
173 |
--------------------------------------------------------------------------------
/ClickerActionsPaletteFrame.frm:
--------------------------------------------------------------------------------
1 | object frClickerActionsPalette: TfrClickerActionsPalette
2 | Left = 0
3 | Height = 240
4 | Top = 0
5 | Width = 171
6 | ClientHeight = 240
7 | ClientWidth = 171
8 | TabOrder = 0
9 | DesignLeft = 86
10 | DesignTop = 85
11 | object vstActionsPalette: TVirtualStringTree
12 | Left = 0
13 | Height = 240
14 | Top = 0
15 | Width = 171
16 | Anchors = [akTop, akLeft, akRight, akBottom]
17 | Colors.UnfocusedColor = clMedGray
18 | DefaultNodeHeight = 26
19 | DefaultText = 'Node'
20 | Header.AutoSizeIndex = 0
21 | Header.Columns = <>
22 | Header.DefaultHeight = 17
23 | Header.Height = 17
24 | Header.MainColumn = -1
25 | Indent = 4
26 | TabOrder = 0
27 | TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowRoot, toThemeAware, toUseBlendedImages]
28 | TreeOptions.SelectionOptions = [toFullRowSelect]
29 | OnGetText = vstActionsPaletteGetText
30 | OnGetImageIndex = vstActionsPaletteGetImageIndex
31 | end
32 | object tmrHide: TTimer
33 | Enabled = False
34 | OnTimer = tmrHideTimer
35 | Left = 50
36 | Top = 24
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/ClickerActionsPaletteFrame.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Dec 2019
4 | initial release date: 13 Sep 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerActionsPaletteFrame;
26 |
27 | {$mode ObjFPC}{$H+}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, Forms, Controls, VirtualTrees, ExtCtrls;
33 |
34 | type
35 |
36 | { TfrClickerActionsPalette }
37 |
38 | TfrClickerActionsPalette = class(TFrame)
39 | tmrHide: TTimer;
40 | vstActionsPalette: TVirtualStringTree;
41 | procedure tmrHideTimer(Sender: TObject);
42 | procedure vstActionsPaletteGetImageIndex(Sender: TBaseVirtualTree;
43 | Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
44 | var Ghosted: Boolean; var ImageIndex: Integer);
45 | procedure vstActionsPaletteGetText(Sender: TBaseVirtualTree;
46 | Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
47 | var CellText: String);
48 | private
49 | FImages: TImageList;
50 | FActions: TStringList;
51 |
52 | FOwnerPanel: TPanel;
53 |
54 | procedure SetImages(Value: TImageList);
55 | procedure HideOwnerPanel;
56 | public
57 | constructor Create(AOwner: TComponent); override;
58 | destructor Destroy; override;
59 | procedure SetActionNames(AListOfActions: TStringList);
60 | procedure StartAutoHide;
61 | procedure ResetAutoHideTimer;
62 |
63 | property Images: TImageList read FImages write SetImages;
64 | property OwnerPanel: TPanel write FOwnerPanel;
65 | end;
66 |
67 | implementation
68 |
69 | {$R *.frm}
70 |
71 | { TfrClickerActionsPalette }
72 |
73 | constructor TfrClickerActionsPalette.Create(AOwner: TComponent);
74 | begin
75 | inherited Create(AOwner);
76 | FActions := TStringList.Create;
77 | FActions.LineBreak := #13#10;
78 | FImages := nil;
79 | FOwnerPanel := nil;
80 | vstActionsPalette.Caption := 'ActionsPalette';
81 | end;
82 |
83 |
84 | destructor TfrClickerActionsPalette.Destroy;
85 | begin
86 | FActions.Free;
87 | inherited Destroy;
88 | end;
89 |
90 |
91 | procedure TfrClickerActionsPalette.vstActionsPaletteGetText(
92 | Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
93 | TextType: TVSTTextType; var CellText: String);
94 | begin
95 | try
96 | CellText := FActions.Strings[Node^.Index];
97 | except
98 | CellText := 'bug';
99 | end;
100 | end;
101 |
102 |
103 | procedure TfrClickerActionsPalette.vstActionsPaletteGetImageIndex(
104 | Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
105 | Column: TColumnIndex; var Ghosted: Boolean; var ImageIndex: Integer);
106 | begin
107 | ImageIndex := Node^.Index;
108 | end;
109 |
110 |
111 | procedure TfrClickerActionsPalette.HideOwnerPanel;
112 | begin
113 | if Assigned(FOwnerPanel) then
114 | FOwnerPanel.Hide;
115 | end;
116 |
117 |
118 | procedure TfrClickerActionsPalette.StartAutoHide;
119 | begin
120 | tmrHide.Tag := 0;
121 | tmrHide.Enabled := True;
122 | end;
123 |
124 |
125 | procedure TfrClickerActionsPalette.ResetAutoHideTimer;
126 | begin
127 | tmrHide.Enabled := False;
128 | tmrHide.Tag := 0;
129 | end;
130 |
131 |
132 | procedure TfrClickerActionsPalette.tmrHideTimer(Sender: TObject);
133 | begin
134 | tmrHide.Tag := tmrHide.Tag + 1;
135 |
136 | if tmrHide.Tag >= 5 then
137 | begin
138 | ResetAutoHideTimer;
139 | HideOwnerPanel;
140 | end;
141 | end;
142 |
143 |
144 | procedure TfrClickerActionsPalette.SetActionNames(AListOfActions: TStringList);
145 | begin
146 | vstActionsPalette.BeginUpdate;
147 | try
148 | FActions.Clear;
149 | FActions.AddStrings(AListOfActions);
150 | vstActionsPalette.RootNodeCount := FActions.Count;
151 | finally
152 | vstActionsPalette.EndUpdate;
153 | end;
154 | end;
155 |
156 |
157 | procedure TfrClickerActionsPalette.SetImages(Value: TImageList);
158 | begin
159 | if FImages <> Value then
160 | begin
161 | FImages := Value;
162 | vstActionsPalette.StateImages := Value;
163 | end;
164 | end;
165 |
166 | end.
167 |
168 |
--------------------------------------------------------------------------------
/ClickerBMPTextFrame.frm:
--------------------------------------------------------------------------------
1 | object frClickerBMPText: TfrClickerBMPText
2 | Left = 0
3 | Height = 158
4 | Top = 0
5 | Width = 434
6 | ClientHeight = 158
7 | ClientWidth = 434
8 | TabOrder = 0
9 | DesignLeft = 86
10 | DesignTop = 85
11 | object scrboxPreview: TScrollBox
12 | Left = 0
13 | Height = 89
14 | Top = 14
15 | Width = 265
16 | HorzScrollBar.Increment = 25
17 | HorzScrollBar.Page = 257
18 | HorzScrollBar.Smooth = True
19 | HorzScrollBar.Tracking = True
20 | VertScrollBar.Page = 85
21 | VertScrollBar.Smooth = True
22 | VertScrollBar.Tracking = True
23 | ClientHeight = 85
24 | ClientWidth = 261
25 | Color = clYellow
26 | ParentColor = False
27 | ParentShowHint = False
28 | PopupMenu = pmPreviewImage
29 | ShowHint = True
30 | TabOrder = 0
31 | object imgPreview: TImage
32 | Left = 1
33 | Height = 84
34 | Hint = 'Right-click for options'
35 | Top = 1
36 | Width = 256
37 | OnResize = imgPreviewResize
38 | ParentShowHint = False
39 | PopupMenu = pmPreviewImage
40 | ShowHint = True
41 | end
42 | end
43 | object lblPreview: TLabel
44 | Left = 0
45 | Height = 15
46 | Hint = 'Click this text to refresh the preview bitmap.'
47 | Top = 0
48 | Width = 41
49 | Caption = 'Preview'
50 | ParentShowHint = False
51 | ShowHint = True
52 | OnClick = lblPreviewClick
53 | end
54 | object pmPreviewImage: TPopupMenu
55 | Left = 336
56 | Top = 94
57 | object MenuItemSavePreviewImage: TMenuItem
58 | Caption = 'Save preview image as bmp...'
59 | OnClick = MenuItemSavePreviewImageClick
60 | end
61 | object MenuItemCopyPreviewImage: TMenuItem
62 | Caption = 'Copy preview image to clipboard'
63 | OnClick = MenuItemCopyPreviewImageClick
64 | end
65 | object MenuItemCopyPreviewImageAndCroppingLines: TMenuItem
66 | Caption = 'Copy preview image and cropping lines to clipboard'
67 | OnClick = MenuItemCopyPreviewImageAndCroppingLinesClick
68 | end
69 | object MenuItemCopyCroppedPreviewImage: TMenuItem
70 | Caption = 'Copy cropped preview image to clipboard'
71 | OnClick = MenuItemCopyCroppedPreviewImageClick
72 | end
73 | object MenuItemErasePreviewImage: TMenuItem
74 | Caption = 'Erase preview image'
75 | OnClick = MenuItemErasePreviewImageClick
76 | end
77 | object N1: TMenuItem
78 | Caption = '-'
79 | end
80 | object MenuItemCopyCroppingValuesToOtherProfiles: TMenuItem
81 | Caption = 'Copy these cropping values to all the other font profiles'
82 | OnClick = MenuItemCopyCroppingValuesToOtherProfilesClick
83 | end
84 | end
85 | object tmrUpdateCropEditBoxes: TTimer
86 | Enabled = False
87 | Interval = 10
88 | OnTimer = tmrUpdateCropEditBoxesTimer
89 | Left = 64
90 | Top = 80
91 | end
92 | object tmrStartup: TTimer
93 | Enabled = False
94 | Interval = 10
95 | OnTimer = tmrStartupTimer
96 | Left = 200
97 | Top = 94
98 | end
99 | end
100 |
--------------------------------------------------------------------------------
/ClickerClient/ClickerClient.ctpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | -
29 |
30 |
31 | -
32 |
33 |
34 | -
35 |
36 |
37 | -
38 |
39 |
40 | -
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 | -
123 |
124 |
125 | -
126 |
127 |
128 | -
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/ClickerClient/ClickerClient.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/ClickerClient/ClickerClient.dll
--------------------------------------------------------------------------------
/ClickerClient/ClickerClientLoggingForm.frm:
--------------------------------------------------------------------------------
1 | object frmClickerClientLogging: TfrmClickerClientLogging
2 | Left = 329
3 | Height = 255
4 | Top = 199
5 | Width = 831
6 | Caption = 'Clicker Client'
7 | ClientHeight = 255
8 | ClientWidth = 831
9 | OnClose = FormClose
10 | LCLVersion = '8.4'
11 | object memLog: TMemo
12 | Left = 8
13 | Height = 240
14 | Top = 8
15 | Width = 812
16 | Anchors = [akTop, akLeft, akRight, akBottom]
17 | Font.CharSet = ANSI_CHARSET
18 | Font.Height = -13
19 | Font.Name = 'Courier New'
20 | Font.Pitch = fpFixed
21 | Font.Quality = fqDraft
22 | ParentFont = False
23 | ParentShowHint = False
24 | ReadOnly = True
25 | ScrollBars = ssBoth
26 | TabOrder = 0
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/ClickerClient/ClickerClientLoggingForm.pas:
--------------------------------------------------------------------------------
1 | unit ClickerClientLoggingForm;
2 |
3 | {$mode Delphi}
4 |
5 | interface
6 |
7 | uses
8 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
9 |
10 | type
11 |
12 | { TfrmClickerClientLogging }
13 |
14 | TfrmClickerClientLogging = class(TForm)
15 | memLog: TMemo;
16 | procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
17 | private
18 |
19 | public
20 | procedure AddToLog(AMsg: string);
21 | procedure HandleOnLogMissingServerFile(AMsg: string);
22 | end;
23 |
24 | var
25 | frmClickerClientLogging: TfrmClickerClientLogging;
26 |
27 | implementation
28 |
29 | {$R *.frm}
30 |
31 | { TfrmClickerClientLogging }
32 |
33 | procedure TfrmClickerClientLogging.FormClose(Sender: TObject;
34 | var CloseAction: TCloseAction);
35 | begin
36 | CloseAction := caFree;
37 | end;
38 |
39 |
40 | procedure TfrmClickerClientLogging.AddToLog(AMsg: string);
41 | begin
42 | memLog.Lines.Add(DateTimeToStr(Now) + ' ' + AMsg);
43 | end;
44 |
45 |
46 | procedure TfrmClickerClientLogging.HandleOnLogMissingServerFile(AMsg: string);
47 | begin
48 | AddToLog(AMsg);
49 | end;
50 |
51 | end.
52 |
53 |
--------------------------------------------------------------------------------
/ClickerClient/DllUtils.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Jul 2022
4 | initial release date: 26 Jul 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 | unit DllUtils;
25 |
26 | {$mode Delphi}
27 |
28 | interface
29 |
30 | uses
31 | Classes, SysUtils;
32 |
33 |
34 | const
35 | CMaxSharedStringLength = 10 * 1048576; //10MB
36 |
37 | var
38 | ClientLastError: string;
39 |
40 |
41 | function SetPointedContentFromString(ASrc: string; ADest: Pointer; AMaxLen: Integer = CMaxSharedStringLength): Integer;
42 | procedure SetPointedContentToString(ASrc: Pointer; var ADest: string);
43 |
44 |
45 | implementation
46 |
47 |
48 | uses
49 | Math;
50 |
51 |
52 | function SetPointedContentFromString(ASrc: string; ADest: Pointer; AMaxLen: Integer = CMaxSharedStringLength): Integer;
53 | begin
54 | if Length(ASrc) > AMaxLen then
55 | begin
56 | ASrc := 'Can''t set the string over its allocated size. Please increase CMaxSharedStringLength to at least ' + IntToStr(Length(ASrc)) + ', or simply pass a greater value.';
57 | ClientLastError := ASrc;
58 | end;
59 |
60 | Result := Length(ASrc);
61 | if Result > AMaxLen then
62 | Result := AMaxLen;
63 |
64 | if ASrc = '' then
65 | ASrc := '0'; //prevent copying from nil
66 |
67 | Move(ASrc[1], ADest^, Result + 1); //use + 1, to copy the null terminating character
68 | end;
69 |
70 |
71 | procedure SetPointedContentToString(ASrc: Pointer; var ADest: string);
72 | begin
73 | if ASrc = nil then
74 | begin
75 | ADest := '';
76 | Exit;
77 | end;
78 |
79 | SetLength(ADest, Min(StrLen(ASrc), CMaxSharedStringLength));
80 | Move(ASrc^, ADest[1], Length(ADest));
81 | end;
82 |
83 | end.
84 |
85 |
--------------------------------------------------------------------------------
/ClickerConditionEditorForm.frm:
--------------------------------------------------------------------------------
1 | object frmClickerConditionEditor: TfrmClickerConditionEditor
2 | Left = 387
3 | Height = 319
4 | Top = 43
5 | Width = 1027
6 | Caption = 'Clicker Condition Editor'
7 | ClientHeight = 319
8 | ClientWidth = 1027
9 | Constraints.MinHeight = 263
10 | Constraints.MinWidth = 888
11 | OnClose = FormClose
12 | OnCreate = FormCreate
13 | LCLVersion = '8.4'
14 | object pnlActionConditions: TPanel
15 | Left = 0
16 | Height = 272
17 | Top = 0
18 | Width = 1022
19 | Anchors = [akTop, akLeft, akRight, akBottom]
20 | ParentColor = False
21 | TabOrder = 0
22 | end
23 | object btnOK: TButton
24 | Left = 432
25 | Height = 25
26 | Top = 288
27 | Width = 75
28 | Anchors = [akBottom]
29 | Caption = 'OK'
30 | OnClick = btnOKClick
31 | TabOrder = 1
32 | end
33 | object btnCancel: TButton
34 | Left = 520
35 | Height = 25
36 | Top = 288
37 | Width = 75
38 | Anchors = [akBottom]
39 | Caption = 'Cancel'
40 | OnClick = btnCancelClick
41 | TabOrder = 2
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/ClickerConditionEditorForm.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Dec 2019
4 | initial release date: 13 Sep 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerConditionEditorForm;
26 |
27 | {$H+}
28 | {$IFDEF FPC}
29 | //{$MODE Delphi}
30 | {$ENDIF}
31 |
32 | interface
33 |
34 | uses
35 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
36 | ClickerConditionEditorFrame;
37 |
38 | type
39 |
40 | { TfrmClickerConditionEditor }
41 |
42 | TfrmClickerConditionEditor = class(TForm)
43 | btnOK: TButton;
44 | btnCancel: TButton;
45 | pnlActionConditions: TPanel;
46 | procedure btnCancelClick(Sender: TObject);
47 | procedure btnOKClick(Sender: TObject);
48 | procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
49 | procedure FormCreate(Sender: TObject);
50 | private
51 | FfrClickerConditionEditor: TfrClickerConditionEditor;
52 | FModified: Boolean;
53 |
54 | procedure CreateRemainingUIComponents;
55 | procedure ClickerConditionEditorControlsModified;
56 | public
57 |
58 | end;
59 |
60 |
61 | function EditActionCondition(var AActionCondition: string): Boolean;
62 |
63 | implementation
64 |
65 | {$R *.frm}
66 |
67 |
68 | function EditActionCondition(var AActionCondition: string): Boolean;
69 | var
70 | frmClickerConditionEditor: TfrmClickerConditionEditor;
71 | begin
72 | Result := False;
73 | Application.CreateForm(TfrmClickerConditionEditor, frmClickerConditionEditor);
74 |
75 | frmClickerConditionEditor.FfrClickerConditionEditor.DisplayActionCondition(AActionCondition);
76 | frmClickerConditionEditor.ShowModal;
77 |
78 | if (frmClickerConditionEditor.Tag = 1) and (frmClickerConditionEditor.FModified) then
79 | begin
80 | Result := True;
81 | AActionCondition := frmClickerConditionEditor.FfrClickerConditionEditor.GetActionCondition;
82 | end;
83 | end;
84 |
85 | { TfrmClickerConditionEditor }
86 |
87 | procedure TfrmClickerConditionEditor.FormCreate(Sender: TObject);
88 | begin
89 | CreateRemainingUIComponents;
90 | FModified := False;
91 | end;
92 |
93 |
94 | procedure TfrmClickerConditionEditor.FormClose(Sender: TObject;
95 | var CloseAction: TCloseAction);
96 | begin
97 | CloseAction := caFree;
98 | end;
99 |
100 |
101 | procedure TfrmClickerConditionEditor.btnOKClick(Sender: TObject);
102 | begin
103 | Tag := 1;
104 | Close;
105 | end;
106 |
107 |
108 | procedure TfrmClickerConditionEditor.btnCancelClick(Sender: TObject);
109 | begin
110 | Tag := 0;
111 | Close;
112 | end;
113 |
114 |
115 | procedure TfrmClickerConditionEditor.ClickerConditionEditorControlsModified;
116 | begin
117 | FModified := True;
118 | end;
119 |
120 |
121 | procedure TfrmClickerConditionEditor.CreateRemainingUIComponents;
122 | begin
123 | FfrClickerConditionEditor := TfrClickerConditionEditor.Create(Self);
124 | FfrClickerConditionEditor.Parent := pnlActionConditions; //for some reason, using TabSheetCondition leads to a hidden frame
125 |
126 | FfrClickerConditionEditor.Left := 3;
127 | FfrClickerConditionEditor.Top := 3;
128 | FfrClickerConditionEditor.Width := pnlActionConditions.Width - 3;
129 | FfrClickerConditionEditor.Height := pnlActionConditions.Height - 12;
130 | FfrClickerConditionEditor.Anchors := [akBottom, akLeft, akRight, akTop];
131 | FfrClickerConditionEditor.OnControlsModified := ClickerConditionEditorControlsModified;
132 | FfrClickerConditionEditor.Visible := True;
133 | end;
134 |
135 |
136 | end.
137 |
138 |
--------------------------------------------------------------------------------
/ClickerExecAppFrame.frm:
--------------------------------------------------------------------------------
1 | object frClickerExecApp: TfrClickerExecApp
2 | Left = 0
3 | Height = 109
4 | Top = 0
5 | Width = 333
6 | ClientHeight = 109
7 | ClientWidth = 333
8 | TabOrder = 0
9 | DesignLeft = 86
10 | DesignTop = 85
11 | object lblExecAppParams: TLabel
12 | Left = 2
13 | Height = 15
14 | Top = 0
15 | Width = 59
16 | Caption = 'Parameters'
17 | end
18 | object memExecAppParams: TMemo
19 | Left = 2
20 | Height = 89
21 | Hint = 'Enter each parameter on a new line. Do not add quotes. Replacements are available.'
22 | Top = 16
23 | Width = 326
24 | Anchors = [akTop, akLeft, akRight, akBottom]
25 | OnChange = memExecAppParamsChange
26 | ParentShowHint = False
27 | ScrollBars = ssBoth
28 | ShowHint = True
29 | TabOrder = 0
30 | WordWrap = False
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/ClickerExecAppFrame.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Feb 2023
4 | initial release date: 07 Feb 2023
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerExecAppFrame;
26 |
27 | {$mode Delphi}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, Forms, Controls, StdCtrls, ClickerUtils;
33 |
34 | type
35 |
36 | { TfrClickerExecApp }
37 |
38 | TfrClickerExecApp = class(TFrame)
39 | lblExecAppParams: TLabel;
40 | memExecAppParams: TMemo;
41 | procedure memExecAppParamsChange(Sender: TObject);
42 | private
43 | FOnTriggerOnControlsModified: TOnTriggerOnControlsModified;
44 |
45 | procedure DoOnTriggerOnControlsModified;
46 | public
47 | constructor Create(AOwner: TComponent); override;
48 | property OnTriggerOnControlsModified: TOnTriggerOnControlsModified write FOnTriggerOnControlsModified;
49 | end;
50 |
51 | implementation
52 |
53 | {$R *.frm}
54 |
55 | { TfrClickerExecApp }
56 |
57 |
58 | constructor TfrClickerExecApp.Create(AOwner: TComponent);
59 | begin
60 | inherited Create(AOwner);
61 |
62 | FOnTriggerOnControlsModified := nil;
63 | end;
64 |
65 |
66 | procedure TfrClickerExecApp.DoOnTriggerOnControlsModified;
67 | begin
68 | if not Assigned(FOnTriggerOnControlsModified) then
69 | raise Exception.Create('OnTriggerOnControlsModified not assigned.')
70 | else
71 | FOnTriggerOnControlsModified;
72 | end;
73 |
74 |
75 | procedure TfrClickerExecApp.memExecAppParamsChange(Sender: TObject);
76 | begin
77 | DoOnTriggerOnControlsModified;
78 | end;
79 |
80 | end.
81 |
82 |
--------------------------------------------------------------------------------
/ClickerPrimitivesCompEditors.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2023 VCC
3 | creation date: Jun 2023
4 | initial release date: 08 Jun 2023
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerPrimitivesCompEditors;
26 |
27 | {$mode Delphi}
28 | {$WARN 5029 off : Private field "$1.$2" is never used}
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, StdCtrls;
33 |
34 |
35 | type
36 | TLabelArr = array of TLabel;
37 |
38 | TPrimitive_LineEditors = class
39 | private
40 | Endpoint1: TLabel;
41 | Endpoint2: TLabel;
42 | end;
43 |
44 |
45 | TPrimitive_RectangleEditors = class
46 | private
47 | Endpoint_TopL: TLabel;
48 | Endpoint_TopR: TLabel;
49 | Endpoint_BotL: TLabel;
50 | Endpoint_BotR: TLabel;
51 |
52 | Endpoint_L: TLabel;
53 | Endpoint_T: TLabel;
54 | Endpoint_R: TLabel;
55 | Endpoint_B: TLabel;
56 | end;
57 |
58 |
59 | TPrimitive_BezierEditors = class
60 | private
61 | Endpoints: TLabelArr;
62 | end;
63 |
64 | //The text primitive is not resizable, so there is no editor for it. The text itself can be dragged, but that's all.
65 |
66 | implementation
67 |
68 | {
69 | - Every primitive should have its own editor, which is a class, containing the editpoints (TLabel objects, used for dragging)
70 | They have to be primitive-specific, because each primitive has its own vertices (a line has 2, a rectangle has 8, a bezier curve has many)
71 | - Each edit point has to be specifically assigned to edit one part of the primitive, so there is little generic (sharable) code
72 | - Edit points cannot be stored into an array, except for bezier or polygons
73 |
74 |
75 | }
76 |
77 | end.
78 |
79 |
--------------------------------------------------------------------------------
/ClickerRemoteScreenForm.frm:
--------------------------------------------------------------------------------
1 | object frmClickerRemoteScreen: TfrmClickerRemoteScreen
2 | Left = 387
3 | Height = 385
4 | Top = 43
5 | Width = 767
6 | Caption = 'Clicker Remote Screen'
7 | ClientHeight = 385
8 | ClientWidth = 767
9 | Constraints.MinHeight = 385
10 | Constraints.MinWidth = 767
11 | LCLVersion = '8.4'
12 | OnCreate = FormCreate
13 | object btnRefreshScreenshot: TButton
14 | Left = 8
15 | Height = 25
16 | Hint = 'Clicking sends a request to server, at the specified address in Actions window.'
17 | Top = 0
18 | Width = 115
19 | Caption = 'Refresh screenshot'
20 | ParentShowHint = False
21 | ShowHint = True
22 | TabOrder = 0
23 | OnClick = btnRefreshScreenshotClick
24 | end
25 | object scrboxScannedComponents: TScrollBox
26 | Left = 0
27 | Height = 328
28 | Top = 56
29 | Width = 764
30 | HorzScrollBar.Page = 184
31 | HorzScrollBar.Tracking = True
32 | VertScrollBar.Page = 184
33 | VertScrollBar.Tracking = True
34 | Anchors = [akTop, akLeft, akRight, akBottom]
35 | ClientHeight = 324
36 | ClientWidth = 760
37 | TabOrder = 1
38 | OnMouseWheel = scrboxScannedComponentsMouseWheel
39 | object imgScreenshot: TImage
40 | Left = 28
41 | Height = 156
42 | Top = 28
43 | Width = 156
44 | OnMouseDown = imgScreenshotMouseDown
45 | OnMouseUp = imgScreenshotMouseUp
46 | end
47 | end
48 | object lbeCompText: TLabeledEdit
49 | Left = 480
50 | Height = 23
51 | Top = 24
52 | Width = 136
53 | Color = clBtnFace
54 | EditLabel.Height = 15
55 | EditLabel.Width = 136
56 | EditLabel.Caption = 'Comp text'
57 | ReadOnly = True
58 | TabOrder = 2
59 | end
60 | object lbeCompClass: TLabeledEdit
61 | Left = 624
62 | Height = 23
63 | Top = 24
64 | Width = 136
65 | Color = clBtnFace
66 | EditLabel.Height = 15
67 | EditLabel.Width = 136
68 | EditLabel.Caption = 'Component class'
69 | ReadOnly = True
70 | TabOrder = 3
71 | end
72 | object lblInfo: TLabel
73 | Left = 8
74 | Height = 15
75 | Hint = 'Clicking sends a request to server, at the specified address in Actions window.'
76 | Top = 32
77 | Width = 327
78 | Caption = 'Click on the image below, to get the component info at point.'
79 | ParentShowHint = False
80 | ShowHint = True
81 | end
82 | object edtHandle: TEdit
83 | Left = 416
84 | Height = 15
85 | Top = 32
86 | Width = 61
87 | BorderStyle = bsNone
88 | Color = clBtnFace
89 | ParentShowHint = False
90 | ReadOnly = True
91 | ShowHint = True
92 | TabOrder = 4
93 | end
94 | object lblHandle: TLabel
95 | Left = 376
96 | Height = 15
97 | Top = 32
98 | Width = 38
99 | Caption = 'Handle'
100 | ParentShowHint = False
101 | ShowHint = True
102 | end
103 | object lblMouseTool: TLabel
104 | Left = 160
105 | Height = 15
106 | Top = 5
107 | Width = 63
108 | Caption = 'Mouse tool:'
109 | end
110 | object cmbMouseTool: TComboBox
111 | Left = 232
112 | Height = 21
113 | Hint = 'Do not use "Remote click" when both the client and server are running on the same machine.'
114 | Top = 2
115 | Width = 152
116 | ItemHeight = 15
117 | ItemIndex = 0
118 | Items.Strings = (
119 | 'Component selection'
120 | 'Remote click'
121 | )
122 | ParentShowHint = False
123 | ShowHint = True
124 | Style = csOwnerDrawFixed
125 | TabOrder = 5
126 | Text = 'Component selection'
127 | end
128 | object spdbtnExtraRefresh: TSpeedButton
129 | Left = 121
130 | Height = 25
131 | Top = 0
132 | Width = 18
133 | Font.Color = clWindowText
134 | Glyph.Data = {
135 | EA000000424DEA0000000000000036000000280000000B000000050000000100
136 | 180000000000B400000000000000000000000000000000000000FFFFFFFFFFFF
137 | FFFFFFFFFFFFFFFFFF39841AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFF
138 | FFFFFFFFFFFFFFFFFFFF39841A39841A39841AFFFFFFFFFFFFFFFFFFFFFFFF00
139 | 0000FFFFFFFFFFFFFFFFFF39841A39841A39841A39841A39841AFFFFFFFFFFFF
140 | FFFFFF000000FFFFFFFFFFFF39841A39841A39841A39841A39841A39841A3984
141 | 1AFFFFFFFFFFFF000000FFFFFF39841A39841A39841A39841A39841A39841A39
142 | 841A39841A39841AFFFFFF000000
143 | }
144 | ParentFont = False
145 | OnClick = spdbtnExtraRefreshClick
146 | end
147 | object pmExtraRefresh: TPopupMenu
148 | Left = 229
149 | Top = 64
150 | object MenuItem_RefreshAfterMouseUp: TMenuItem
151 | AutoCheck = True
152 | Caption = 'Refresh after "MouseUp"'
153 | end
154 | end
155 | end
156 |
--------------------------------------------------------------------------------
/ClickerSleepFrame.frm:
--------------------------------------------------------------------------------
1 | object frClickerSleep: TfrClickerSleep
2 | Left = 0
3 | Height = 240
4 | Top = 0
5 | Width = 434
6 | ClientHeight = 240
7 | ClientWidth = 434
8 | TabOrder = 0
9 | DesignLeft = 86
10 | DesignTop = 85
11 | object pnlSleepElapsedTime: TPanel
12 | Left = 3
13 | Height = 24
14 | Top = 88
15 | Width = 182
16 | Alignment = taLeftJustify
17 | Caption = 'Elapsed Time [ms]:'
18 | TabOrder = 0
19 | end
20 | object pnlSleepRemainingTime: TPanel
21 | Left = 3
22 | Height = 24
23 | Top = 118
24 | Width = 182
25 | Alignment = taLeftJustify
26 | Caption = 'Remaining Time [ms]:'
27 | TabOrder = 1
28 | end
29 | object prbSleep: TProgressBar
30 | Left = 3
31 | Height = 17
32 | Top = 148
33 | Width = 182
34 | Smooth = True
35 | TabOrder = 2
36 | end
37 | object lblSleepInfo: TLabel
38 | Left = 0
39 | Height = 15
40 | Hint = 'Waiting for the proper event or control property, is the right way to solve a race condition. Use the "sleep" action if the event/property is not available.'
41 | Top = 64
42 | Width = 414
43 | Caption = 'Use this action only as a last resort (e.g. blinking or resizing controls/windows).'
44 | ParentShowHint = False
45 | ShowHint = True
46 | end
47 | end
48 |
--------------------------------------------------------------------------------
/ClickerSleepFrame.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Feb 2023
4 | initial release date: 13 Feb 2023
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerSleepFrame;
26 |
27 | {$mode Delphi}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, Forms, Controls, ExtCtrls, ComCtrls, StdCtrls;
33 |
34 | type
35 |
36 | { TfrClickerSleep }
37 |
38 | TfrClickerSleep = class(TFrame)
39 | lblSleepInfo: TLabel;
40 | pnlSleepElapsedTime: TPanel;
41 | pnlSleepRemainingTime: TPanel;
42 | prbSleep: TProgressBar;
43 | private
44 | procedure SetProgressBarMax(AValue: Integer);
45 | procedure SetProgressBarPosition(AValue: Integer);
46 | public
47 | property ProgressBarMax: Integer write SetProgressBarMax;
48 | property ProgressBarPosition: Integer write SetProgressBarPosition;
49 |
50 | procedure SetEditorSleepInfo(AElapsedTime, ARemainingTime: string);
51 | end;
52 |
53 |
54 | implementation
55 |
56 | {$R *.frm}
57 |
58 |
59 | procedure TfrClickerSleep.SetProgressBarMax(AValue: Integer);
60 | begin
61 | prbSleep.Max := AValue;
62 | end;
63 |
64 |
65 | procedure TfrClickerSleep.SetProgressBarPosition(AValue: Integer);
66 | begin
67 | prbSleep.Position := AValue;
68 | end;
69 |
70 |
71 | procedure TfrClickerSleep.SetEditorSleepInfo(AElapsedTime, ARemainingTime: string);
72 | begin
73 | pnlSleepElapsedTime.Caption := AElapsedTime;
74 | pnlSleepRemainingTime.Caption := ARemainingTime;
75 | end;
76 |
77 | end.
78 |
79 |
--------------------------------------------------------------------------------
/ClickerTemplateNotesForm.frm:
--------------------------------------------------------------------------------
1 | object frmClickerTemplateNotes: TfrmClickerTemplateNotes
2 | Left = 387
3 | Height = 240
4 | Top = 43
5 | Width = 320
6 | Caption = 'Clicker Template Notes'
7 | ClientHeight = 240
8 | ClientWidth = 320
9 | LCLVersion = '8.4'
10 | object memNotes: TMemo
11 | Left = 8
12 | Height = 194
13 | Top = 8
14 | Width = 302
15 | Anchors = [akTop, akLeft, akRight, akBottom]
16 | Font.CharSet = ANSI_CHARSET
17 | Font.Height = -13
18 | Font.Name = 'Courier New'
19 | Font.Pitch = fpFixed
20 | Font.Quality = fqDraft
21 | ParentFont = False
22 | TabOrder = 0
23 | WordWrap = False
24 | end
25 | object btnOK: TButton
26 | Left = 80
27 | Height = 25
28 | Top = 208
29 | Width = 75
30 | Anchors = [akBottom]
31 | Caption = 'OK'
32 | OnClick = btnOKClick
33 | TabOrder = 1
34 | end
35 | object btnCancel: TButton
36 | Left = 168
37 | Height = 25
38 | Top = 208
39 | Width = 75
40 | Anchors = [akBottom]
41 | Caption = 'Cancel'
42 | OnClick = btnCancelClick
43 | TabOrder = 2
44 | end
45 | end
46 |
--------------------------------------------------------------------------------
/ClickerTemplateNotesForm.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2022 VCC
3 | creation date: Dec 2019
4 | initial release date: 13 Sep 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerTemplateNotesForm;
26 |
27 | {$mode Delphi}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
33 |
34 | type
35 |
36 | { TfrmClickerTemplateNotes }
37 |
38 | TfrmClickerTemplateNotes = class(TForm)
39 | btnOK: TButton;
40 | btnCancel: TButton;
41 | memNotes: TMemo;
42 | procedure btnCancelClick(Sender: TObject);
43 | procedure btnOKClick(Sender: TObject);
44 | private
45 |
46 | public
47 |
48 | end;
49 |
50 |
51 | function EditTemplateNotes(var ANotesContent: string): Boolean;
52 |
53 | implementation
54 |
55 | {$R *.frm}
56 |
57 |
58 | function EditTemplateNotes(var ANotesContent: string): Boolean;
59 | var
60 | frmClickerTemplateNotes: TfrmClickerTemplateNotes;
61 | begin
62 | Result := False;
63 | Application.CreateForm(TfrmClickerTemplateNotes, frmClickerTemplateNotes);
64 | frmClickerTemplateNotes.memNotes.Lines.Text := ANotesContent;
65 | frmClickerTemplateNotes.ShowModal;
66 |
67 | if frmClickerTemplateNotes.Tag = 1 then
68 | begin
69 | ANotesContent := frmClickerTemplateNotes.memNotes.Lines.Text;
70 | Result := True;
71 | end;
72 | end;
73 |
74 | { TfrmClickerTemplateNotes }
75 |
76 | procedure TfrmClickerTemplateNotes.btnOKClick(Sender: TObject);
77 | begin
78 | Tag := 1;
79 | Close;
80 | end;
81 |
82 |
83 | procedure TfrmClickerTemplateNotes.btnCancelClick(Sender: TObject);
84 | begin
85 | Tag := 0;
86 | Close;
87 | end;
88 |
89 | end.
90 |
91 |
--------------------------------------------------------------------------------
/ClickerUtils/ClickerExtraUtils.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2024 VCC
3 | creation date: 14 Jan 2024
4 | initial release date: 15 Jan 2024
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerExtraUtils;
26 |
27 | {$H+}
28 | {$IFDEF FPC}
29 | //{$MODE Delphi}
30 | {$ENDIF}
31 |
32 | interface
33 |
34 | uses
35 | Classes, SysUtils, Graphics, ImgList, Controls,
36 | IdGlobal, DCPmd5;
37 |
38 |
39 | function ArrOfByteToHex(var AArr: TIdBytes): string;
40 | function ComputeHash(AFileContent: Pointer; AFileSize: Int64): string;
41 | function GetFileHash(AFileName: string): string;
42 | function CreateBitmapForMenu(AImageList: TImageList; AImageIndex: Integer): TBitmap;
43 |
44 |
45 | implementation
46 |
47 |
48 | function ArrOfByteToHex(var AArr: TIdBytes): string;
49 | var
50 | i: Integer;
51 | begin
52 | Result := '';
53 | for i := 0 to Length(AArr) - 1 do
54 | Result := Result + IntToHex(AArr[i], 2);
55 | end;
56 |
57 |
58 | function ComputeHash(AFileContent: Pointer; AFileSize: Int64): string;
59 | var
60 | DCP_md5: TDCP_md5;
61 | BinHash: TIdBytes;
62 | begin
63 | DCP_md5 := TDCP_md5.Create(nil);
64 | try
65 | SetLength(BinHash, 20);
66 | try
67 | DCP_md5.Init;
68 | DCP_md5.Update(AFileContent^, AFileSize);
69 | DCP_md5.Final(BinHash[0]);
70 |
71 | SetLength(BinHash, 16);
72 | Result := ArrOfByteToHex(BinHash);
73 | finally
74 | SetLength(BinHash, 0);
75 | end;
76 | finally
77 | DCP_md5.Free;
78 | end;
79 | end;
80 |
81 |
82 | function GetFileHash(AFileName: string): string;
83 | var
84 | Stream: TMemoryStream;
85 | begin
86 | Stream := TMemoryStream.Create;
87 | try
88 | Stream.LoadFromFile(AFileName);
89 | Result := ComputeHash(Stream.Memory, Stream.Size);
90 | finally
91 | Stream.Free;
92 | end;
93 | end;
94 |
95 |
96 | function CreateBitmapForMenu(AImageList: TImageList; AImageIndex: Integer): TBitmap;
97 | begin
98 | Result := TBitmap.Create;
99 | Result.Width := 16;
100 | Result.Height := 16;
101 | Result.Canvas.Pen.Color := clWhite - 1;
102 | Result.Canvas.Brush.Color := clWhite;
103 | Result.Canvas.Rectangle(0, 0, Result.Width, Result.Height);
104 | AImageList.Draw(Result.Canvas, 0, 0, AImageIndex, dsNormal, itImage);
105 | end;
106 |
107 |
108 | end.
109 |
110 |
--------------------------------------------------------------------------------
/ClickerUtils/ClickerOIUtils.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2025 VCC
3 | creation date: Mar 2023
4 | initial release date: 10 Mar 2023
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerOIUtils;
26 |
27 | {$mode Delphi}
28 |
29 | interface
30 |
31 |
32 | uses
33 | Classes, SysUtils, Menus, Controls, ClickerUtils, Graphics;
34 |
35 |
36 | type
37 | TOIMenuItemData = record
38 | OwnerMenu: TPopupMenu;
39 | NodeLevel, CategoryIndex, PropertyIndex, PropertyItemIndex: Integer;
40 | MenuItemCaption: string;
41 | TempEditingAction: PClkActionRec;
42 | end;
43 | POIMenuItemData = ^TOIMenuItemData;
44 |
45 |
46 | function AddMenuItemToAnotherMenuItem(APopupMenu: TPopupMenu; AParentMenuItem: TMenuItem; ACaption: TCaption; AHandler: TNotifyEvent;
47 | ANodeLevel, ACategoryIndex, APropertyIndex, AItemIndex: Integer; AEditingAction: PClkActionRec): TMenuItem;
48 |
49 | function AddMenuItemToPopupMenu(APopupMenu: TPopupMenu; ACaption: TCaption; AHandler: TNotifyEvent;
50 | ANodeLevel, ACategoryIndex, APropertyIndex, AItemIndex: Integer; AEditingAction: PClkActionRec): TMenuItem;
51 |
52 | procedure BuildFontColorIcons(AImgLst: TImageList; var AFindSubControlOptions: TClkFindSubControlOptions; AEvaluateReplacementsFunc: TEvaluateReplacementsFunc);
53 |
54 |
55 | implementation
56 |
57 |
58 | function AddMenuItemToAnotherMenuItem(APopupMenu: TPopupMenu; AParentMenuItem: TMenuItem; ACaption: TCaption; AHandler: TNotifyEvent;
59 | ANodeLevel, ACategoryIndex, APropertyIndex, AItemIndex: Integer; AEditingAction: PClkActionRec): TMenuItem;
60 | var
61 | MenuData: POIMenuItemData;
62 | begin
63 | Result := TMenuItem.Create(nil);
64 | Result.Caption := ACaption;
65 | Result.OnClick := AHandler;
66 |
67 | New(MenuData);
68 | Result.Tag := {%H-}PtrInt(MenuData);
69 | MenuData^.OwnerMenu := APopupMenu;
70 | MenuData^.NodeLevel := ANodeLevel;
71 | MenuData^.CategoryIndex := ACategoryIndex;
72 | MenuData^.PropertyIndex := APropertyIndex;
73 | MenuData^.PropertyItemIndex := AItemIndex;
74 | MenuData^.MenuItemCaption := ACaption;
75 | MenuData^.TempEditingAction := AEditingAction;
76 |
77 | if AParentMenuItem <> nil then
78 | AParentMenuItem.Add(Result);
79 | end;
80 |
81 |
82 | function AddMenuItemToPopupMenu(APopupMenu: TPopupMenu; ACaption: TCaption; AHandler: TNotifyEvent;
83 | ANodeLevel, ACategoryIndex, APropertyIndex, AItemIndex: Integer; AEditingAction: PClkActionRec): TMenuItem;
84 | begin
85 | Result := AddMenuItemToAnotherMenuItem(APopupMenu, nil, ACaption, AHandler, ANodeLevel, ACategoryIndex, APropertyIndex, AItemIndex, AEditingAction);
86 | APopupMenu.Items.Add(Result);
87 | end;
88 |
89 |
90 | procedure BuildFontColorIcons(AImgLst: TImageList; var AFindSubControlOptions: TClkFindSubControlOptions; AEvaluateReplacementsFunc: TEvaluateReplacementsFunc);
91 | var
92 | i: Integer;
93 | FontProfilesCount: Integer;
94 | FG, BG: TColor;
95 | Bmp: TBitmap;
96 | begin
97 | FontProfilesCount := Length(AFindSubControlOptions.MatchBitmapText);
98 |
99 | AImgLst.Clear;
100 | for i := 0 to FontProfilesCount - 1 do
101 | begin
102 | FG := HexToInt(AEvaluateReplacementsFunc(AFindSubControlOptions.MatchBitmapText[i].ForegroundColor));
103 | BG := HexToInt(AEvaluateReplacementsFunc(AFindSubControlOptions.MatchBitmapText[i].BackgroundColor));
104 |
105 | Bmp := TBitmap.Create;
106 | try
107 | Bmp.Width := 16;
108 | Bmp.Height := 16;
109 | Bmp.Canvas.Pen.Color := 1;
110 |
111 | Bmp.Canvas.Brush.Color := FG;
112 | Bmp.Canvas.Rectangle(0, 0, Bmp.Width, Bmp.Height);
113 | AImgLst.AddMasked(Bmp, 2);
114 |
115 | Bmp.Canvas.Brush.Color := BG;
116 | Bmp.Canvas.Rectangle(0, 0, Bmp.Width, Bmp.Height);
117 | AImgLst.AddMasked(Bmp, 2);
118 | finally
119 | Bmp.Free;
120 | end;
121 | end;
122 | end;
123 |
124 | end.
125 |
126 |
--------------------------------------------------------------------------------
/ClickerUtils/ClickerVstUtils.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2024 VCC
3 | creation date: 24 May 2024
4 | initial release date: 25 May 2024
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit ClickerVstUtils;
26 |
27 | {$mode Delphi}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, VirtualTrees;
33 |
34 |
35 | function GetNodeByIndex(AVst: TVirtualStringTree; AIndex: Integer): PVirtualNode;
36 | procedure SelectNodeByIndex(AVst: TVirtualStringTree; AIndex: Integer; AScrollIntoView: Boolean = False; ACenter: Boolean = False);
37 |
38 |
39 | implementation
40 |
41 |
42 | function GetNodeByIndex(AVst: TVirtualStringTree; AIndex: Integer): PVirtualNode;
43 | var
44 | Node: PVirtualNode;
45 | begin
46 | Result := nil;
47 | Node := AVst.GetFirst;
48 | if Node = nil then
49 | Exit;
50 |
51 | repeat
52 | if Integer(Node^.Index) = AIndex then
53 | begin
54 | Result := Node;
55 | Break;
56 | end;
57 |
58 | Node := Node^.NextSibling;
59 | until Node = nil;
60 | end;
61 |
62 |
63 | procedure SelectNodeByIndex(AVst: TVirtualStringTree; AIndex: Integer; AScrollIntoView: Boolean = False; ACenter: Boolean = False);
64 | var
65 | Node: PVirtualNode;
66 | begin
67 | Node := GetNodeByIndex(AVst, AIndex);
68 | if Node = nil then
69 | Exit;
70 |
71 | AVst.Selected[Node] := True;
72 |
73 | if AScrollIntoView then
74 | AVst.ScrollIntoView(Node, ACenter);
75 | end;
76 |
77 | end.
78 |
79 |
--------------------------------------------------------------------------------
/ClickerUtils/DoubleList.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2025 VCC
3 | creation date: 10 Feb 2025
4 | initial release date: 10 Feb 2025
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit DoubleList;
26 |
27 | {$mode ObjFPC}{$H+}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, fgl;
33 |
34 |
35 | type
36 | TDoubleList = class(specialize TFPGList)
37 | public
38 | procedure Sort; overload;
39 | end;
40 |
41 |
42 | implementation
43 |
44 |
45 | function CompFuncDouble(const a, b: Double): Integer;
46 | begin
47 | if a > b then
48 | Result := -1
49 | else
50 | if a = b then
51 | Result := 0
52 | else
53 | Result := 1;
54 | end;
55 |
56 |
57 | procedure TDoubleList.Sort;
58 | begin
59 | inherited Sort(@CompFuncDouble);
60 | end;
61 |
62 | end.
63 |
64 |
--------------------------------------------------------------------------------
/ClickerWinInterpForm.frm:
--------------------------------------------------------------------------------
1 | object frmClickerWinInterp: TfrmClickerWinInterp
2 | Left = 387
3 | Height = 501
4 | Top = 43
5 | Width = 893
6 | Caption = 'Clicker Window Interpreter'
7 | Constraints.MinHeight = 501
8 | Constraints.MinWidth = 893
9 | LCLVersion = '8.4'
10 | OnCreate = FormCreate
11 | end
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 VCC02
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/ActionsToDrag.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=5
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName="ExecApp"
7 | Action=ExecApp
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | PathToApp=
15 | ListOfParams=
16 | WaitForApp=0
17 | AppStdIn=
18 | CurrentDir=
19 | UseInheritHandles=0
20 | NoConsole=0
21 |
22 | [Action_1]
23 | ActionName="FindControl"
24 | Action=FindControl
25 | ActionTimeout=3000
26 | ActionEnabled=1
27 | ActionCondition=
28 | BreakpointExists=0
29 | BreakpointEnabled=0
30 | BreakpointCondition=
31 | MatchCriteria.WillMatchText=1
32 | MatchCriteria.WillMatchClassName=1
33 | MatchCriteria.WillMatchBitmapText=0
34 | MatchCriteria.WillMatchBitmapFiles=0
35 | MatchCriteria.WillMatchPrimitiveFiles=0
36 | MatchCriteria.SearchForControlMode=0
37 | MatchText=
38 | MatchClassName=
39 | MatchTextSeparator=
40 | MatchClassNameSeparator=
41 | AllowToFail=0
42 | WaitForControlToGoAway=0
43 | MatchBitmapTextArr=1
44 | MatchBitmapText_Count=1
45 | MatchBitmapText[0].ForegroundColor=$Color_Window$
46 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
47 | MatchBitmapText[0].FontName=Tahoma
48 | MatchBitmapText[0].FontSize=8
49 | MatchBitmapText[0].Bold=0
50 | MatchBitmapText[0].Italic=0
51 | MatchBitmapText[0].Underline=0
52 | MatchBitmapText[0].StrikeOut=0
53 | MatchBitmapText[0].FontQuality=3
54 | MatchBitmapText[0].FontQualityUsesReplacement=0
55 | MatchBitmapText[0].FontQualityReplacement=
56 | MatchBitmapText[0].ProfileName=Profile [0]
57 | MatchBitmapText[0].CropLeft=0
58 | MatchBitmapText[0].CropTop=0
59 | MatchBitmapText[0].CropRight=0
60 | MatchBitmapText[0].CropBottom=0
61 | MatchBitmapText[0].IgnoreBackgroundColor=0
62 | MatchBitmapFiles=
63 | ColorError=0
64 | AllowedColorErrorCount=0
65 | MatchBitmapAlgorithm=0
66 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
67 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
68 | MatchBitmapAlgorithm_Grid_XOffset=0
69 | MatchBitmapAlgorithm_Grid_YOffset=0
70 | InitialRectangle.Left=$Control_Left$
71 | InitialRectangle.Top=$Control_Top$
72 | InitialRectangle.Right=$Control_Right$
73 | InitialRectangle.Bottom=$Control_Bottom$
74 | UseWholeScreen=1
75 | InitialRectangle.LeftOffset=0
76 | InitialRectangle.TopOffset=0
77 | InitialRectangle.RightOffset=0
78 | InitialRectangle.BottomOffset=0
79 | StartSearchingWithCachedControl=0
80 | CachedControlLeft=
81 | CachedControlTop=
82 | MatchPrimitiveFiles=
83 | GetAllControls=0
84 | UseFastSearch=1
85 | FastSearchAllowedColorErrorCount=10
86 | IgnoredColors=
87 |
88 | [Action_2]
89 | ActionName="FindSubControl"
90 | Action=FindSubControl
91 | ActionTimeout=1000
92 | ActionEnabled=1
93 | ActionCondition=
94 | BreakpointExists=0
95 | BreakpointEnabled=0
96 | BreakpointCondition=
97 | MatchCriteria.WillMatchText=0
98 | MatchCriteria.WillMatchClassName=0
99 | MatchCriteria.WillMatchBitmapText=1
100 | MatchCriteria.WillMatchBitmapFiles=0
101 | MatchCriteria.WillMatchPrimitiveFiles=0
102 | MatchCriteria.SearchForControlMode=0
103 | MatchText=
104 | MatchClassName=
105 | MatchTextSeparator=
106 | MatchClassNameSeparator=
107 | AllowToFail=0
108 | WaitForControlToGoAway=0
109 | MatchBitmapTextArr=1
110 | MatchBitmapText_Count=1
111 | MatchBitmapText[0].ForegroundColor=$Color_Window$
112 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
113 | MatchBitmapText[0].FontName=Tahoma
114 | MatchBitmapText[0].FontSize=8
115 | MatchBitmapText[0].Bold=0
116 | MatchBitmapText[0].Italic=0
117 | MatchBitmapText[0].Underline=0
118 | MatchBitmapText[0].StrikeOut=0
119 | MatchBitmapText[0].FontQuality=3
120 | MatchBitmapText[0].FontQualityUsesReplacement=0
121 | MatchBitmapText[0].FontQualityReplacement=
122 | MatchBitmapText[0].ProfileName=Profile [0]
123 | MatchBitmapText[0].CropLeft=0
124 | MatchBitmapText[0].CropTop=0
125 | MatchBitmapText[0].CropRight=0
126 | MatchBitmapText[0].CropBottom=0
127 | MatchBitmapText[0].IgnoreBackgroundColor=0
128 | MatchBitmapFiles=
129 | ColorError=0
130 | AllowedColorErrorCount=0
131 | MatchBitmapAlgorithm=0
132 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
133 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
134 | MatchBitmapAlgorithm_Grid_XOffset=0
135 | MatchBitmapAlgorithm_Grid_YOffset=0
136 | InitialRectangle.Left=$Control_Left$
137 | InitialRectangle.Top=$Control_Top$
138 | InitialRectangle.Right=$Control_Right$
139 | InitialRectangle.Bottom=$Control_Bottom$
140 | UseWholeScreen=0
141 | InitialRectangle.LeftOffset=0
142 | InitialRectangle.TopOffset=0
143 | InitialRectangle.RightOffset=0
144 | InitialRectangle.BottomOffset=0
145 | StartSearchingWithCachedControl=0
146 | CachedControlLeft=
147 | CachedControlTop=
148 | MatchPrimitiveFiles=
149 | GetAllControls=0
150 | UseFastSearch=1
151 | FastSearchAllowedColorErrorCount=10
152 | IgnoredColors=
153 |
154 | [Action_3]
155 | ActionName="SetControlText"
156 | Action=SetControlText
157 | ActionTimeout=0
158 | ActionEnabled=1
159 | ActionCondition=
160 | BreakpointExists=0
161 | BreakpointEnabled=0
162 | BreakpointCondition=
163 | Text=
164 | ControlType=0
165 | DelayBetweenKeyStrokes=0
166 |
167 | [Action_4]
168 | ActionName="Sleep"
169 | Action=Sleep
170 | ActionTimeout=0
171 | ActionEnabled=1
172 | ActionCondition=
173 | BreakpointExists=0
174 | BreakpointEnabled=0
175 | BreakpointCondition=
176 | Value=1000
177 |
178 | [Notes]
179 | Content=
180 | TemplateIconPath=$SelfTemplateDir$\..\ClientUnderTestIcon.png
181 |
182 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/ArrangeActionWindowsUnderTest.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Arrange Server
7 | Action=CallTemplate
8 | ActionTimeout=1000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | TemplateFileName=ArrangeOneActionWindowUnderTest.clktmpl
15 | ListOfCustomVarsAndValues=$ExtraCaption$=Server$NewX$=10$NewY$=330$NewWidth$=1138$NewHeight$=761
16 | CallOnlyIfCondition=0
17 | CallOnlyIfConditionVarName=
18 | CallOnlyIfConditionVarValue=
19 | EvaluateBeforeCalling=0
20 | Loop.Enabled=0
21 | Loop.Counter=
22 | Loop.InitValue=
23 | Loop.EndValue=
24 | Loop.Direction=0
25 | Loop.BreakCondition=
26 | Loop.EvalBreakPosition=0
27 |
28 | [Action_1]
29 | ActionName=Arrange Client
30 | Action=CallTemplate
31 | ActionTimeout=1000
32 | ActionEnabled=1
33 | ActionCondition=
34 | BreakpointExists=0
35 | BreakpointEnabled=0
36 | BreakpointCondition=
37 | TemplateFileName=ArrangeOneActionWindowUnderTest.clktmpl
38 | ListOfCustomVarsAndValues=$ExtraCaption$=Client$NewX$=30$NewY$=390$NewWidth$=1138$NewHeight$=761
39 | CallOnlyIfCondition=0
40 | CallOnlyIfConditionVarName=
41 | CallOnlyIfConditionVarValue=
42 | EvaluateBeforeCalling=0
43 | Loop.Enabled=0
44 | Loop.Counter=
45 | Loop.InitValue=
46 | Loop.EndValue=
47 | Loop.Direction=0
48 | Loop.BreakCondition=
49 | Loop.EvalBreakPosition=0
50 |
51 | [Notes]
52 | Content=
53 | TemplateIconPath=$SelfTemplateDir$\..\DrvIcon.png
54 |
55 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/BasicCaller.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=3
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=SetVar
7 | Action=SetVar
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | ListOfVarNames=$VarToBeIncremented$
15 | ListOfVarValues=0
16 | ListOfVarEvalBefore=
17 | FailOnException=0
18 |
19 | [Action_1]
20 | ActionName=Let the driver find the stop button
21 | Action=Sleep
22 | ActionTimeout=0
23 | ActionEnabled=1
24 | ActionCondition=
25 | BreakpointExists=0
26 | BreakpointEnabled=0
27 | BreakpointCondition=
28 | Value=500
29 |
30 | [Action_2]
31 | ActionName=Call TemplateToBeCalled
32 | Action=CallTemplate
33 | ActionTimeout=0
34 | ActionEnabled=1
35 | ActionCondition=
36 | BreakpointExists=0
37 | BreakpointEnabled=0
38 | BreakpointCondition=
39 | TemplateFileName=$AppDir$\TestDriver\ActionTemplates\TemplateToBeCalled.clktmpl
40 | ListOfCustomVarsAndValues=
41 | CallOnlyIfCondition=0
42 | CallOnlyIfConditionVarName=
43 | CallOnlyIfConditionVarValue=
44 | EvaluateBeforeCalling=0
45 | Loop.Enabled=0
46 | Loop.Counter=
47 | Loop.InitValue=
48 | Loop.EndValue=
49 | Loop.Direction=0
50 | Loop.BreakCondition=
51 | Loop.EvalBreakPosition=0
52 |
53 | [Notes]
54 | Content=
55 | TemplateIconPath=$SelfTemplateDir$\..\ClientUnderTestIcon.png
56 |
57 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/BasicLoopedCaller.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=3
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=SetVar
7 | Action=SetVar
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | ListOfVarNames=$VarToBeIncremented$
15 | ListOfVarValues=0
16 | ListOfVarEvalBefore=
17 | FailOnException=0
18 |
19 | [Action_1]
20 | ActionName=Let the driver find the stop button
21 | Action=Sleep
22 | ActionTimeout=0
23 | ActionEnabled=1
24 | ActionCondition=
25 | BreakpointExists=0
26 | BreakpointEnabled=0
27 | BreakpointCondition=
28 | Value=500
29 |
30 | [Action_2]
31 | ActionName=Call TemplateToBeCalled
32 | Action=CallTemplate
33 | ActionTimeout=0
34 | ActionEnabled=1
35 | ActionCondition=
36 | BreakpointExists=0
37 | BreakpointEnabled=0
38 | BreakpointCondition=
39 | TemplateFileName=$AppDir$\TestDriver\ActionTemplates\TemplateToBeCalled.clktmpl
40 | ListOfCustomVarsAndValues=
41 | CallOnlyIfCondition=0
42 | CallOnlyIfConditionVarName=
43 | CallOnlyIfConditionVarValue=
44 | EvaluateBeforeCalling=0
45 | Loop.Enabled=1
46 | Loop.Counter=$i$
47 | Loop.InitValue=0
48 | Loop.EndValue=9
49 | Loop.Direction=0
50 | Loop.BreakCondition=
51 | Loop.EvalBreakPosition=0
52 |
53 | [Notes]
54 | Content=
55 | TemplateIconPath=$SelfTemplateDir$\..\ClientUnderTestIcon.png
56 |
57 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/Bmps/StopButtonIcon_Idle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/TestDriver/ActionTemplates/Bmps/StopButtonIcon_Idle.png
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/Bmps/StopButtonIcon_Running.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/TestDriver/ActionTemplates/Bmps/StopButtonIcon_Running.png
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/MenuCheckmark.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=6
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=SetPen Line
12 | Primitive=SetPen
13 | Color=212121
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName="Line"
22 | Primitive=Line
23 | X1=0
24 | Y1=3
25 | X2=3
26 | Y2=6
27 | ShowEndpointPixel=0
28 |
29 | [Primitive_2]
30 | PrimitiveName="Line"
31 | Primitive=Line
32 | X1=2
33 | Y1=6
34 | X2=8
35 | Y2=0
36 | ShowEndpointPixel=0
37 |
38 | [Primitive_3]
39 | PrimitiveName="SetBrush"
40 | Primitive=SetBrush
41 | Color=FF00FF
42 | Style=bsSolid
43 |
44 | [Primitive_4]
45 | PrimitiveName=BK
46 | Primitive=Rect
47 | X1=0
48 | Y1=0
49 | X2=8
50 | Y2=8
51 | ExtendToEndpointCorner=1
52 |
53 | [Primitive_5]
54 | PrimitiveName=SetPen Rect
55 | Primitive=SetPen
56 | Color=FF00FF
57 | Style=psSolid
58 | Width=1
59 | Mode=pmCopy
60 | EndCap=pecRound
61 | JoinStyle=pjsRound
62 |
63 |
64 | [Order_0]
65 | OrderName=new
66 | i0=5
67 | i1=3
68 | i2=4
69 | i3=0
70 | i4=1
71 | i5=2
72 |
73 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/SetExecModeToClient.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=1
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=SetExecutionMode to Local
7 | Action=CallTemplate
8 | ActionTimeout=1000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | TemplateFileName=SetExecutionModeOnAppUnderTest.clktmpl
15 | ListOfCustomVarsAndValues=$ExecMode$=Client
16 | CallOnlyIfCondition=0
17 | CallOnlyIfConditionVarName=
18 | CallOnlyIfConditionVarValue=
19 | EvaluateBeforeCalling=0
20 | Loop.Enabled=0
21 | Loop.Counter=
22 | Loop.InitValue=
23 | Loop.EndValue=
24 | Loop.Direction=0
25 | Loop.BreakCondition=
26 | Loop.EvalBreakPosition=0
27 |
28 | [Notes]
29 | Content=
30 | TemplateIconPath=$SelfTemplateDir$\..\DrvIcon.png
31 |
32 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/SetExecModeToLocal.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=1
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=SetExecutionMode to Local
7 | Action=CallTemplate
8 | ActionTimeout=1000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | TemplateFileName=SetExecutionModeOnAppUnderTest.clktmpl
15 | ListOfCustomVarsAndValues=$ExecMode$=Local
16 | CallOnlyIfCondition=0
17 | CallOnlyIfConditionVarName=
18 | CallOnlyIfConditionVarValue=
19 | EvaluateBeforeCalling=0
20 | Loop.Enabled=0
21 | Loop.Counter=
22 | Loop.InitValue=
23 | Loop.EndValue=
24 | Loop.Direction=0
25 | Loop.BreakCondition=
26 | Loop.EvalBreakPosition=0
27 |
28 | [Notes]
29 | Content=
30 | TemplateIconPath=$SelfTemplateDir$\..\DrvIcon.png
31 |
32 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/SetExecModeToServer.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=1
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=SetExecutionMode to Local
7 | Action=CallTemplate
8 | ActionTimeout=1000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | TemplateFileName=SetExecutionModeOnAppUnderTest.clktmpl
15 | ListOfCustomVarsAndValues=$ExecMode$=Server
16 | CallOnlyIfCondition=0
17 | CallOnlyIfConditionVarName=
18 | CallOnlyIfConditionVarValue=
19 | EvaluateBeforeCalling=0
20 | Loop.Enabled=0
21 | Loop.Counter=
22 | Loop.InitValue=
23 | Loop.EndValue=
24 | Loop.Direction=0
25 | Loop.BreakCondition=
26 | Loop.EvalBreakPosition=0
27 |
28 | [Notes]
29 | Content=
30 | TemplateIconPath=$SelfTemplateDir$\..\DrvIcon.png
31 |
32 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/TemplateToBeCalled.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=1
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=SetVar
7 | Action=SetVar
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | ListOfVarNames=$Var0$$Var1$$VarToBeIncremented$
15 | ListOfVarValues=01$Sum($VarToBeIncremented$,1)$
16 | ListOfVarEvalBefore=1
17 | FailOnException=0
18 |
19 | [Notes]
20 | Content=
21 | TemplateIconPath=$SelfTemplateDir$\..\ClientUnderTestIcon.png
22 |
23 |
--------------------------------------------------------------------------------
/TestDriver/ActionTemplates/WaitForExecutionOnAppUnderTest.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Find Stop button icon - running state
7 | Action=FindSubControl
8 | ActionTimeout=1500
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | MatchCriteria.WillMatchText=0
15 | MatchCriteria.WillMatchClassName=0
16 | MatchCriteria.WillMatchBitmapText=1
17 | MatchCriteria.WillMatchBitmapFiles=0
18 | MatchCriteria.WillMatchPrimitiveFiles=0
19 | MatchCriteria.SearchForControlMode=0
20 | MatchText=@
21 | MatchClassName=
22 | MatchTextSeparator=
23 | MatchClassNameSeparator=
24 | AllowToFail=0
25 | WaitForControlToGoAway=0
26 | MatchBitmapTextArr=1
27 | MatchBitmapText_Count=1
28 | MatchBitmapText[0].ForegroundColor=2832EC
29 | MatchBitmapText[0].BackgroundColor=2832EC
30 | MatchBitmapText[0].FontName=Tahoma
31 | MatchBitmapText[0].FontSize=6
32 | MatchBitmapText[0].Bold=1
33 | MatchBitmapText[0].Italic=0
34 | MatchBitmapText[0].Underline=0
35 | MatchBitmapText[0].StrikeOut=0
36 | MatchBitmapText[0].FontQuality=0
37 | MatchBitmapText[0].FontQualityUsesReplacement=0
38 | MatchBitmapText[0].FontQualityReplacement=
39 | MatchBitmapText[0].ProfileName=Default
40 | MatchBitmapText[0].CropLeft=
41 | MatchBitmapText[0].CropTop=
42 | MatchBitmapText[0].CropRight=
43 | MatchBitmapText[0].CropBottom=
44 | MatchBitmapText[0].IgnoreBackgroundColor=0
45 | MatchBitmapFiles=
46 | ColorError=40
47 | AllowedColorErrorCount=40
48 | MatchBitmapAlgorithm=0
49 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
50 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
51 | MatchBitmapAlgorithm_Grid_XOffset=0
52 | MatchBitmapAlgorithm_Grid_YOffset=0
53 | InitialRectangle.Left=$Stop_Left$
54 | InitialRectangle.Top=$Stop_Top$
55 | InitialRectangle.Right=$Stop_Left$
56 | InitialRectangle.Bottom=$Stop_Top$
57 | UseWholeScreen=0
58 | InitialRectangle.LeftOffset=-19
59 | InitialRectangle.TopOffset=-1
60 | InitialRectangle.RightOffset=-3
61 | InitialRectangle.BottomOffset=13
62 | StartSearchingWithCachedControl=0
63 | CachedControlLeft=
64 | CachedControlTop=
65 | MatchPrimitiveFiles=
66 | GetAllControls=0
67 | UseFastSearch=1
68 | FastSearchAllowedColorErrorCount=10
69 | IgnoredColors=
70 | SleepySearch=0
71 | StopSearchOnMismatch=1
72 | ImageSource=0
73 | SourceFileName=
74 | ImageSourceFileNameLocation=1
75 | PrecisionTimeout=0
76 | FullBackgroundImageInResult=1
77 | MatchByHistogramSettings.MinPercentColorMatch=50
78 | MatchByHistogramSettings.MostSignificantColorCountInSubBmp=10
79 | MatchByHistogramSettings.MostSignificantColorCountInBackgroundBmp=15
80 | EvaluateTextCount=-1
81 | CropFromScreenshot=0
82 | ThreadCount=2
83 |
84 | [Action_1]
85 | ActionName=Find Stop button icon - idle state
86 | Action=FindSubControl
87 | ActionTimeout=15000
88 | ActionEnabled=1
89 | ActionCondition=
90 | BreakpointExists=0
91 | BreakpointEnabled=0
92 | BreakpointCondition=
93 | MatchCriteria.WillMatchText=0
94 | MatchCriteria.WillMatchClassName=0
95 | MatchCriteria.WillMatchBitmapText=1
96 | MatchCriteria.WillMatchBitmapFiles=0
97 | MatchCriteria.WillMatchPrimitiveFiles=0
98 | MatchCriteria.SearchForControlMode=0
99 | MatchText=@
100 | MatchClassName=
101 | MatchTextSeparator=
102 | MatchClassNameSeparator=
103 | AllowToFail=0
104 | WaitForControlToGoAway=0
105 | MatchBitmapTextArr=1
106 | MatchBitmapText_Count=1
107 | MatchBitmapText[0].ForegroundColor=4B4B4B
108 | MatchBitmapText[0].BackgroundColor=4B4B4B
109 | MatchBitmapText[0].FontName=Tahoma
110 | MatchBitmapText[0].FontSize=6
111 | MatchBitmapText[0].Bold=1
112 | MatchBitmapText[0].Italic=0
113 | MatchBitmapText[0].Underline=0
114 | MatchBitmapText[0].StrikeOut=0
115 | MatchBitmapText[0].FontQuality=0
116 | MatchBitmapText[0].FontQualityUsesReplacement=0
117 | MatchBitmapText[0].FontQualityReplacement=
118 | MatchBitmapText[0].ProfileName=Default
119 | MatchBitmapText[0].CropLeft=
120 | MatchBitmapText[0].CropTop=
121 | MatchBitmapText[0].CropRight=
122 | MatchBitmapText[0].CropBottom=
123 | MatchBitmapText[0].IgnoreBackgroundColor=0
124 | MatchBitmapFiles=
125 | ColorError=40
126 | AllowedColorErrorCount=40
127 | MatchBitmapAlgorithm=0
128 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
129 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
130 | MatchBitmapAlgorithm_Grid_XOffset=0
131 | MatchBitmapAlgorithm_Grid_YOffset=0
132 | InitialRectangle.Left=$Stop_Left$
133 | InitialRectangle.Top=$Stop_Top$
134 | InitialRectangle.Right=$Stop_Left$
135 | InitialRectangle.Bottom=$Stop_Top$
136 | UseWholeScreen=0
137 | InitialRectangle.LeftOffset=-19
138 | InitialRectangle.TopOffset=-1
139 | InitialRectangle.RightOffset=-3
140 | InitialRectangle.BottomOffset=13
141 | StartSearchingWithCachedControl=0
142 | CachedControlLeft=
143 | CachedControlTop=
144 | MatchPrimitiveFiles=
145 | GetAllControls=0
146 | UseFastSearch=1
147 | FastSearchAllowedColorErrorCount=10
148 | IgnoredColors=
149 | SleepySearch=0
150 | StopSearchOnMismatch=1
151 | ImageSource=0
152 | SourceFileName=
153 | ImageSourceFileNameLocation=1
154 | PrecisionTimeout=0
155 | FullBackgroundImageInResult=1
156 | MatchByHistogramSettings.MinPercentColorMatch=50
157 | MatchByHistogramSettings.MostSignificantColorCountInSubBmp=10
158 | MatchByHistogramSettings.MostSignificantColorCountInBackgroundBmp=15
159 | EvaluateTextCount=-1
160 | CropFromScreenshot=0
161 | ThreadCount=2
162 |
163 | [Notes]
164 | Content=waiting 15s for execution to stop, because of the looped call example
165 | TemplateIconPath=$SelfTemplateDir$\..\DrvIcon.png
166 |
167 |
--------------------------------------------------------------------------------
/TestDriver/ClientUnderTestIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/TestDriver/ClientUnderTestIcon.png
--------------------------------------------------------------------------------
/TestDriver/DrvIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/TestDriver/DrvIcon.png
--------------------------------------------------------------------------------
/TestDriver/ReadMe.txt:
--------------------------------------------------------------------------------
1 | When UIClicker is compiled with "TestBuild" compiler directive (see Project Options -> Custom Options, the "-dTestBuild" option), various extra features are available, like extra caption for main window, or setting execution mode on startup:
2 | --ExtraCaption - this will add to the main window title. For example, running with --ExtraCaption abc , will result in the 'UI Clicker Main - abc' window title.
3 | --SetExecMode - this will set the execution mode. The Mode argument can be Local, Client or Server.
4 | --ServerPort - this will set a custom port, to listen to. If "--ServerPort" is not passed, the default value is used.
5 |
6 | The test application connects to this instance (the driver instance(s)), which controls the UIClicker-under-test instances.
7 | The UIClicker-under-test instances are started and stopped by the TestDriver instance(s).
8 | When testing local mode, it is enough to have a single TestDriver instance. For testing client-server, two instances of TestDriver will be needed.
9 | Both instances run initially in server mode and listens on 15444. UIClicker-under-test listens on 5444.
10 |
11 | 1. The driver instance executes a SetVar action on UIClicker-under-test to get the window handles. The result is a #7#8 separated list of name=value pairs, which cannot be parsed: $frmUIClickerMainForm_Handle$=337770$frmClickerControlPreview_Handle$=272500$frmClickerActions_Handle$=336718
12 | 2. The driver instance controls the UIClicker-under-test to switch from server mode to local mode.
13 |
14 | Other requirements:
15 | - The ClientUnderTest will have to access templates from "\TestDriver\ActionTemplates". This has to be added on "Allowed file directories for server" editbox on "Settings" page, when UIClicker is manually started, to allow saving the setting to ini.
--------------------------------------------------------------------------------
/Tests/BuiltInFunctions/TestBuiltInFunctions.ctpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | -
25 |
26 |
27 | -
28 |
29 |
30 | -
31 |
32 |
33 | -
34 |
35 |
36 | -
37 |
38 |
39 | -
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | -
88 |
89 |
90 | -
91 |
92 |
93 | -
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/Tests/BuiltInFunctions/TestBuiltInFunctions.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/BuiltInFunctions/TestBuiltInFunctions.ico
--------------------------------------------------------------------------------
/Tests/BuiltInFunctions/TestBuiltInFunctions.ppr:
--------------------------------------------------------------------------------
1 | program TestBuiltInFunctions;
2 |
3 | {$mode objfpc}{$H+}
4 |
5 | uses
6 | Interfaces, Forms, GuiTestRunner, TestBuiltInFunctionArgParser, ClickerUtils,
7 | Expectations;
8 |
9 | {$R *.res}
10 |
11 | begin
12 | Application.Initialize;
13 | Application.CreateForm(TGuiTestRunner, TestRunner);
14 | Application.Run;
15 | end.
16 |
17 |
--------------------------------------------------------------------------------
/Tests/BuiltInFunctions/TestBuiltInFunctions.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/BuiltInFunctions/TestBuiltInFunctions.res
--------------------------------------------------------------------------------
/Tests/DeniedTestFiles/ADeniedFile.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=1
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName="SetVar"
7 | Action=SetVar
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | ListOfVarNames=$DeniedFileExecuted$
15 | ListOfVarValues=Executed
16 | ListOfVarEvalBefore=
17 | FailOnException=0
18 |
19 | [Notes]
20 | Content=
21 | TemplateIconPath=
22 |
23 |
--------------------------------------------------------------------------------
/Tests/TestFiles/CloseRenderingServer.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Find window
7 | Action=FindControl
8 | ActionTimeout=3000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | MatchCriteria.WillMatchText=1
15 | MatchCriteria.WillMatchClassName=1
16 | MatchCriteria.WillMatchBitmapText=0
17 | MatchCriteria.WillMatchBitmapFiles=0
18 | MatchCriteria.WillMatchPrimitiveFiles=0
19 | MatchCriteria.SearchForControlMode=0
20 | MatchText=Gradient Text
21 | MatchClassName=Window
22 | MatchTextSeparator=
23 | MatchClassNameSeparator=
24 | AllowToFail=0
25 | WaitForControlToGoAway=0
26 | MatchBitmapTextArr=1
27 | MatchBitmapText_Count=1
28 | MatchBitmapText[0].ForegroundColor=$Color_Window$
29 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
30 | MatchBitmapText[0].FontName=Tahoma
31 | MatchBitmapText[0].FontSize=8
32 | MatchBitmapText[0].Bold=0
33 | MatchBitmapText[0].Italic=0
34 | MatchBitmapText[0].Underline=0
35 | MatchBitmapText[0].StrikeOut=0
36 | MatchBitmapText[0].FontQuality=3
37 | MatchBitmapText[0].FontQualityUsesReplacement=0
38 | MatchBitmapText[0].FontQualityReplacement=
39 | MatchBitmapText[0].ProfileName=Profile [0]
40 | MatchBitmapText[0].CropLeft=0
41 | MatchBitmapText[0].CropTop=0
42 | MatchBitmapText[0].CropRight=0
43 | MatchBitmapText[0].CropBottom=0
44 | MatchBitmapText[0].IgnoreBackgroundColor=0
45 | MatchBitmapFiles=
46 | ColorError=0
47 | AllowedColorErrorCount=0
48 | MatchBitmapAlgorithm=0
49 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
50 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
51 | MatchBitmapAlgorithm_Grid_XOffset=0
52 | MatchBitmapAlgorithm_Grid_YOffset=0
53 | InitialRectangle.Left=$Control_Left$
54 | InitialRectangle.Top=$Control_Top$
55 | InitialRectangle.Right=$Control_Right$
56 | InitialRectangle.Bottom=$Control_Bottom$
57 | UseWholeScreen=1
58 | InitialRectangle.LeftOffset=0
59 | InitialRectangle.TopOffset=0
60 | InitialRectangle.RightOffset=0
61 | InitialRectangle.BottomOffset=0
62 | StartSearchingWithCachedControl=0
63 | CachedControlLeft=
64 | CachedControlTop=
65 | MatchPrimitiveFiles=
66 | GetAllControls=0
67 | UseFastSearch=1
68 | FastSearchAllowedColorErrorCount=10
69 | IgnoredColors=
70 | SleepySearch=0
71 | StopSearchOnMismatch=1
72 | ImageSource=0
73 | SourceFileName=
74 | ImageSourceFileNameLocation=1
75 |
76 | [Action_1]
77 | ActionName=Close rendering server
78 | Action=WindowOperations
79 | ActionTimeout=0
80 | ActionEnabled=1
81 | ActionCondition=
82 | BreakpointExists=0
83 | BreakpointEnabled=0
84 | BreakpointCondition=
85 | WindowOperation=2
86 | NewX=
87 | NewY=
88 | NewWidth=
89 | NewHeight=
90 | NewPositionEnabled=0
91 | NewSizeEnabled=0
92 |
93 | [Notes]
94 | Content=
95 | TemplateIconPath=
96 |
97 |
--------------------------------------------------------------------------------
/Tests/TestFiles/FindBitOnMainNoFastSearch.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Find main window
7 | Action=FindControl
8 | ActionTimeout=3000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | MatchCriteria.WillMatchText=1
15 | MatchCriteria.WillMatchClassName=1
16 | MatchCriteria.WillMatchBitmapText=0
17 | MatchCriteria.WillMatchBitmapFiles=0
18 | MatchCriteria.WillMatchPrimitiveFiles=0
19 | MatchCriteria.SearchForControlMode=0
20 | MatchText=UI Clicker Main
21 | MatchClassName=Window
22 | MatchTextSeparator=
23 | MatchClassNameSeparator=
24 | AllowToFail=0
25 | WaitForControlToGoAway=0
26 | MatchBitmapTextArr=1
27 | MatchBitmapText_Count=1
28 | MatchBitmapText[0].ForegroundColor=$Color_Window$
29 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
30 | MatchBitmapText[0].FontName=Tahoma
31 | MatchBitmapText[0].FontSize=8
32 | MatchBitmapText[0].Bold=0
33 | MatchBitmapText[0].Italic=0
34 | MatchBitmapText[0].Underline=0
35 | MatchBitmapText[0].StrikeOut=0
36 | MatchBitmapText[0].FontQuality=3
37 | MatchBitmapText[0].FontQualityUsesReplacement=0
38 | MatchBitmapText[0].FontQualityReplacement=
39 | MatchBitmapText[0].ProfileName=Profile [0]
40 | MatchBitmapText[0].CropLeft=0
41 | MatchBitmapText[0].CropTop=0
42 | MatchBitmapText[0].CropRight=0
43 | MatchBitmapText[0].CropBottom=0
44 | MatchBitmapText[0].IgnoreBackgroundColor=0
45 | MatchBitmapFiles=
46 | ColorError=0
47 | AllowedColorErrorCount=0
48 | MatchBitmapAlgorithm=0
49 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
50 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
51 | MatchBitmapAlgorithm_Grid_XOffset=0
52 | MatchBitmapAlgorithm_Grid_YOffset=0
53 | InitialRectangle.Left=$Control_Left$
54 | InitialRectangle.Top=$Control_Top$
55 | InitialRectangle.Right=$Control_Right$
56 | InitialRectangle.Bottom=$Control_Bottom$
57 | UseWholeScreen=1
58 | InitialRectangle.LeftOffset=0
59 | InitialRectangle.TopOffset=0
60 | InitialRectangle.RightOffset=0
61 | InitialRectangle.BottomOffset=0
62 | StartSearchingWithCachedControl=0
63 | CachedControlLeft=
64 | CachedControlTop=
65 | MatchPrimitiveFiles=
66 | GetAllControls=0
67 | UseFastSearch=1
68 | FastSearchAllowedColorErrorCount=10
69 |
70 | [Action_1]
71 | ActionName=Find -bit on main
72 | Action=FindSubControl
73 | ActionTimeout=15000
74 | ActionEnabled=1
75 | ActionCondition=
76 | BreakpointExists=0
77 | BreakpointEnabled=0
78 | BreakpointCondition=
79 | MatchCriteria.WillMatchText=0
80 | MatchCriteria.WillMatchClassName=0
81 | MatchCriteria.WillMatchBitmapText=1
82 | MatchCriteria.WillMatchBitmapFiles=0
83 | MatchCriteria.WillMatchPrimitiveFiles=0
84 | MatchCriteria.SearchForControlMode=0
85 | MatchText=bit
86 | MatchClassName=
87 | MatchTextSeparator=
88 | MatchClassNameSeparator=
89 | AllowToFail=0
90 | WaitForControlToGoAway=0
91 | MatchBitmapTextArr=1
92 | MatchBitmapText_Count=2
93 | MatchBitmapText[0].ForegroundColor=$Color_WindowText$
94 | MatchBitmapText[0].BackgroundColor=$Color_BtnFace$
95 | MatchBitmapText[0].FontName=Segoe UI
96 | MatchBitmapText[0].FontSize=9
97 | MatchBitmapText[0].Bold=0
98 | MatchBitmapText[0].Italic=0
99 | MatchBitmapText[0].Underline=0
100 | MatchBitmapText[0].StrikeOut=0
101 | MatchBitmapText[0].FontQuality=4
102 | MatchBitmapText[0].FontQualityUsesReplacement=0
103 | MatchBitmapText[0].FontQualityReplacement=
104 | MatchBitmapText[0].ProfileName=Profile [0]
105 | MatchBitmapText[0].CropLeft=0
106 | MatchBitmapText[0].CropTop=0
107 | MatchBitmapText[0].CropRight=0
108 | MatchBitmapText[0].CropBottom=0
109 | MatchBitmapText[0].IgnoreBackgroundColor=0
110 | MatchBitmapText[1].ForegroundColor=$Color_WindowText$
111 | MatchBitmapText[1].BackgroundColor=$Color_BtnFace$
112 | MatchBitmapText[1].FontName=Segoe UI
113 | MatchBitmapText[1].FontSize=9
114 | MatchBitmapText[1].Bold=0
115 | MatchBitmapText[1].Italic=0
116 | MatchBitmapText[1].Underline=0
117 | MatchBitmapText[1].StrikeOut=0
118 | MatchBitmapText[1].FontQuality=0
119 | MatchBitmapText[1].FontQualityUsesReplacement=0
120 | MatchBitmapText[1].FontQualityReplacement=
121 | MatchBitmapText[1].ProfileName=Profile [1]
122 | MatchBitmapText[1].CropLeft=0
123 | MatchBitmapText[1].CropTop=0
124 | MatchBitmapText[1].CropRight=0
125 | MatchBitmapText[1].CropBottom=0
126 | MatchBitmapText[1].IgnoreBackgroundColor=0
127 | MatchBitmapFiles=
128 | ColorError=10
129 | AllowedColorErrorCount=20
130 | MatchBitmapAlgorithm=0
131 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
132 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
133 | MatchBitmapAlgorithm_Grid_XOffset=0
134 | MatchBitmapAlgorithm_Grid_YOffset=0
135 | InitialRectangle.Left=$Control_Left$
136 | InitialRectangle.Top=$Control_Top$
137 | InitialRectangle.Right=$Control_Right$
138 | InitialRectangle.Bottom=$Control_Bottom$
139 | UseWholeScreen=0
140 | InitialRectangle.LeftOffset=6
141 | InitialRectangle.TopOffset=150
142 | InitialRectangle.RightOffset=-73
143 | InitialRectangle.BottomOffset=-14
144 | StartSearchingWithCachedControl=0
145 | CachedControlLeft=
146 | CachedControlTop=
147 | MatchPrimitiveFiles=
148 | GetAllControls=0
149 | UseFastSearch=0
150 | FastSearchAllowedColorErrorCount=10
151 |
152 | [Notes]
153 | Content=
154 |
155 |
--------------------------------------------------------------------------------
/Tests/TestFiles/FindBitOnMainNoFastSearchWithSleepySearch.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Find main window
7 | Action=FindControl
8 | ActionTimeout=3000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | MatchCriteria.WillMatchText=1
15 | MatchCriteria.WillMatchClassName=1
16 | MatchCriteria.WillMatchBitmapText=0
17 | MatchCriteria.WillMatchBitmapFiles=0
18 | MatchCriteria.WillMatchPrimitiveFiles=0
19 | MatchCriteria.SearchForControlMode=0
20 | MatchText=UI Clicker Main
21 | MatchClassName=Window
22 | MatchTextSeparator=
23 | MatchClassNameSeparator=
24 | AllowToFail=0
25 | WaitForControlToGoAway=0
26 | MatchBitmapTextArr=1
27 | MatchBitmapText_Count=1
28 | MatchBitmapText[0].ForegroundColor=$Color_Window$
29 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
30 | MatchBitmapText[0].FontName=Tahoma
31 | MatchBitmapText[0].FontSize=8
32 | MatchBitmapText[0].Bold=0
33 | MatchBitmapText[0].Italic=0
34 | MatchBitmapText[0].Underline=0
35 | MatchBitmapText[0].StrikeOut=0
36 | MatchBitmapText[0].FontQuality=3
37 | MatchBitmapText[0].FontQualityUsesReplacement=0
38 | MatchBitmapText[0].FontQualityReplacement=
39 | MatchBitmapText[0].ProfileName=Profile [0]
40 | MatchBitmapText[0].CropLeft=0
41 | MatchBitmapText[0].CropTop=0
42 | MatchBitmapText[0].CropRight=0
43 | MatchBitmapText[0].CropBottom=0
44 | MatchBitmapText[0].IgnoreBackgroundColor=0
45 | MatchBitmapFiles=
46 | ColorError=0
47 | AllowedColorErrorCount=0
48 | MatchBitmapAlgorithm=0
49 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
50 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
51 | MatchBitmapAlgorithm_Grid_XOffset=0
52 | MatchBitmapAlgorithm_Grid_YOffset=0
53 | InitialRectangle.Left=$Control_Left$
54 | InitialRectangle.Top=$Control_Top$
55 | InitialRectangle.Right=$Control_Right$
56 | InitialRectangle.Bottom=$Control_Bottom$
57 | UseWholeScreen=1
58 | InitialRectangle.LeftOffset=0
59 | InitialRectangle.TopOffset=0
60 | InitialRectangle.RightOffset=0
61 | InitialRectangle.BottomOffset=0
62 | StartSearchingWithCachedControl=0
63 | CachedControlLeft=
64 | CachedControlTop=
65 | MatchPrimitiveFiles=
66 | GetAllControls=0
67 | UseFastSearch=1
68 | FastSearchAllowedColorErrorCount=10
69 | IgnoredColors=
70 | SleepySearch=0
71 |
72 | [Action_1]
73 | ActionName=Find -bit on main
74 | Action=FindSubControl
75 | ActionTimeout=15000
76 | ActionEnabled=1
77 | ActionCondition=
78 | BreakpointExists=0
79 | BreakpointEnabled=0
80 | BreakpointCondition=
81 | MatchCriteria.WillMatchText=0
82 | MatchCriteria.WillMatchClassName=0
83 | MatchCriteria.WillMatchBitmapText=1
84 | MatchCriteria.WillMatchBitmapFiles=0
85 | MatchCriteria.WillMatchPrimitiveFiles=0
86 | MatchCriteria.SearchForControlMode=0
87 | MatchText=bit
88 | MatchClassName=
89 | MatchTextSeparator=
90 | MatchClassNameSeparator=
91 | AllowToFail=0
92 | WaitForControlToGoAway=0
93 | MatchBitmapTextArr=1
94 | MatchBitmapText_Count=2
95 | MatchBitmapText[0].ForegroundColor=$Color_WindowText$
96 | MatchBitmapText[0].BackgroundColor=$Color_BtnFace$
97 | MatchBitmapText[0].FontName=Segoe UI
98 | MatchBitmapText[0].FontSize=9
99 | MatchBitmapText[0].Bold=0
100 | MatchBitmapText[0].Italic=0
101 | MatchBitmapText[0].Underline=0
102 | MatchBitmapText[0].StrikeOut=0
103 | MatchBitmapText[0].FontQuality=4
104 | MatchBitmapText[0].FontQualityUsesReplacement=0
105 | MatchBitmapText[0].FontQualityReplacement=
106 | MatchBitmapText[0].ProfileName=Profile [0]
107 | MatchBitmapText[0].CropLeft=0
108 | MatchBitmapText[0].CropTop=0
109 | MatchBitmapText[0].CropRight=0
110 | MatchBitmapText[0].CropBottom=0
111 | MatchBitmapText[0].IgnoreBackgroundColor=0
112 | MatchBitmapText[1].ForegroundColor=$Color_WindowText$
113 | MatchBitmapText[1].BackgroundColor=$Color_BtnFace$
114 | MatchBitmapText[1].FontName=Segoe UI
115 | MatchBitmapText[1].FontSize=9
116 | MatchBitmapText[1].Bold=0
117 | MatchBitmapText[1].Italic=0
118 | MatchBitmapText[1].Underline=0
119 | MatchBitmapText[1].StrikeOut=0
120 | MatchBitmapText[1].FontQuality=0
121 | MatchBitmapText[1].FontQualityUsesReplacement=0
122 | MatchBitmapText[1].FontQualityReplacement=
123 | MatchBitmapText[1].ProfileName=Profile [1]
124 | MatchBitmapText[1].CropLeft=0
125 | MatchBitmapText[1].CropTop=0
126 | MatchBitmapText[1].CropRight=0
127 | MatchBitmapText[1].CropBottom=0
128 | MatchBitmapText[1].IgnoreBackgroundColor=0
129 | MatchBitmapFiles=
130 | ColorError=10
131 | AllowedColorErrorCount=20
132 | MatchBitmapAlgorithm=0
133 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
134 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
135 | MatchBitmapAlgorithm_Grid_XOffset=0
136 | MatchBitmapAlgorithm_Grid_YOffset=0
137 | InitialRectangle.Left=$Control_Left$
138 | InitialRectangle.Top=$Control_Top$
139 | InitialRectangle.Right=$Control_Right$
140 | InitialRectangle.Bottom=$Control_Bottom$
141 | UseWholeScreen=0
142 | InitialRectangle.LeftOffset=6
143 | InitialRectangle.TopOffset=150
144 | InitialRectangle.RightOffset=-73
145 | InitialRectangle.BottomOffset=-14
146 | StartSearchingWithCachedControl=0
147 | CachedControlLeft=
148 | CachedControlTop=
149 | MatchPrimitiveFiles=
150 | GetAllControls=0
151 | UseFastSearch=0
152 | FastSearchAllowedColorErrorCount=10
153 | IgnoredColors=
154 | SleepySearch=1
155 |
156 | [Notes]
157 | Content=
158 | TemplateIconPath=
159 |
160 |
--------------------------------------------------------------------------------
/Tests/TestFiles/FindBitOnMainWithFastSearch.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Find main window
7 | Action=FindControl
8 | ActionTimeout=3000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | MatchCriteria.WillMatchText=1
15 | MatchCriteria.WillMatchClassName=1
16 | MatchCriteria.WillMatchBitmapText=0
17 | MatchCriteria.WillMatchBitmapFiles=0
18 | MatchCriteria.WillMatchPrimitiveFiles=0
19 | MatchCriteria.SearchForControlMode=0
20 | MatchText=UI Clicker Main
21 | MatchClassName=Window
22 | MatchTextSeparator=
23 | MatchClassNameSeparator=
24 | AllowToFail=0
25 | WaitForControlToGoAway=0
26 | MatchBitmapTextArr=1
27 | MatchBitmapText_Count=1
28 | MatchBitmapText[0].ForegroundColor=$Color_Window$
29 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
30 | MatchBitmapText[0].FontName=Tahoma
31 | MatchBitmapText[0].FontSize=8
32 | MatchBitmapText[0].Bold=0
33 | MatchBitmapText[0].Italic=0
34 | MatchBitmapText[0].Underline=0
35 | MatchBitmapText[0].StrikeOut=0
36 | MatchBitmapText[0].FontQuality=3
37 | MatchBitmapText[0].FontQualityUsesReplacement=0
38 | MatchBitmapText[0].FontQualityReplacement=
39 | MatchBitmapText[0].ProfileName=Profile [0]
40 | MatchBitmapText[0].CropLeft=0
41 | MatchBitmapText[0].CropTop=0
42 | MatchBitmapText[0].CropRight=0
43 | MatchBitmapText[0].CropBottom=0
44 | MatchBitmapText[0].IgnoreBackgroundColor=0
45 | MatchBitmapFiles=
46 | ColorError=0
47 | AllowedColorErrorCount=0
48 | MatchBitmapAlgorithm=0
49 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
50 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
51 | MatchBitmapAlgorithm_Grid_XOffset=0
52 | MatchBitmapAlgorithm_Grid_YOffset=0
53 | InitialRectangle.Left=$Control_Left$
54 | InitialRectangle.Top=$Control_Top$
55 | InitialRectangle.Right=$Control_Right$
56 | InitialRectangle.Bottom=$Control_Bottom$
57 | UseWholeScreen=1
58 | InitialRectangle.LeftOffset=0
59 | InitialRectangle.TopOffset=0
60 | InitialRectangle.RightOffset=0
61 | InitialRectangle.BottomOffset=0
62 | StartSearchingWithCachedControl=0
63 | CachedControlLeft=
64 | CachedControlTop=
65 | MatchPrimitiveFiles=
66 | GetAllControls=0
67 | UseFastSearch=1
68 | FastSearchAllowedColorErrorCount=10
69 |
70 | [Action_1]
71 | ActionName=Find -bit on main
72 | Action=FindSubControl
73 | ActionTimeout=1000
74 | ActionEnabled=1
75 | ActionCondition=
76 | BreakpointExists=0
77 | BreakpointEnabled=0
78 | BreakpointCondition=
79 | MatchCriteria.WillMatchText=0
80 | MatchCriteria.WillMatchClassName=0
81 | MatchCriteria.WillMatchBitmapText=1
82 | MatchCriteria.WillMatchBitmapFiles=0
83 | MatchCriteria.WillMatchPrimitiveFiles=0
84 | MatchCriteria.SearchForControlMode=0
85 | MatchText=bit
86 | MatchClassName=
87 | MatchTextSeparator=
88 | MatchClassNameSeparator=
89 | AllowToFail=0
90 | WaitForControlToGoAway=0
91 | MatchBitmapTextArr=1
92 | MatchBitmapText_Count=2
93 | MatchBitmapText[0].ForegroundColor=$Color_WindowText$
94 | MatchBitmapText[0].BackgroundColor=$Color_BtnFace$
95 | MatchBitmapText[0].FontName=Segoe UI
96 | MatchBitmapText[0].FontSize=9
97 | MatchBitmapText[0].Bold=0
98 | MatchBitmapText[0].Italic=0
99 | MatchBitmapText[0].Underline=0
100 | MatchBitmapText[0].StrikeOut=0
101 | MatchBitmapText[0].FontQuality=4
102 | MatchBitmapText[0].FontQualityUsesReplacement=0
103 | MatchBitmapText[0].FontQualityReplacement=
104 | MatchBitmapText[0].ProfileName=Profile [0]
105 | MatchBitmapText[0].CropLeft=0
106 | MatchBitmapText[0].CropTop=0
107 | MatchBitmapText[0].CropRight=0
108 | MatchBitmapText[0].CropBottom=0
109 | MatchBitmapText[0].IgnoreBackgroundColor=0
110 | MatchBitmapText[1].ForegroundColor=$Color_WindowText$
111 | MatchBitmapText[1].BackgroundColor=$Color_BtnFace$
112 | MatchBitmapText[1].FontName=Segoe UI
113 | MatchBitmapText[1].FontSize=9
114 | MatchBitmapText[1].Bold=0
115 | MatchBitmapText[1].Italic=0
116 | MatchBitmapText[1].Underline=0
117 | MatchBitmapText[1].StrikeOut=0
118 | MatchBitmapText[1].FontQuality=0
119 | MatchBitmapText[1].FontQualityUsesReplacement=0
120 | MatchBitmapText[1].FontQualityReplacement=
121 | MatchBitmapText[1].ProfileName=Profile [1]
122 | MatchBitmapText[1].CropLeft=0
123 | MatchBitmapText[1].CropTop=0
124 | MatchBitmapText[1].CropRight=0
125 | MatchBitmapText[1].CropBottom=0
126 | MatchBitmapText[1].IgnoreBackgroundColor=0
127 | MatchBitmapFiles=
128 | ColorError=10
129 | AllowedColorErrorCount=20
130 | MatchBitmapAlgorithm=0
131 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
132 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
133 | MatchBitmapAlgorithm_Grid_XOffset=0
134 | MatchBitmapAlgorithm_Grid_YOffset=0
135 | InitialRectangle.Left=$Control_Left$
136 | InitialRectangle.Top=$Control_Top$
137 | InitialRectangle.Right=$Control_Right$
138 | InitialRectangle.Bottom=$Control_Bottom$
139 | UseWholeScreen=0
140 | InitialRectangle.LeftOffset=6
141 | InitialRectangle.TopOffset=122
142 | InitialRectangle.RightOffset=-10
143 | InitialRectangle.BottomOffset=-9
144 | StartSearchingWithCachedControl=0
145 | CachedControlLeft=
146 | CachedControlTop=
147 | MatchPrimitiveFiles=
148 | GetAllControls=0
149 | UseFastSearch=1
150 | FastSearchAllowedColorErrorCount=3
151 |
152 | [Notes]
153 | Content=
154 |
155 |
--------------------------------------------------------------------------------
/Tests/TestFiles/FindBitOnMainWithFastSearchWithSleepySearch.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName=Find main window
7 | Action=FindControl
8 | ActionTimeout=3000
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | MatchCriteria.WillMatchText=1
15 | MatchCriteria.WillMatchClassName=1
16 | MatchCriteria.WillMatchBitmapText=0
17 | MatchCriteria.WillMatchBitmapFiles=0
18 | MatchCriteria.WillMatchPrimitiveFiles=0
19 | MatchCriteria.SearchForControlMode=0
20 | MatchText=UI Clicker Main
21 | MatchClassName=Window
22 | MatchTextSeparator=
23 | MatchClassNameSeparator=
24 | AllowToFail=0
25 | WaitForControlToGoAway=0
26 | MatchBitmapTextArr=1
27 | MatchBitmapText_Count=1
28 | MatchBitmapText[0].ForegroundColor=$Color_Window$
29 | MatchBitmapText[0].BackgroundColor=$Color_Highlight$
30 | MatchBitmapText[0].FontName=Tahoma
31 | MatchBitmapText[0].FontSize=8
32 | MatchBitmapText[0].Bold=0
33 | MatchBitmapText[0].Italic=0
34 | MatchBitmapText[0].Underline=0
35 | MatchBitmapText[0].StrikeOut=0
36 | MatchBitmapText[0].FontQuality=3
37 | MatchBitmapText[0].FontQualityUsesReplacement=0
38 | MatchBitmapText[0].FontQualityReplacement=
39 | MatchBitmapText[0].ProfileName=Profile [0]
40 | MatchBitmapText[0].CropLeft=0
41 | MatchBitmapText[0].CropTop=0
42 | MatchBitmapText[0].CropRight=0
43 | MatchBitmapText[0].CropBottom=0
44 | MatchBitmapText[0].IgnoreBackgroundColor=0
45 | MatchBitmapFiles=
46 | ColorError=0
47 | AllowedColorErrorCount=0
48 | MatchBitmapAlgorithm=0
49 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
50 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
51 | MatchBitmapAlgorithm_Grid_XOffset=0
52 | MatchBitmapAlgorithm_Grid_YOffset=0
53 | InitialRectangle.Left=$Control_Left$
54 | InitialRectangle.Top=$Control_Top$
55 | InitialRectangle.Right=$Control_Right$
56 | InitialRectangle.Bottom=$Control_Bottom$
57 | UseWholeScreen=1
58 | InitialRectangle.LeftOffset=0
59 | InitialRectangle.TopOffset=0
60 | InitialRectangle.RightOffset=0
61 | InitialRectangle.BottomOffset=0
62 | StartSearchingWithCachedControl=0
63 | CachedControlLeft=
64 | CachedControlTop=
65 | MatchPrimitiveFiles=
66 | GetAllControls=0
67 | UseFastSearch=1
68 | FastSearchAllowedColorErrorCount=10
69 | IgnoredColors=
70 | SleepySearch=0
71 |
72 | [Action_1]
73 | ActionName=Find -bit on main
74 | Action=FindSubControl
75 | ActionTimeout=1000
76 | ActionEnabled=1
77 | ActionCondition=
78 | BreakpointExists=0
79 | BreakpointEnabled=0
80 | BreakpointCondition=
81 | MatchCriteria.WillMatchText=0
82 | MatchCriteria.WillMatchClassName=0
83 | MatchCriteria.WillMatchBitmapText=1
84 | MatchCriteria.WillMatchBitmapFiles=0
85 | MatchCriteria.WillMatchPrimitiveFiles=0
86 | MatchCriteria.SearchForControlMode=0
87 | MatchText=bit
88 | MatchClassName=
89 | MatchTextSeparator=
90 | MatchClassNameSeparator=
91 | AllowToFail=0
92 | WaitForControlToGoAway=0
93 | MatchBitmapTextArr=1
94 | MatchBitmapText_Count=2
95 | MatchBitmapText[0].ForegroundColor=$Color_WindowText$
96 | MatchBitmapText[0].BackgroundColor=$Color_BtnFace$
97 | MatchBitmapText[0].FontName=Segoe UI
98 | MatchBitmapText[0].FontSize=9
99 | MatchBitmapText[0].Bold=0
100 | MatchBitmapText[0].Italic=0
101 | MatchBitmapText[0].Underline=0
102 | MatchBitmapText[0].StrikeOut=0
103 | MatchBitmapText[0].FontQuality=4
104 | MatchBitmapText[0].FontQualityUsesReplacement=0
105 | MatchBitmapText[0].FontQualityReplacement=
106 | MatchBitmapText[0].ProfileName=Profile [0]
107 | MatchBitmapText[0].CropLeft=0
108 | MatchBitmapText[0].CropTop=0
109 | MatchBitmapText[0].CropRight=0
110 | MatchBitmapText[0].CropBottom=0
111 | MatchBitmapText[0].IgnoreBackgroundColor=0
112 | MatchBitmapText[1].ForegroundColor=$Color_WindowText$
113 | MatchBitmapText[1].BackgroundColor=$Color_BtnFace$
114 | MatchBitmapText[1].FontName=Segoe UI
115 | MatchBitmapText[1].FontSize=9
116 | MatchBitmapText[1].Bold=0
117 | MatchBitmapText[1].Italic=0
118 | MatchBitmapText[1].Underline=0
119 | MatchBitmapText[1].StrikeOut=0
120 | MatchBitmapText[1].FontQuality=0
121 | MatchBitmapText[1].FontQualityUsesReplacement=0
122 | MatchBitmapText[1].FontQualityReplacement=
123 | MatchBitmapText[1].ProfileName=Profile [1]
124 | MatchBitmapText[1].CropLeft=0
125 | MatchBitmapText[1].CropTop=0
126 | MatchBitmapText[1].CropRight=0
127 | MatchBitmapText[1].CropBottom=0
128 | MatchBitmapText[1].IgnoreBackgroundColor=0
129 | MatchBitmapFiles=
130 | ColorError=10
131 | AllowedColorErrorCount=20
132 | MatchBitmapAlgorithm=0
133 | MatchBitmapAlgorithm_Grid_XMultipleOf=1
134 | MatchBitmapAlgorithm_Grid_YMultipleOf=1
135 | MatchBitmapAlgorithm_Grid_XOffset=0
136 | MatchBitmapAlgorithm_Grid_YOffset=0
137 | InitialRectangle.Left=$Control_Left$
138 | InitialRectangle.Top=$Control_Top$
139 | InitialRectangle.Right=$Control_Right$
140 | InitialRectangle.Bottom=$Control_Bottom$
141 | UseWholeScreen=0
142 | InitialRectangle.LeftOffset=6
143 | InitialRectangle.TopOffset=122
144 | InitialRectangle.RightOffset=-10
145 | InitialRectangle.BottomOffset=-9
146 | StartSearchingWithCachedControl=0
147 | CachedControlLeft=
148 | CachedControlTop=
149 | MatchPrimitiveFiles=
150 | GetAllControls=0
151 | UseFastSearch=1
152 | FastSearchAllowedColorErrorCount=3
153 | IgnoredColors=
154 | SleepySearch=1
155 |
156 | [Notes]
157 | Content=
158 | TemplateIconPath=
159 |
160 |
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/GradientText.ctpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | -
29 |
30 |
31 | -
32 |
33 |
34 | -
35 |
36 |
37 | -
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | -
91 |
92 |
93 | -
94 |
95 |
96 | -
97 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/GradientText.ctps:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/GradientText.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/TestFiles/GradientText/GradientText.exe
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/GradientText.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/TestFiles/GradientText/GradientText.ico
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/GradientText.ppr:
--------------------------------------------------------------------------------
1 | program GradientText;
2 |
3 | {$mode objfpc}{$H+}
4 |
5 | uses
6 | {$IFDEF UNIX}
7 | cthreads,
8 | {$ENDIF}
9 | {$IFDEF HASAMIGA}
10 | athreads,
11 | {$ENDIF}
12 | Interfaces, // this includes the CT adLCL widgetset
13 | Forms, GradientTextMainForm, ClickerUtils;
14 |
15 | {$R *.res}
16 |
17 | begin
18 | RequireDerivedFormResource:=True;
19 | Application.Scaled:=True;
20 | Application.Initialize;
21 | Application.CreateForm(TfrmGradientTextMain, frmGradientTextMain);
22 | Application.Run;
23 | end.
24 |
25 |
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/GradientText.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/TestFiles/GradientText/GradientText.res
--------------------------------------------------------------------------------
/Tests/TestFiles/GradientText/TestRenderingPage.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
36 |
--------------------------------------------------------------------------------
/Tests/TestFiles/MyLongText_GreenBlue.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/TestFiles/MyLongText_GreenBlue.bmp
--------------------------------------------------------------------------------
/Tests/TestFiles/MyLongText_RedYellow.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/TestFiles/MyLongText_RedYellow.bmp
--------------------------------------------------------------------------------
/Tests/TestFiles/PartialTrackBar.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=15
6 |
7 | [ProcessingOrder]
8 | Count=2
9 |
10 | [Primitive_0]
11 | PrimitiveName="SetPen"
12 | Primitive=SetPen
13 | Color=D6D6D6
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName="SetBrush"
22 | Primitive=SetBrush
23 | Color=EAEAE7
24 | Style=bsSolid
25 |
26 | [Primitive_2]
27 | PrimitiveName=Notch
28 | Primitive=Rect
29 | X1=3
30 | Y1=3
31 | X2=91
32 | Y2=14
33 | ExtendToEndpointCorner=1
34 |
35 | [Primitive_3]
36 | PrimitiveName=Yellow
37 | Primitive=SetPen
38 | Color=00FFFF
39 | Style=psSolid
40 | Width=1
41 | Mode=pmCopy
42 | EndCap=pecRound
43 | JoinStyle=pjsRound
44 |
45 | [Primitive_4]
46 | PrimitiveName=Yellow
47 | Primitive=SetBrush
48 | Color=00FFFF
49 | Style=bsSolid
50 |
51 | [Primitive_5]
52 | PrimitiveName=Yellow
53 | Primitive=Rect
54 | X1=0
55 | Y1=0
56 | X2=96
57 | Y2=14
58 | ExtendToEndpointCorner=1
59 |
60 | [Primitive_6]
61 | PrimitiveName=Inactive Slider
62 | Primitive=SetPen
63 | Color=$SliderEdgeColor_Inactive$
64 | Style=psSolid
65 | Width=1
66 | Mode=pmCopy
67 | EndCap=pecRound
68 | JoinStyle=pjsRound
69 |
70 | [Primitive_7]
71 | PrimitiveName=Transparent
72 | Primitive=SetBrush
73 | Color=FF00FF
74 | Style=bsSolid
75 |
76 | [Primitive_8]
77 | PrimitiveName=Slider
78 | Primitive=Rect
79 | X1=$SliderX$
80 | Y1=1
81 | X2=$Sum($SliderX$,9)$
82 | Y2=14
83 | ExtendToEndpointCorner=1
84 |
85 | [Primitive_9]
86 | PrimitiveName=Slider
87 | Primitive=SetPen
88 | Color=FF00FF
89 | Style=psSolid
90 | Width=1
91 | Mode=pmCopy
92 | EndCap=pecRound
93 | JoinStyle=pjsRound
94 |
95 | [Primitive_10]
96 | PrimitiveName="Line"
97 | Primitive=Line
98 | X1=$SliderX$
99 | Y1=13
100 | X2=$Sum($SliderX$,10)$
101 | Y2=13
102 | ShowEndpointPixel=0
103 |
104 | [Primitive_11]
105 | PrimitiveName="Line"
106 | Primitive=Line
107 | X1=$SliderX$
108 | Y1=14
109 | X2=$Sum($SliderX$,10)$
110 | Y2=14
111 | ShowEndpointPixel=0
112 |
113 | [Primitive_12]
114 | PrimitiveName=LeftTransparentEdge
115 | Primitive=Rect
116 | X1=3
117 | Y1=3
118 | X2=27
119 | Y2=14
120 | ExtendToEndpointCorner=1
121 |
122 | [Primitive_13]
123 | PrimitiveName=RightTransparentEdge
124 | Primitive=Rect
125 | X1=80
126 | Y1=3
127 | X2=92
128 | Y2=14
129 | ExtendToEndpointCorner=1
130 |
131 | [Primitive_14]
132 | PrimitiveName=Active Slider
133 | Primitive=SetPen
134 | Color=$SliderEdgeColor_Active$
135 | Style=psSolid
136 | Width=1
137 | Mode=pmCopy
138 | EndCap=pecRound
139 | JoinStyle=pjsRound
140 |
141 |
142 | [Order_0]
143 | OrderName=inactive slider
144 | i0=3
145 | i1=4
146 | i2=5
147 | i3=0
148 | i4=1
149 | i5=2
150 | i6=14
151 | i7=6
152 | i8=7
153 | i9=8
154 | i10=9
155 | i11=10
156 | i12=11
157 | i13=12
158 | i14=13
159 |
160 | [Order_1]
161 | OrderName=active slider
162 | i0=3
163 | i1=4
164 | i2=5
165 | i3=0
166 | i4=1
167 | i5=2
168 | i6=6
169 | i7=14
170 | i8=7
171 | i9=8
172 | i10=9
173 | i11=10
174 | i12=11
175 | i13=12
176 | i14=13
177 |
178 |
--------------------------------------------------------------------------------
/Tests/TestFiles/PreviewButtonIcon.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=6
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=SetPen int
12 | Primitive=SetPen
13 | Color=357C16
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName=SetBrush int
22 | Primitive=SetBrush
23 | Color=1BE6B5
24 | Style=bsSolid
25 |
26 | [Primitive_2]
27 | PrimitiveName=Int rect
28 | Primitive=Rect
29 | X1=5
30 | Y1=3
31 | X2=12
32 | Y2=10
33 | ExtendToEndpointCorner=1
34 |
35 | [Primitive_3]
36 | PrimitiveName=SetPen ext
37 | Primitive=SetPen
38 | Color=357C16
39 | Style=psSolid
40 | Width=1
41 | Mode=pmCopy
42 | EndCap=pecRound
43 | JoinStyle=pjsRound
44 |
45 | [Primitive_4]
46 | PrimitiveName=SetBrush ext
47 | Primitive=SetBrush
48 | Color=0CC9FF
49 | Style=bsSolid
50 |
51 | [Primitive_5]
52 | PrimitiveName=Ext rect
53 | Primitive=Rect
54 | X1=0
55 | Y1=0
56 | X2=13
57 | Y2=11
58 | ExtendToEndpointCorner=1
59 |
60 |
61 | [Order_0]
62 | OrderName=main
63 | i0=3
64 | i1=4
65 | i2=5
66 | i3=0
67 | i4=1
68 | i5=2
69 |
70 |
--------------------------------------------------------------------------------
/Tests/TestFiles/PreviewButtonIcon64.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=6
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=SetPen int
12 | Primitive=SetPen
13 | Color=377E18
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName=SetBrush int
22 | Primitive=SetBrush
23 | Color=1DE6B5
24 | Style=bsSolid
25 |
26 | [Primitive_2]
27 | PrimitiveName=Int rect
28 | Primitive=Rect
29 | X1=5
30 | Y1=3
31 | X2=12
32 | Y2=10
33 | ExtendToEndpointCorner=1
34 |
35 | [Primitive_3]
36 | PrimitiveName=SetPen ext
37 | Primitive=SetPen
38 | Color=377E18
39 | Style=psSolid
40 | Width=1
41 | Mode=pmCopy
42 | EndCap=pecRound
43 | JoinStyle=pjsRound
44 |
45 | [Primitive_4]
46 | PrimitiveName=SetBrush ext
47 | Primitive=SetBrush
48 | Color=0EC9FF
49 | Style=bsSolid
50 |
51 | [Primitive_5]
52 | PrimitiveName=Ext rect
53 | Primitive=Rect
54 | X1=0
55 | Y1=0
56 | X2=13
57 | Y2=11
58 | ExtendToEndpointCorner=1
59 |
60 |
61 | [Order_0]
62 | OrderName=main
63 | i0=3
64 | i1=4
65 | i2=5
66 | i3=0
67 | i4=1
68 | i5=2
69 |
70 |
--------------------------------------------------------------------------------
/Tests/TestFiles/RenderGradientOnBrowser.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=1
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=Received Image
12 | Primitive=Image
13 | X1=0
14 | Y1=0
15 | X2=309
16 | Y2=230
17 | Path=BrowserGradient.bmp
18 | Stretch=0
19 | RenderedExternally=1
20 | Transparent=1
21 | TransparentMode=0
22 | TransparentColor=00000000
23 |
24 |
25 | [Order_0]
26 | OrderName=main
27 | i0=0
28 |
29 |
--------------------------------------------------------------------------------
/Tests/TestFiles/RenderGradientWithCustomTextOnServer.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=4
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=Received Image
12 | Primitive=Image
13 | X1=0
14 | Y1=0
15 | X2=595
16 | Y2=231
17 | Path=Mybmp.bmp
18 | Stretch=0
19 | RenderedExternally=1
20 | Transparent=0
21 | TransparentMode=0
22 | TransparentColor=F0F0F0
23 |
24 | [Primitive_1]
25 | PrimitiveName="SetBrush"
26 | Primitive=SetBrush
27 | Color=F3E7A0
28 | Style=bsSolid
29 |
30 | [Primitive_2]
31 | PrimitiveName="SetFont"
32 | Primitive=SetFont
33 | ForegroundColor=00D000
34 | BackgroundColor=F3E7A0
35 | FontName=Tahoma
36 | FontSize=15
37 | Bold=0
38 | Italic=0
39 | Underline=0
40 | StrikeOut=0
41 | FontQuality=3
42 | FontQualityUsesReplacement=0
43 | FontQualityReplacement=
44 | ProfileName=Default
45 | CropLeft=
46 | CropTop=
47 | CropRight=
48 | CropBottom=
49 |
50 | [Primitive_3]
51 | PrimitiveName="Text"
52 | Primitive=Text
53 | Text=My custom rendering
54 | X=0
55 | Y=0
56 |
57 |
58 | [Order_0]
59 | OrderName=main
60 | i0=0
61 | i1=1
62 | i2=2
63 | i3=3
64 |
65 |
--------------------------------------------------------------------------------
/Tests/TestFiles/RenderTextOnServerForMultiSearchGB.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=2
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName="SetFont"
12 | Primitive=SetFont
13 | ForegroundColor=00D000
14 | BackgroundColor=F3E7A0
15 | FontName=Tahoma
16 | FontSize=15
17 | Bold=0
18 | Italic=0
19 | Underline=0
20 | StrikeOut=0
21 | FontQuality=3
22 | FontQualityUsesReplacement=0
23 | FontQualityReplacement=
24 | ProfileName=Default
25 | CropLeft=
26 | CropTop=
27 | CropRight=
28 | CropBottom=
29 | IgnoreBackgroundColor=0
30 |
31 | [Primitive_1]
32 | PrimitiveName="Text"
33 | Primitive=Text
34 | Text=MyLongText
35 | X=0
36 | Y=0
37 |
38 |
39 | [Order_0]
40 | OrderName=new
41 | i0=0
42 | i1=1
43 |
44 |
--------------------------------------------------------------------------------
/Tests/TestFiles/RenderTextOnServerForMultiSearchGBRY.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=3
6 |
7 | [ProcessingOrder]
8 | Count=2
9 |
10 | [Primitive_0]
11 | PrimitiveName=RY
12 | Primitive=SetFont
13 | ForegroundColor=0000FF
14 | BackgroundColor=00FFFF
15 | FontName=Tahoma
16 | FontSize=15
17 | Bold=0
18 | Italic=0
19 | Underline=0
20 | StrikeOut=0
21 | FontQuality=3
22 | FontQualityUsesReplacement=0
23 | FontQualityReplacement=
24 | ProfileName=Default
25 | CropLeft=
26 | CropTop=
27 | CropRight=
28 | CropBottom=
29 | IgnoreBackgroundColor=0
30 |
31 | [Primitive_1]
32 | PrimitiveName="Text"
33 | Primitive=Text
34 | Text=MyLongText
35 | X=0
36 | Y=0
37 |
38 | [Primitive_2]
39 | PrimitiveName=GB
40 | Primitive=SetFont
41 | ForegroundColor=00D000
42 | BackgroundColor=F3E7A0
43 | FontName=Tahoma
44 | FontSize=15
45 | Bold=0
46 | Italic=0
47 | Underline=0
48 | StrikeOut=0
49 | FontQuality=3
50 | FontQualityUsesReplacement=0
51 | FontQualityReplacement=
52 | ProfileName=Default
53 | CropLeft=
54 | CropTop=
55 | CropRight=
56 | CropBottom=
57 | IgnoreBackgroundColor=0
58 |
59 |
60 | [Order_0]
61 | OrderName=RY
62 | i0=0
63 | i1=1
64 | i2=2
65 |
66 | [Order_1]
67 | OrderName=GB
68 | i0=2
69 | i1=1
70 | i2=0
71 |
72 |
--------------------------------------------------------------------------------
/Tests/TestFiles/RenderTextOnServerForMultiSearchRY.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=2
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName="SetFont"
12 | Primitive=SetFont
13 | ForegroundColor=0000FF
14 | BackgroundColor=00FFFF
15 | FontName=Tahoma
16 | FontSize=15
17 | Bold=0
18 | Italic=0
19 | Underline=0
20 | StrikeOut=0
21 | FontQuality=3
22 | FontQualityUsesReplacement=0
23 | FontQualityReplacement=
24 | ProfileName=Default
25 | CropLeft=
26 | CropTop=
27 | CropRight=
28 | CropBottom=
29 | IgnoreBackgroundColor=0
30 |
31 | [Primitive_1]
32 | PrimitiveName="Text"
33 | Primitive=Text
34 | Text=MyLongText
35 | X=0
36 | Y=0
37 |
38 |
39 | [Order_0]
40 | OrderName=new
41 | i0=0
42 | i1=1
43 |
44 |
--------------------------------------------------------------------------------
/Tests/TestFiles/ResetDeniedFileExecutedVar.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=2
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName="Sleep"
7 | Action=Sleep
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | Value=1000
15 |
16 | [Action_1]
17 | ActionName=Reset DeniedFileExecuted
18 | Action=SetVar
19 | ActionTimeout=0
20 | ActionEnabled=1
21 | ActionCondition=
22 | BreakpointExists=0
23 | BreakpointEnabled=0
24 | BreakpointCondition=
25 | ListOfVarNames=$DeniedFileExecuted$
26 | ListOfVarValues=False
27 | ListOfVarEvalBefore=
28 | FailOnException=0
29 |
30 | [Notes]
31 | Content=
32 | TemplateIconPath=
33 |
34 |
--------------------------------------------------------------------------------
/Tests/TestFiles/SearchGradientWithCustomTextOnServer.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=4
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=Received Image
12 | Primitive=Image
13 | X1=0
14 | Y1=0
15 | X2=190
16 | Y2=35
17 | Path=Mybmp.bmp
18 | Stretch=0
19 | RenderedExternally=1
20 | Transparent=0
21 | TransparentMode=0
22 | TransparentColor=F0F0F0
23 |
24 | [Primitive_1]
25 | PrimitiveName="SetBrush"
26 | Primitive=SetBrush
27 | Color=F3E7A0
28 | Style=bsSolid
29 |
30 | [Primitive_2]
31 | PrimitiveName="SetFont"
32 | Primitive=SetFont
33 | ForegroundColor=00D000
34 | BackgroundColor=1FFFFFFF
35 | FontName=Segoe UI
36 | FontSize=15
37 | Bold=0
38 | Italic=0
39 | Underline=0
40 | StrikeOut=0
41 | FontQuality=5
42 | FontQualityUsesReplacement=0
43 | FontQualityReplacement=
44 | ProfileName=Default
45 | CropLeft=0
46 | CropTop=0
47 | CropRight=0
48 | CropBottom=0
49 | IgnoreBackgroundColor=1
50 |
51 | [Primitive_3]
52 | PrimitiveName="Text"
53 | Primitive=Text
54 | Text=My custom rendering
55 | X=1
56 | Y=1
57 |
58 |
59 | [Order_0]
60 | OrderName=main
61 | i0=0
62 | i1=1
63 | i2=2
64 | i3=3
65 |
66 |
--------------------------------------------------------------------------------
/Tests/TestFiles/TestEditTemplateWithVars.clktmpl:
--------------------------------------------------------------------------------
1 | [Actions]
2 | Count=6
3 | Version=2
4 |
5 | [Action_0]
6 | ActionName="Sleep"
7 | Action=Sleep
8 | ActionTimeout=0
9 | ActionEnabled=1
10 | ActionCondition=
11 | BreakpointExists=0
12 | BreakpointEnabled=0
13 | BreakpointCondition=
14 | Value=1000
15 |
16 | [Action_1]
17 | ActionName="SetVar"
18 | Action=SetVar
19 | ActionTimeout=0
20 | ActionEnabled=1
21 | ActionCondition=
22 | BreakpointExists=0
23 | BreakpointEnabled=0
24 | BreakpointCondition=
25 | ListOfVarNames=$Old$$abc$
26 | ListOfVarValues="Plugin"123
27 | ListOfVarEvalBefore=
28 | FailOnException=0
29 |
30 | [Action_2]
31 | ActionName=edt
32 | Action=EditTemplate
33 | ActionTimeout=0
34 | ActionEnabled=1
35 | ActionCondition=
36 | BreakpointExists=0
37 | BreakpointEnabled=0
38 | BreakpointCondition=
39 | Operation=5
40 | WhichTemplate=0
41 | TemplateFileName=
42 | ListOfEditedProperties=FileName=$AppDir$\..\UIClickerFindWindowsPlugin\lib\i386-win32\UIClickerFindWindows.dllListOfPropertiesAndValues=FindSubControlTopLeftCorner=FindSubControlBotLeftCorner=FindSubControlTopRightCorner=FindSubControlBotRightCorner=FindSubControlLeftEdge=FindSubControlTopEdge=FindSubControlRightEdge=FindSubControlBottomEdge=ParentFindControl=BorderThickness=6MatchWindowEdges=True
43 | ListOfEnabledProperties=
44 | EditedActionName=$Old$
45 | EditedActionType=11
46 | EditedActionCondition=
47 | EditedActionTimeout=1000
48 | NewActionName=$abc$
49 | ShouldSaveTemplate=1
50 | ListOfEditedProperties_ET=
51 | ListOfEnabledProperties_ET=
52 |
53 | [Action_3]
54 | ActionName="Plugin"
55 | Action=Plugin
56 | ActionTimeout=1000
57 | ActionEnabled=0
58 | ActionCondition=
59 | BreakpointExists=0
60 | BreakpointEnabled=0
61 | BreakpointCondition=
62 | FileName=$AppDir$\..\UIClickerFindWindowsPlugin\lib\i386-win32\UIClickerFindWindows.dll
63 | ListOfPropertiesAndValues=FindSubControlTopLeftCorner=FindSubControlBotLeftCorner=FindSubControlTopRightCorner=FindSubControlBotRightCorner=FindSubControlLeftEdge=FindSubControlTopEdge=FindSubControlRightEdge=FindSubControlBottomEdge=ParentFindControl=BorderThickness=6MatchWindowEdges=True
64 |
65 | [Action_4]
66 | ActionName=Set plugin timeout
67 | Action=EditTemplate
68 | ActionTimeout=0
69 | ActionEnabled=1
70 | ActionCondition=
71 | BreakpointExists=0
72 | BreakpointEnabled=0
73 | BreakpointCondition=
74 | Operation=11
75 | WhichTemplate=0
76 | TemplateFileName=
77 | ListOfEditedProperties=FileName=$AppDir$\..\UIClickerFindWindowsPlugin\lib\i386-win32\UIClickerFindWindows.dllListOfPropertiesAndValues=FindSubControlTopLeftCorner=FindSubControlBotLeftCorner=FindSubControlTopRightCorner=FindSubControlBotRightCorner=FindSubControlLeftEdge=FindSubControlTopEdge=FindSubControlRightEdge=FindSubControlBottomEdge=ParentFindControl=BorderThickness=6MatchWindowEdges=True
78 | ListOfEnabledProperties=
79 | EditedActionName=123
80 | EditedActionType=11
81 | EditedActionCondition=
82 | EditedActionTimeout=1000
83 | NewActionName=
84 | ShouldSaveTemplate=1
85 | ListOfEditedProperties_ET=
86 | ListOfEnabledProperties_ET=
87 |
88 | [Action_5]
89 | ActionName="Sleep"
90 | Action=Sleep
91 | ActionTimeout=0
92 | ActionEnabled=1
93 | ActionCondition=
94 | BreakpointExists=0
95 | BreakpointEnabled=0
96 | BreakpointCondition=
97 | Value=2000
98 |
99 | [Notes]
100 | Content=
101 | TemplateIconPath=
102 |
103 |
--------------------------------------------------------------------------------
/Tests/TestFiles/TestPlugin/TestPlugin.ctpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | -
29 |
30 |
31 | -
32 |
33 |
34 | -
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | -
85 |
86 |
87 | -
88 |
89 |
90 | -
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/Tests/TestFiles/TestPlugin/TestPlugin.ctps:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/Tests/TestFiles/WinInterpTopSelectionLine.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=2
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName="SetPen"
12 | Primitive=SetPen
13 | Color=366FFF
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName="Line"
22 | Primitive=Line
23 | X1=0
24 | Y1=0
25 | X2=16
26 | Y2=0
27 | ShowEndpointPixel=1
28 |
29 |
30 | [Order_0]
31 | OrderName=new
32 | i0=0
33 | i1=1
34 |
35 |
--------------------------------------------------------------------------------
/Tests/TestFiles/WinSearchOverlayBlankRectangle.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=3
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName="SetPen"
12 | Primitive=SetPen
13 | Color=0
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName="SetBrush"
22 | Primitive=SetBrush
23 | Color=0
24 | Style=bsSolid
25 |
26 | [Primitive_2]
27 | PrimitiveName="Rect"
28 | Primitive=Rect
29 | X1=0
30 | Y1=0
31 | X2=$Diff($Control_Width$,2)$
32 | Y2=$Diff($Control_Height$,2)$
33 | ExtendToEndpointCorner=1
34 |
35 |
36 | [Order_0]
37 | OrderName=new
38 | i0=0
39 | i1=1
40 | i2=2
41 |
42 |
--------------------------------------------------------------------------------
/Tests/UI/UIActionsStuff.pas:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2024 VCC
3 | creation date: Oct 2022
4 | initial release date: 30 Oct 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | unit UIActionsStuff;
26 |
27 | {$mode ObjFPC}{$H+}
28 |
29 | interface
30 |
31 | uses
32 | Classes, SysUtils, ClickerUtils, InMemFileSystem, ClickerActionValues;
33 |
34 | type
35 | TOIInteractionData = record
36 | BasicPropertyInfo: TOIPropDef; //name and editor type
37 | //PropertyName: string;
38 | PropertyNamesToExpand: string; //0 = do not expand, it doesn't have subproperties. 1 = should expand, to access subproperties
39 | PropertyValue: string; //what to expect, or what to set
40 | //EditorType: string; //how to interact with the OI editor for that particular property
41 | end;
42 |
43 | TOIInteractionDataArr = array of TOIInteractionData;
44 |
45 |
46 | procedure GenerateExecAppOptionsForTestDriver(var AExecAppOptions: TClkExecAppOptions; AExeArgs: string);
47 | procedure LoadTemplateFromDiskIntoInMemFS(ATemplateName: string; AInMemFS: TInMemFileSystem);
48 |
49 | procedure ListOfSerializedPropertiesToOIInteractionData(AListOfSerProps: string; ABasicPropInfo: PArrayOfProperties; APropIsXP: PArrayOfEnumCounts; APropCnt: Integer; var AProperties: TOIInteractionDataArr);
50 |
51 | implementation
52 |
53 |
54 | procedure GenerateExecAppOptionsForTestDriver(var AExecAppOptions: TClkExecAppOptions; AExeArgs: string);
55 | begin
56 | AExecAppOptions.PathToApp := ExtractFilePath(ParamStr(0)) + '..\..\TestDriver\UIClicker.exe';
57 | AExecAppOptions.ListOfParams := AExeArgs;
58 | AExecAppOptions.CurrentDir := ExtractFileDir(AExecAppOptions.PathToApp);
59 | AExecAppOptions.UseInheritHandles := uihNo;
60 | AExecAppOptions.WaitForApp := False;
61 | AExecAppOptions.NoConsole := True;
62 | end;
63 |
64 |
65 | procedure LoadTemplateFromDiskIntoInMemFS(ATemplateName: string; AInMemFS: TInMemFileSystem);
66 | var
67 | MemStream: TMemoryStream;
68 | begin
69 | MemStream := TMemoryStream.Create;
70 | try
71 | MemStream.LoadFromFile(ATemplateName);
72 | AInMemFS.SaveFileToMem(ATemplateName, MemStream.Memory, MemStream.Size);
73 | finally
74 | MemStream.Free;
75 | end;
76 | end;
77 |
78 |
79 | procedure ListOfSerializedPropertiesToOIInteractionData(AListOfSerProps: string; ABasicPropInfo: PArrayOfProperties; APropIsXP: PArrayOfEnumCounts; APropCnt: Integer; var AProperties: TOIInteractionDataArr);
80 | var
81 | ListOfSerProps: TStringList; //this contains default values
82 | i: Integer;
83 | begin
84 | ListOfSerProps := TStringList.Create;
85 | try
86 | ListOfSerProps.Text := StringReplace(AListOfSerProps, '&', #13#10, [rfReplaceAll]);
87 |
88 | SetLength(AProperties, APropCnt);
89 | for i := 0 to APropCnt - 1 do
90 | begin
91 | AProperties[i].BasicPropertyInfo := ABasicPropInfo^[i];
92 | AProperties[i].PropertyNamesToExpand := IntToStr(APropIsXP^[i]);
93 | AProperties[i].PropertyValue := ListOfSerProps.Values[AProperties[i].BasicPropertyInfo.Name];
94 | end;
95 | finally
96 | ListOfSerProps.Free;
97 | end;
98 | end;
99 |
100 | end.
101 |
102 |
--------------------------------------------------------------------------------
/Tests/UI/UIClickerUITests.ctpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | -
25 |
26 |
27 | -
28 |
29 |
30 | -
31 |
32 |
33 | -
34 |
35 |
36 | -
37 |
38 |
39 | -
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | -
129 |
130 |
131 | -
132 |
133 |
134 | -
135 |
136 |
137 | -
138 |
139 |
140 | -
141 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/Tests/UI/UIClickerUITests.ctps:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/Tests/UI/UIClickerUITests.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/UI/UIClickerUITests.ico
--------------------------------------------------------------------------------
/Tests/UI/UIClickerUITests.ppr:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2025 VCC
3 | creation date: Oct 2022
4 | initial release date: 30 Oct 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | program UIClickerUITests;
26 |
27 | {$mode objfpc}{$H+}
28 |
29 | uses
30 | Interfaces, Forms, Expectations, InMemFileSystem, ObjectInspectorFrame,
31 | PitstopTestRunner, ClickerActionsClient, ClickerUtils,
32 | ClickerActionProperties, TestHTTPAPI, ClickerActionValues, TestUI,
33 | GuiTestRunner, UIActionsStuff, UITestUtils;
34 |
35 | {$R *.res}
36 |
37 | begin
38 | Application.Initialize;
39 | Application.CreateForm(TGuiTestRunner, TestRunner);
40 | Application.CreateForm(TfrmPitstopTestRunner, frmPitstopTestRunner);
41 | Application.Run;
42 | end.
43 |
44 |
--------------------------------------------------------------------------------
/Tests/UI/UIClickerUITests.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/UI/UIClickerUITests.res
--------------------------------------------------------------------------------
/Tests/UIClickerHTTPTests.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/UIClickerHTTPTests.ico
--------------------------------------------------------------------------------
/Tests/UIClickerHTTPTests.ppr:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2025 VCC
3 | creation date: Aug 2022
4 | initial release date: 14 Aug 2022
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | program UIClickerHTTPTests;
26 |
27 | {$mode objfpc}{$H+}
28 |
29 | uses
30 | Interfaces, Forms, GuiTestRunner, TestHTTPAPI, ClickerActionsClient,
31 | ClickerUtils, ClickerTemplates, ClickerFileProviderClient,
32 | ClickerActionProperties, InMemFileSystem, Expectations, MemArchive,
33 | ActionsStuff, TestMiscHTTPAPI, TestTemplateLevelHTTPAPI, TestLowLevelHTTPAPI,
34 | TestClickerClientHTTPAPI, TestClickerClientMemPlugins, DllUtils,
35 | ClickerClientAPI, ClickerClientIntf, PitstopTestRunner;
36 |
37 | {$R *.res}
38 |
39 | begin
40 | Application.Initialize;
41 | Application.CreateForm(TGuiTestRunner, TestRunner);
42 | Application.CreateForm(TfrmPitstopTestRunner, frmPitstopTestRunner);
43 | Application.Run;
44 | end.
45 |
46 |
--------------------------------------------------------------------------------
/Tests/UIClickerHTTPTests.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tests/UIClickerHTTPTests.res
--------------------------------------------------------------------------------
/Tools/ClkDbgSym/ClkDbgSym.ctpr:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | -
59 |
60 |
61 | -
62 |
63 |
64 | -
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/Tools/ClkDbgSym/ClkDbgSym.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/Tools/ClkDbgSym/ClkDbgSym.exe
--------------------------------------------------------------------------------
/Tools/ClkDbgSym/ClkDbgSym.ppr:
--------------------------------------------------------------------------------
1 | {
2 | Copyright (C) 2024 VCC
3 | creation date: 14 Jan 2024
4 | initial release date: 15 Jan 2024
5 |
6 | author: VCC
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"),
9 | to deal in the Software without restriction, including without limitation
10 | the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 | and/or sell copies of the Software, and to permit persons to whom the
12 | Software is furnished to do so, subject to the following conditions:
13 | The above copyright notice and this permission notice shall be included
14 | in all copies or substantial portions of the Software.
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 | }
23 |
24 |
25 | //This tool creates high-level debug symbols for UIClicker, from plugin projects.
26 | //The full path to symbols file (.DbgSym is expected to be found as the first argument.
27 | //The next arguments should be the source files, which contain "DbgPoint" calls.
28 |
29 | program ClkDbgSym;
30 |
31 | {$H+}
32 | //{$mode objfpc}
33 | {$mode Delphi}
34 |
35 | uses
36 | {$IFDEF UNIX}
37 | cthreads,
38 | {$ENDIF}
39 | SysUtils, Classes, Math
40 | { you can add units after this };
41 |
42 | function ExtractFileNameNoExt(AFnm: string): string;
43 | var
44 | FnmWithExt: string;
45 | PosExt: Integer;
46 | begin
47 | FnmWithExt := ExtractFileName(AFnm);
48 | PosExt := Pos(ExtractFileExt(FnmWithExt), FnmWithExt);
49 |
50 | if PosExt > 0 then
51 | Result := Copy(FnmWithExt, 1, PosExt - 1)
52 | else
53 | Result := FnmWithExt;
54 | end;
55 |
56 |
57 | var
58 | i, j: Integer;
59 | SrcContent, DbgSymContent: TStringList;
60 | s, SrcName, DestName: string;
61 | PosDbgPoint, DbgPointIdx: Integer;
62 | PosComment: Integer; //Only comments starting on the same line, are suported. If the line is already in a multi-line comment, it is read as non-commented.
63 | begin
64 | if ParamCount > 1 then
65 | begin
66 | SrcContent := TStringList.Create;
67 | DbgSymContent := TStringList.Create;
68 | try
69 | DestName := ParamStr(1); //first argument is the destination file name ( .DbgSym)
70 |
71 | for i := 2 to ParamCount do
72 | begin
73 | DbgSymContent.Add('[' + ParamStr(i) + ']');
74 |
75 | if FileExists(ParamStr(i)) then
76 | begin
77 | SrcName := ParamStr(i);
78 | SrcContent.LoadFromFile(SrcName);
79 |
80 | DbgPointIdx := 0;
81 | for j := 0 to SrcContent.Count - 1 do
82 | begin
83 | s := SrcContent.Strings[j];
84 | PosDbgPoint := Pos(' DbgPoint(', s);
85 |
86 | if PosDbgPoint = 0 then
87 | PosDbgPoint := Pos('if DbgPoint(', s);
88 |
89 | if PosDbgPoint = 0 then
90 | PosDbgPoint := Pos('if not DbgPoint(', s);
91 |
92 | if PosDbgPoint > 0 then
93 | begin
94 | PosComment := 0;
95 | PosComment := Max(PosComment, Pos('//', s));
96 | PosComment := Max(PosComment, Pos('{', s));
97 | PosComment := Max(PosComment, Pos('(*', s));
98 | PosComment := Max(PosComment, Pos('/*', s)); // 'c'-comment
99 |
100 | if (PosComment = 0) or (PosComment > PosDbgPoint + Length('DbgPoint(')) then
101 | begin
102 | DbgSymContent.Add('DbgPointIdx_' + IntToStr(j) + '=' + s);
103 | Inc(DbgPointIdx);
104 | end;
105 | end;
106 | end;
107 | end //if FileExists
108 | else
109 | DbgSymContent.Add('LineCount=-1'); //Source file not found
110 |
111 | DbgSymContent.Add('');
112 | end; //for input files
113 |
114 | try
115 | DbgSymContent.SaveToFile(DestName);
116 | except
117 | on E: Exception do
118 | begin
119 | try
120 | WriteLn('Cannot save file: "' + DestName + '" Ex: ' + E.Message);
121 | except
122 | //can't call WriteLn
123 | end;
124 | end;
125 | end;
126 | finally
127 | SrcContent.Free;
128 | DbgSymContent.Free;
129 | end;
130 | end;
131 | end.
132 |
133 |
--------------------------------------------------------------------------------
/UIClicker.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/UIClicker.ico
--------------------------------------------------------------------------------
/UIClicker.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/UIClicker.res
--------------------------------------------------------------------------------
/py/Tests/RunExecuteCallTemplateAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | CallTemplateOptions = GetDefaultCallTemplateOptions()
53 | CallTemplateOptions.TemplateFileName = 'NonExistentTemplate'
54 | CallTemplateOptions.ListOfCustomVarsAndValues = '$NewVar$=3'
55 | CallTemplateOptions.EvaluateBeforeCalling = True
56 | CallTemplateOptions.CallOnlyIfCondition = False #still required, to prevent a pop-up, until the feature is removed
57 | CallTemplateOptions.CallTemplateLoop.Enabled = True
58 | CallTemplateOptions.CallTemplateLoop.Counter = '$cnt$'
59 | CallTemplateOptions.CallTemplateLoop.InitValue = '78'
60 | CallTemplateOptions.CallTemplateLoop.EndValue = '79'
61 | CallTemplateOptions.CallTemplateLoop.Direction = TLoopDirection.ldAuto
62 | CallTemplateOptions.CallTemplateLoop.BreakCondition = '$a$==$b$'
63 | CallTemplateOptions.CallTemplateLoop.EvalBreakPosition = TLoopEvalBreakPosition.lebpAfterContent
64 |
65 | print("ExecuteCallTemplateAction: ", DllFuncs.ExecuteCallTemplateAction("Another CallTemplate", 100, CallTemplateOptions, True, 'Disk'))
66 | finally:
67 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
68 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
69 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteClickAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | ClickOptions = GetDefaultClickOptions()
53 | ClickOptions.XClickPointReference = TXClickPointReference.xrefVar
54 | ClickOptions.YClickPointReference = TYClickPointReference.yrefAbsolute
55 | ClickOptions.XClickPointVar = 'FirstVar'
56 | ClickOptions.YClickPointVar = 'SecondVar'
57 | ClickOptions.XOffset = 'FirstOffset'
58 | ClickOptions.YOffset = 'SecondOffset'
59 | ClickOptions.MouseButton = TMouseButton.mbExtra1
60 | ClickOptions.ClickWithCtrl = True
61 | ClickOptions.ClickWithAlt = True
62 | ClickOptions.ClickWithShift = True
63 | ClickOptions.ClickWithDoubleClick = True
64 | ClickOptions.Count = 10
65 | ClickOptions.LeaveMouse = True
66 | ClickOptions.MoveWithoutClick = True
67 | ClickOptions.ClickType = CClickType_Wheel
68 | ClickOptions.XClickPointReferenceDest = TXClickPointReference.xrefWidth
69 | ClickOptions.YClickPointReferenceDest = TYClickPointReference.yrefHeight
70 | ClickOptions.XClickPointVarDest = 'ThirdVar'
71 | ClickOptions.YClickPointVarDest = 'FourthVar'
72 | ClickOptions.XOffsetDest = 'ThirdOffset'
73 | ClickOptions.YOffsetDest = 'FourthOffset'
74 | ClickOptions.MouseWheelType = TMouseWheelType.mwtHoriz
75 | ClickOptions.MouseWheelAmount = '30'
76 | ClickOptions.DelayAfterMovingToDestination = '40'
77 | ClickOptions.DelayAfterMouseDown = '50'
78 | ClickOptions.MoveDuration = '60'
79 | ClickOptions.UseClipCursor = True
80 |
81 | print("ExecuteClickAction: ", DllFuncs.ExecuteClickAction("Another Click", 100, ClickOptions, True))
82 | finally:
83 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
84 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
85 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteEditTemplateAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
28 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
29 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
30 | sys.path.append(ClickerClientAPIDir)
31 |
32 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
33 | from UIClickerTypes import *
34 | from UIClickerTypes import TClickOptions
35 | from UIClickerClient import *
36 |
37 |
38 | import time
39 |
40 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
41 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
42 |
43 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
44 | try:
45 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
46 |
47 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
48 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
49 |
50 |
51 | EditTemplateOptions = GetDefaultEditTemplateOptions()
52 | EditTemplateOptions.Operation = TEditTemplateOperation.etoDeleteAction
53 | EditTemplateOptions.WhichTemplate = TEditTemplateWhichTemplate.etwtSelf
54 | EditTemplateOptions.TemplateFileName = 'NoFnm'
55 | EditTemplateOptions.ListOfEnabledProperties = 'Ena'
56 | EditTemplateOptions.EditedActionName = 'Edt'
57 | EditTemplateOptions.EditedActionType = TClkAction.acExecApp #TClkAction(CClkUnsetAction); // acClick;
58 | EditTemplateOptions.EditedActionCondition = '$3$==$4$'
59 | EditTemplateOptions.EditedActionTimeout = 2000
60 | EditTemplateOptions.NewActionName = 'Generic'
61 | EditTemplateOptions.ShouldSaveTemplate = False
62 |
63 |
64 | #ExecAppOptions = GetDefaultExecAppOptions() #Edited action
65 | EditTemplateOptions.ListOfEditedProperties = 'PathToApp=ListOfParams=WaitForApp=0AppStdIn=CurrentDir=UseInheritHandles=0NoConsole=0' #GetExecAppActionProperties(ExecAppOptions)
66 |
67 |
68 | print("ExecuteEditTemplateAction: ", DllFuncs.ExecuteEditTemplateAction("Another EditTemplate", 100, EditTemplateOptions, True))
69 | finally:
70 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
71 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
72 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteExecAppAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | ExecAppOptions = GetDefaultExecAppOptions()
53 | ExecAppOptions.PathToApp = 'TheNonExistentApp'
54 | ExecAppOptions.ListOfParams = 'NewParams'
55 | ExecAppOptions.WaitForApp = True
56 | ExecAppOptions.AppStdIn = 'MyStdIn'
57 | ExecAppOptions.CurrentDir = 'TheDir'
58 | ExecAppOptions.UseInheritHandles = TExecAppUseInheritHandles.uihYes
59 | ExecAppOptions.NoConsole = True
60 |
61 | print("ExecuteExecAppAction: ", DllFuncs.ExecuteExecAppAction("Another ExecApp", 100, ExecAppOptions, True))
62 | finally:
63 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
64 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
65 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteLoadSetVarFromFileAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | LoadSetVarFromFileOptions = GetDefaultLoadSetVarFromFileOptions()
53 | LoadSetVarFromFileOptions.FileName = 'UnknownLoadedFile'
54 | LoadSetVarFromFileOptions.SetVarActionName = '$SetVarNewName$'
55 |
56 |
57 | print("ExecuteLoadSetVarFromFileAction: ", DllFuncs.ExecuteLoadSetVarFromFileAction("Another LoadSetVarFromFile", 100, LoadSetVarFromFileOptions, True))
58 | finally:
59 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
60 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
61 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecutePluginAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | PluginOptions = GetDefaultPluginOptions()
53 | PluginOptions.FileName = 'PluginFnm'
54 | PluginOptions.ListOfPropertiesAndValues = 'NoPropertiesAndValues'
55 |
56 |
57 | print("ExecutePluginAction: ", DllFuncs.ExecutePluginAction("Another Plugin", 100, PluginOptions, True, True))
58 | finally:
59 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
60 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
61 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteSaveSetVarToFileAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | SaveSetVarToFileOptions = GetDefaultSaveSetVarToFileOptions()
53 | SaveSetVarToFileOptions.FileName = 'UnknownSavedFile'
54 | SaveSetVarToFileOptions.SetVarActionName = '$SetVarOldName$'
55 |
56 |
57 | print("ExecuteSaveSetVarToFileAction: ", DllFuncs.ExecuteSaveSetVarToFileAction("Another SaveSetVarToFile", 100, SaveSetVarToFileOptions, True))
58 | finally:
59 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
60 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
61 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteSetControlTextAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | SetControlTextOptions = GetDefaultSetControlTextOptions()
53 | SetControlTextOptions.Text = 'some text'
54 | SetControlTextOptions.ControlType = TClkSetTextControlType.stComboBox
55 | SetControlTextOptions.DelayBetweenKeyStrokes = '300'
56 | SetControlTextOptions.Count = '7'
57 |
58 | print("ExecuteSetControlTextAction: ", DllFuncs.ExecuteSetControlTextAction("Another SetControlText", 100, SetControlTextOptions, True))
59 | finally:
60 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
61 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
62 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteSetVarAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | SetVarOptions = GetDefaultSetVarOptions()
53 | SetVarOptions.ListOfVarNames = '$MyVar$'
54 | SetVarOptions.ListOfVarValues = 'MyValue'
55 | SetVarOptions.ListOfVarEvalBefore = '1'
56 | SetVarOptions.FailOnException = True
57 |
58 |
59 | print("ExecuteSetVarAction: ", DllFuncs.ExecuteSetVarAction("Another SetVar", 100, SetVarOptions, True))
60 | finally:
61 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
62 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
63 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteSleepAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | SleepOptions = GetDefaultSleepOptions()
53 | SleepOptions.Value = '3'
54 |
55 |
56 | print("ExecuteSleepAction: ", DllFuncs.ExecuteSleepAction("Another Sleep", 100, SleepOptions, True))
57 | finally:
58 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
59 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
60 | print("end of script")
--------------------------------------------------------------------------------
/py/Tests/RunExecuteWindowOperationsAction.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 VCC
2 | # creation date: 19 Dec 2024
3 | # initial release date: 19 Dec 2024
4 | #
5 | # author: VCC
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"),
8 | # to deal in the Software without restriction, including without limitation
9 | # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 | # and/or sell copies of the Software, and to permit persons to whom the
11 | # Software is furnished to do so, subject to the following conditions:
12 | # The above copyright notice and this permission notice shall be included
13 | # in all copies or substantial portions of the Software.
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
23 | import sys
24 | import ctypes
25 | import ctypes.wintypes #without importing wintypes, python crashes when calling functions like TestConnectionToServerFunc
26 | import os
27 |
28 | ClickerClientAPIDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
29 | ClickerClientAPIDir = os.path.join(ClickerClientAPIDir, 'py')
30 | #print('--- ClickerClientAPIDir = ', ClickerClientAPIDir)
31 | sys.path.append(ClickerClientAPIDir)
32 |
33 | from ctypes.wintypes import LPCSTR, LPCWSTR, BYTE, BOOLEAN, LONG
34 | from UIClickerTypes import *
35 | from UIClickerTypes import TClickOptions
36 | from UIClickerClient import *
37 |
38 |
39 | import time
40 |
41 | DllFuncs = TUIClickerDllFunctions() #use TUIClickerDllFunctions for Boolean results (True for success)
42 | #DllFuncs = TDllFunctions() #use TDllFunctions for debugging (see functions implementation for details (some functions return 1 for success, others return 0 for success)
43 |
44 | print("InitClickerClient: ", DllFuncs.InitClickerClient())
45 | try:
46 | print("CreateLoggingWindow: ", DllFuncs.CreateLoggingWindow())
47 |
48 | print("SetServerAddress: ", DllFuncs.SetServerAddress('http://127.0.0.1:35444/'))
49 | print("TestConnectionToServer: ", DllFuncs.TestConnectionToServer())
50 |
51 |
52 | WindowOperationsOptions = GetDefaultWindowOperationsOptions()
53 | WindowOperationsOptions.Operation = TWindowOperation.woMoveResize
54 | WindowOperationsOptions.NewX = '$Control_Left$'
55 | WindowOperationsOptions.NewY = '$Control_Top$'
56 | WindowOperationsOptions.NewWidth = '$Control_Width$'
57 | WindowOperationsOptions.NewHeight = '$Control_Height$'
58 | WindowOperationsOptions.NewPositionEnabled = True
59 | WindowOperationsOptions.NewSizeEnabled = True
60 |
61 |
62 | print("ExecuteWindowOperationsAction: ", DllFuncs.ExecuteWindowOperationsAction("Another WindowOperations", 100, WindowOperationsOptions, True))
63 | finally:
64 | print("DestroyLoggingWindow: ", DllFuncs.DestroyLoggingWindow())
65 | print("DoneClickerClient", DllFuncs.DoneClickerClient())
66 | print("end of script")
--------------------------------------------------------------------------------
/py/bmps/PreviewButtonIcon.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=6
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=SetPen int
12 | Primitive=SetPen
13 | Color=357C16
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName=SetBrush int
22 | Primitive=SetBrush
23 | Color=1BE6B5
24 | Style=bsSolid
25 |
26 | [Primitive_2]
27 | PrimitiveName=Int rect
28 | Primitive=Rect
29 | X1=5
30 | Y1=3
31 | X2=12
32 | Y2=10
33 | ExtendToEndpointCorner=1
34 |
35 | [Primitive_3]
36 | PrimitiveName=SetPen ext
37 | Primitive=SetPen
38 | Color=357C16
39 | Style=psSolid
40 | Width=1
41 | Mode=pmCopy
42 | EndCap=pecRound
43 | JoinStyle=pjsRound
44 |
45 | [Primitive_4]
46 | PrimitiveName=SetBrush ext
47 | Primitive=SetBrush
48 | Color=0CC9FF
49 | Style=bsSolid
50 |
51 | [Primitive_5]
52 | PrimitiveName=Ext rect
53 | Primitive=Rect
54 | X1=0
55 | Y1=0
56 | X2=13
57 | Y2=11
58 | ExtendToEndpointCorner=1
59 |
60 |
61 | [Order_0]
62 | OrderName=main
63 | i0=3
64 | i1=4
65 | i2=5
66 | i3=0
67 | i4=1
68 | i5=2
69 |
70 |
--------------------------------------------------------------------------------
/py/bmps/PreviewButtonIcon64.pmtv:
--------------------------------------------------------------------------------
1 | [Settings]
2 | CompositorDirection=0
3 |
4 | [Primitives]
5 | Count=6
6 |
7 | [ProcessingOrder]
8 | Count=1
9 |
10 | [Primitive_0]
11 | PrimitiveName=SetPen int
12 | Primitive=SetPen
13 | Color=377E18
14 | Style=psSolid
15 | Width=1
16 | Mode=pmCopy
17 | EndCap=pecRound
18 | JoinStyle=pjsRound
19 |
20 | [Primitive_1]
21 | PrimitiveName=SetBrush int
22 | Primitive=SetBrush
23 | Color=1DE6B5
24 | Style=bsSolid
25 |
26 | [Primitive_2]
27 | PrimitiveName=Int rect
28 | Primitive=Rect
29 | X1=5
30 | Y1=3
31 | X2=12
32 | Y2=10
33 | ExtendToEndpointCorner=1
34 |
35 | [Primitive_3]
36 | PrimitiveName=SetPen ext
37 | Primitive=SetPen
38 | Color=377E18
39 | Style=psSolid
40 | Width=1
41 | Mode=pmCopy
42 | EndCap=pecRound
43 | JoinStyle=pjsRound
44 |
45 | [Primitive_4]
46 | PrimitiveName=SetBrush ext
47 | Primitive=SetBrush
48 | Color=0EC9FF
49 | Style=bsSolid
50 |
51 | [Primitive_5]
52 | PrimitiveName=Ext rect
53 | Primitive=Rect
54 | X1=0
55 | Y1=0
56 | X2=13
57 | Y2=11
58 | ExtendToEndpointCorner=1
59 |
60 |
61 | [Order_0]
62 | OrderName=main
63 | i0=3
64 | i1=4
65 | i2=5
66 | i3=0
67 | i4=1
68 | i5=2
69 |
70 |
--------------------------------------------------------------------------------
/py/bmps/ShowActionsWindow_Focused.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/py/bmps/ShowActionsWindow_Focused.bmp
--------------------------------------------------------------------------------
/py/bmps/ShowActionsWindow_FocusedHighlighted.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/py/bmps/ShowActionsWindow_FocusedHighlighted.bmp
--------------------------------------------------------------------------------
/py/bmps/ShowActionsWindow_Unfocused.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/py/bmps/ShowActionsWindow_Unfocused.bmp
--------------------------------------------------------------------------------
/py/bmps/ShowWindowInterpreter32.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/py/bmps/ShowWindowInterpreter32.bmp
--------------------------------------------------------------------------------
/py/bmps/ShowWindowInterpreter64.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/py/bmps/ShowWindowInterpreter64.bmp
--------------------------------------------------------------------------------
/py/bmps/ShowWindowInterpreter_Wine.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCC02/UIClicker/a7d7be8dcb8ec8811eb84c5eb11783d8121e8a56/py/bmps/ShowWindowInterpreter_Wine.bmp
--------------------------------------------------------------------------------