Skip to content

Commit bf98264

Browse files
committed
Final v1.4.4 push; bugfixes
- finished "AboutVersion" - fixed bug resulting in the action tester not working (not being included in the build) - the start window not showing automatically for new users - fixed "move_mouse" action
1 parent 509c555 commit bf98264

File tree

14 files changed

+25
-16
lines changed

14 files changed

+25
-16
lines changed
Binary file not shown.
Binary file not shown.

Advanced Installer/Advanced Installer.aip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
<ROW File="Spanish.json" Component_="Danish.json" FileName="SPANIS~1.JSO|Spanish.json" Attributes="0" SourcePath="..\AssistantComputerControl\Translations\Spanish.json" SelfReg="false"/>
141141
<ROW File="PortugueseBrasil.json" Component_="Danish.json" FileName="PORTUG~1.JSO|Portuguese - Brasil.json" Attributes="0" SourcePath="..\AssistantComputerControl\Translations\Portuguese - Brasil.json" SelfReg="false"/>
142142
<ROW File="Dutch.json" Component_="Danish.json" FileName="DUTCH~1.JSO|Dutch.json" Attributes="0" SourcePath="..\AssistantComputerControl\Translations\Dutch.json" SelfReg="false"/>
143+
<ROW File="ActionTester.html" Component_="AboutVersion.html" FileName="ACTION~1.HTM|ActionTester.html" Attributes="0" SourcePath="..\AssistantComputerControl\WebFiles\ActionTester.html" SelfReg="false"/>
143144
</COMPONENT>
144145
<COMPONENT cid="caphyon.advinst.msicomp.AppPathsComponent">
145146
<ROW Name="AI_APPPATH_PERBUILD_AssistantComputerControl.exe" Path="[|AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe]\[|AI_PROPPATH_FILENAME_PERBUILD_AssistantComputerControl.exe]" Type="2" Content="0"/>

AssistantComputerControl/Actions.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* AssistantComputerControl
33
* Made by Albert MN.
4-
* Updated: v1.4.2, 12-12-2020
4+
* Updated: v1.4.4, 19-05-2021
55
*
66
* Use:
77
* - Functions for all the actions
@@ -1051,20 +1051,23 @@ public void MoveMouse(String parameter) {
10511051
public const int MOUSEEVENTF_MIDDLEDOWN = 0x20;
10521052
public const int MOUSEEVENTF_MIDDLEUP = 0x40;
10531053

1054-
public void MouseClick(string parameter = "", string secondaryParameter = "") {
1054+
public void MouseClick(string parameter = "") {
10551055
/*
10561056
* Action made by community member Joshua Miller (modified by Albert)
10571057
*/
10581058

1059+
string firstParameter = parameter != null && parameter != String.Empty ? ActionChecker.GetSecondaryParam(parameter)[0] : "",
1060+
secondParameter = parameter != null && parameter != String.Empty ? (ActionChecker.GetSecondaryParam(parameter).Length > 1 ? ActionChecker.GetSecondaryParam(parameter)[1] : null) : "";
1061+
10591062
int timesToClick = 1;
1060-
string type = parameter;
1063+
string type = firstParameter;
10611064

1062-
if (parameter == String.Empty) {
1065+
if (firstParameter == String.Empty) {
10631066
type = "left";
10641067
}
10651068

1066-
if (secondaryParameter != String.Empty) {
1067-
if (Int32.TryParse(secondaryParameter, out int repeatAmount)) {
1069+
if (secondParameter != String.Empty && secondParameter != null) {
1070+
if (Int32.TryParse(secondParameter, out int repeatAmount)) {
10681071
timesToClick = repeatAmount;
10691072
} else {
10701073
Error("Secondary parameter (how many times to click) is not a valid number");

AssistantComputerControl/MainProgram.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* AssistantComputerControl
33
* Made by Albert MN.
4-
* Updated: v1.4.4, 08-05-2021
4+
* Updated: v1.4.4, 19-05-2021
55
*
66
* Use:
77
* - Main class. Starts everything.
@@ -28,7 +28,7 @@
2828
namespace AssistantComputerControl {
2929
class MainProgram {
3030
public const string softwareVersion = "1.4.4",
31-
releaseDate = "2021-05-19 00:05:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
31+
releaseDate = "2021-05-19 20:59:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
3232
appName = "AssistantComputerControl",
3333

3434
sentryToken = "super_secret";
@@ -286,12 +286,9 @@ void ActualMain() {
286286
key = key.OpenSubKey("AssistantComputerControl", true);
287287
key.SetValue("FirstTime", false);
288288

289-
Properties.Settings.Default.HasCompletedTutorial = true;
290-
Properties.Settings.Default.Save();
291-
292289
ShowGettingStarted();
293290

294-
DoDebug("Starting setup guide");
291+
DoDebug("Starting setup guide (first time opening ACC - wuhu!)");
295292
} else {
296293
if (!Properties.Settings.Default.HasCompletedTutorial) {
297294
ShowGettingStarted();
@@ -321,7 +318,6 @@ void ActualMain() {
321318

322319
SetStartup(true);
323320
} else {
324-
//Make sure the startup is up to date (fixed task errors in 1.4.4, for example)
325321
if (ACCStartsWithWindows()) {
326322
SetStartup(true);
327323
}
@@ -662,6 +658,14 @@ public static void SetStartup(bool status, bool setThroughSoftware = false) {
662658
//Try start with Task Scheduler;
663659
var userId = WindowsIdentity.GetCurrent().Name;
664660

661+
try {
662+
//Try to delete first; make sure it's gone before attempting to re-create it
663+
using (TaskService ts = new TaskService()) {
664+
ts.RootFolder.DeleteTask(@"AssistantComputerControl startup");
665+
}
666+
} catch {
667+
}
668+
665669
using (var ts = new TaskService()) {
666670
var td = ts.NewTask();
667671
td.RegistrationInfo.Author = "Albert MN. | AssistantComputerControl";
@@ -857,7 +861,7 @@ public static string CheckPath(bool noDefaultCheck = false) {
857861
if ((Properties.Settings.Default.HasCompletedTutorial && gettingStarted is null && !hasAskedForSetupAgain)) {
858862
//Cloud service path not found & no custom filepath, go through setup again?
859863
hasAskedForSetupAgain = true;
860-
var msgBox = MessageBox.Show(Translator.__("no_cloudservice_chosen", "general"), "[ERROR] No folder specified | AssistantComputerControl", MessageBoxButtons.YesNo);
864+
var msgBox = MessageBox.Show("TEST" + Translator.__("no_cloudservice_chosen", "general"), "[ERROR] No folder specified | AssistantComputerControl", MessageBoxButtons.YesNo);
861865
if (msgBox == DialogResult.Yes) {
862866
ShowGettingStarted();
863867
}

AssistantComputerControl/WebFiles/AboutVersion.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
<i>Version 1.4.4 hotfix notes;</i>
3838
<ul>
3939
<li class="mb-2">Fixed <b>start with windows</b> bug on laptops <i>(when not charging, and made ACC close when charging stopped...)</i> - big thanks to community member BricioEs02 for helping debug this</li>
40-
<li class="mb-2">Fixed <code>mouse_click</code> action only allowing left clicks <i>(parameters didn't work)</i></li>
40+
<li class="mb-2">Fixed <code>mouse_click</code> action only allowing left clicks <i>(parameters didn't work)</i> and secondary parameter <i>(amount of times to click)</i> also not working</li>
4141
<li class="mb-2">Fixed bug that made the update checker able to crash the software if no network was available</li>
4242
<li class="mb-2">Added <code>ignoreme</code> "action", which can be used to have a line in an action file ignored <i>(most won't get a use out of this, but an article on why this is useful for some is coming out soon)</i></li>
4343
<li class="mb-2">Added extra safety to "start with windows", so that there's now two ways of setting it; if the first one fails, it'll try the second <i>(automatically - nothing to do with the user)</i></li>
44+
<li class="mb-2">Fixed issue that resulted in the "action tester" not being included in the install</li>
4445
<li>Sorry for all the updates - the v1.4.2 update just broke a lot of things apparently</li>
4546
</ul>
4647
</li>

AssistantComputerControl/actionChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* AssistantComputerControl
33
* Made by Albert MN.
4-
* Updated: v1.4.0, 15-01-2020
4+
* Updated: v1.4.4, 19-05-2021
55
*
66
* Use:
77
* - Checks and execute action files
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)