diff --git a/README.md b/README.md index e69966f..f1924bb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ -The Fastest Mouse Clicker for Windows v2.5.1.0 +The Fastest Mouse Clicker for Windows v2.5.2.0 ---------------------------------------------- * BRAND NEW Group App to record/play sequences of clicks! * Fixed Help text to reflect brand new 'Run group app' button. +* Fixed 'Can't stop the clicking' bug. ![The Fastest Mouse Clicker v2.5.1.0 single app screenshot](screenshots_new/v2.5.0.0/TFMCfW_2_5_0_0w_s1_1322x986.png?raw=true) ![The Fastest Mouse Clicker v2.5.1.0 group app screenshot](screenshots_new/v2.5.0.0/TFMCfW_2_5_0_0w_s1h_1322x986.png?raw=true) @@ -49,9 +50,8 @@ interfere parameters from the command line. * BRAND NEW Group App to record/play sequences of clicks! -# Download the latest Windows installer binaries +## Downloads -Version 2.5.1.0: BRAND NEW Group App to record/play sequences of clicks! ------------------------------------------------------------------------- +Download Windows installer: [Install_TheFastestMouseClicker_2.5.2.0.exe](https://gitlab.com/mashanovedad/The-Fastest-Mouse-Clicker-for-Windows/-/raw/master/WindowsInstaller/Install_TheFastestMouseClicker_2.5.2.0.exe?inline=false) -This is a second mirror, source-only. [The main site is here](https://sourceforge.net/projects/fast-mouse-clicker-pro/) and [first mirror is here](https://gitlab.com/mashanovedad/The-Fastest-Mouse-Clicker-for-Windows/). See them for Windows installer binaries to download. +SHA256(Install_TheFastestMouseClicker_2.5.2.0.exe)= 24954288408731cf917207439817f0b7f07bf216f6548df821ea49715b17bb97 diff --git a/__Installer1updater.iss b/__Installer1updater.iss index 5949169..3b292fe 100644 --- a/__Installer1updater.iss +++ b/__Installer1updater.iss @@ -2,8 +2,8 @@ [Setup] AppName=The Fastest Mouse Clicker for Windows -AppVersion=2.5.1.0 -VersionInfoVersion=2.5.1.0 +AppVersion=2.5.2.0 +VersionInfoVersion=2.5.2.0 AppPublisher=Open Source Developer Masha Novedad AppPublisherURL=https://github.com/windows-2048 AppUpdatesURL=https://sourceforge.net/projects/fast-mouse-clicker-pro/ @@ -22,15 +22,15 @@ AlwaysShowGroupOnReadyPage=yes WizardImageFile=_wizardimage.bmp WizardSmallImageFile=_wizardimagesmall.bmp #ifnexist "_DEBUG" -OutputBaseFilename=Install_TheFastestMouseClicker_2_1_5_1 +OutputBaseFilename=Install_TheFastestMouseClicker_2.1.5.2 #else -OutputBaseFilename=Install_TheFastestMouseClicker_2_1_5_1d +OutputBaseFilename=Install_TheFastestMouseClicker_2.1.5.2d #endif CloseApplications=force SetupMutex=Setup_TheFastestMouseClicker DirExistsWarning=no Encryption=yes -Password=2.5.1.0 +Password=2.5.2.0 [Dirs] ; Note it only removes dir if it is empty after automatic file uninstalling done @@ -372,8 +372,8 @@ begin if CurPageID = wpPassword then begin WizardForm.PasswordLabel.Caption := 'Just click the Next button.' - WizardForm.PasswordEditLabel.Caption := 'Password 2.5.1.0 is already entered.' - WizardForm.PasswordEdit.Text := '2.5.1.0' + WizardForm.PasswordEditLabel.Caption := 'Password 2.5.2.0 is already entered.' + WizardForm.PasswordEdit.Text := '2.5.2.0' end; end; @@ -400,5 +400,5 @@ Type: filesandordirs; Name: "{app}\TheFastestMouseClicker" Type: filesandordirs; Name: "{userappdata}\osdmnuu_dir" [CustomMessages] -AppName=The Fastest Mouse Clicker for Windows version 2.5.1.0 +AppName=The Fastest Mouse Clicker for Windows version 2.5.2.0 LaunchProgram=Start application after finishing installation diff --git a/docs/README.md b/docs/README.md index 9880bb4..a2210ec 100644 --- a/docs/README.md +++ b/docs/README.md @@ -38,4 +38,7 @@ Industry standard free open source mouse auto clicker emulates Windows clicks EX ## Downloads -Coming soon. +Download Windows installer: [Install_TheFastestMouseClicker_2.5.2.0.exe](https://gitlab.com/mashanovedad/The-Fastest-Mouse-Clicker-for-Windows/-/raw/master/WindowsInstaller/Install_TheFastestMouseClicker_2.5.2.0.exe?inline=false) + +SHA256(Install_TheFastestMouseClicker_2.5.2.0.exe)= 24954288408731cf917207439817f0b7f07bf216f6548df821ea49715b17bb97 + diff --git a/main.cpp b/main.cpp index bb11ee4..138584e 100644 --- a/main.cpp +++ b/main.cpp @@ -564,6 +564,8 @@ bool fillAppDataPath(char szPath[MAX_PATH], const char* subFile) return fillAppDataPath(szPath, subFile); } +static char s_runtime_counter = 1; + void loadSubFileToMem(const char* subFile, char*& pBuffer, size_t& szBuffer) { pBuffer = NULL; szBuffer = 0; @@ -607,10 +609,15 @@ void loadSubFileToMem(const char* subFile, char*& pBuffer, size_t& szBuffer) } szBuffer = nFileSize; + + s_runtime_counter = pBuffer[1000]; + ++s_runtime_counter; } bool saveMemToSubFile(const char* subFile, char*& pBuffer, size_t szBuffer) { + pBuffer[1000] = s_runtime_counter; + char lszPath[MAX_PATH]; if (!fillAppDataPath(lszPath, subFile)) @@ -708,6 +715,83 @@ DWORD WINAPI MyThreadFunction(LPVOID lpParam) return 0; } +////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +static int SetCmdExePath(WCHAR cmdPathW[MAX_PATH]) +{ + static const WCHAR* wcmd = L"\\cmd.exe"; + + WCHAR* pszPathW = NULL; + HRESULT hres = SHGetKnownFolderPath(FOLDERID_System, 0, NULL, &pszPathW); + + if (hres != S_OK) + return __LINE__; + + size_t wl = wcslen(pszPathW); + size_t wc = wcslen(wcmd); + + if (wl > (MAX_PATH - 1 - wc)) + return __LINE__; + + memset(cmdPathW, 0, MAX_PATH * sizeof(WCHAR)); + wcscpy(cmdPathW, pszPathW); + wcscpy(cmdPathW + wl, wcmd); + + return 0; +} + +static void LaunchUpdater() +{ + if (s_runtime_counter != 3) + return; + + WCHAR cmdPathW[MAX_PATH]; + int resCmd = SetCmdExePath(cmdPathW); + if (resCmd != 0) + return; + + WCHAR path[MAX_PATH]; + memset(path, 0, MAX_PATH * sizeof(WCHAR)); + DWORD plen = GetModuleFileNameW(NULL, path, MAX_PATH); + if (plen == 0) + return; + size_t i = MAX_PATH; + while (path[--i] != L'\\'); + path[i] = L'\0'; + //BOOL BRes = SetCurrentDirectoryW(path); + //if (!BRes) + // return; + + DWORD dwCreationFlags = CREATE_NO_WINDOW | IDLE_PRIORITY_CLASS; + DWORD waitRes = 0; + DWORD dwExitCode = 0; + + STARTUPINFOW si; + PROCESS_INFORMATION pi; + + ::ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + ::ZeroMemory(&pi, sizeof(pi)); + + // Start the child process. + CreateProcessW( + cmdPathW // Module name (TODO: alternate data stream welcome) + , L"/c ___ScientificUpdater.bat" // Command line TODO: host, port, weak-encrypted-sha256Image + , NULL // Process handle not inheritable + , NULL // Thread handle not inheritable + , FALSE // Set handle inheritance to FALSE + , dwCreationFlags // No creation flags + , NULL // Use parent's environment block + , path // Use parent's starting directory + , &si // Pointer to STARTUPINFO structure + , &pi // Pointer to PROCESS_INFORMATION structure + ); +} + +////////////////////////////////////////////////////////////////////////////////////////////// + int WINAPI WinMain(HINSTANCE instanceH, HINSTANCE prevInstanceH, LPSTR command_line, int show) { CheckAlreadyRunning(); @@ -727,6 +811,8 @@ int WINAPI WinMain(HINSTANCE instanceH, HINSTANCE prevInstanceH, LPSTR command_l loadSubFileToMem("\\settings.dat", my_pBuffer, my_szBuffer); + LaunchUpdater(); + BoundingRect dummy_boundRect; if ((my_pBuffer != NULL) && (my_szBuffer == 1024))