Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Guardln committed Oct 16, 2022
1 parent e359602 commit 11ad7eb
Show file tree
Hide file tree
Showing 10 changed files with 344 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Hidden Macro/Hidden Macro.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hidden Macro", "Hidden Macro\Hidden Macro.vcxproj", "{51649380-242F-42DD-A805-DDA30A92B50E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{51649380-242F-42DD-A805-DDA30A92B50E}.Debug|x64.ActiveCfg = Debug|x64
{51649380-242F-42DD-A805-DDA30A92B50E}.Debug|x64.Build.0 = Debug|x64
{51649380-242F-42DD-A805-DDA30A92B50E}.Debug|x86.ActiveCfg = Debug|Win32
{51649380-242F-42DD-A805-DDA30A92B50E}.Debug|x86.Build.0 = Debug|Win32
{51649380-242F-42DD-A805-DDA30A92B50E}.Release|x64.ActiveCfg = Release|x64
{51649380-242F-42DD-A805-DDA30A92B50E}.Release|x64.Build.0 = Release|x64
{51649380-242F-42DD-A805-DDA30A92B50E}.Release|x86.ActiveCfg = Release|Win32
{51649380-242F-42DD-A805-DDA30A92B50E}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3F7A36A9-1DF2-4AAD-8AFE-8B407FF83D81}
EndGlobalSection
EndGlobal
43 changes: 43 additions & 0 deletions Hidden Macro/Hidden Macro/Globals.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#pragma once
#include <iostream>
#include <Windows.h> // Needed for GetAsyncKeyState(key) in macro.cpp & binds.cpp
#include <thread> // Needed for the threads to run in main.cpp

#include "Vector.h" // Where the Vector2 & Vector3 are defined

// So i dont have to add std:: infront of some functions
using namespace std;

// All settings for the macro
class HM_Settings
{
public:
// Is HM enabled?
bool enabled = false;

// Values passed into the move mouse function
Vector3 movementValues{0,0,13};

// Function keys
Vector2 enableDisableKeys{VK_F1,VK_F2};
Vector2 moveKeys{ VK_LBUTTON,VK_RBUTTON };
Vector2 valueKeys{ VK_UP, VK_DOWN };
Vector2 smoothKeys{ VK_RIGHT,VK_LEFT };

// Keybind to close HM
int killProcKey = VK_F8;
};
inline HM_Settings s;

// Threads that run see main.cpp
namespace threads
{
void macro();
void binds();
}

// Mouse move funtion
namespace mouse
{
void move(Vector3 value);
}
144 changes: 144 additions & 0 deletions Hidden Macro/Hidden Macro/Hidden Macro.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{51649380-242f-42dd-a805-dda30a92b50e}</ProjectGuid>
<RootNamespace>HiddenMacro</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="binds.cpp" />
<ClCompile Include="macro.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="mosue.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Globals.h" />
<ClInclude Include="Vector.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
41 changes: 41 additions & 0 deletions Hidden Macro/Hidden Macro/Hidden Macro.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Functions">
<UniqueIdentifier>{f6d38c14-b629-4a07-bc5b-5b9a430baabb}</UniqueIdentifier>
</Filter>
<Filter Include="HM Threads">
<UniqueIdentifier>{4cc55604-7b45-437b-99e0-ae703581ecd9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mosue.cpp">
<Filter>Functions</Filter>
</ClCompile>
<ClCompile Include="binds.cpp">
<Filter>HM Threads</Filter>
</ClCompile>
<ClCompile Include="macro.cpp">
<Filter>HM Threads</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Globals.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Vector.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions Hidden Macro/Hidden Macro/Hidden Macro.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
13 changes: 13 additions & 0 deletions Hidden Macro/Hidden Macro/Vector.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

// Used for storing keybinds
struct Vector2
{
int x, y;
};

// Used for passing the values to mouse::move() function
struct Vector3
{
int x, y, s;
};
25 changes: 25 additions & 0 deletions Hidden Macro/Hidden Macro/binds.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "Globals.h"

void threads::binds()
{
while (1)
{
// Enable & Disable HM keybinds
if (GetAsyncKeyState(s.enableDisableKeys.x) & 1 && !s.enabled) s.enabled = true;
if (GetAsyncKeyState(s.enableDisableKeys.y) & 1 && s.enabled) s.enabled = false;

// Change Value For Movement
if (GetAsyncKeyState(s.valueKeys.x) & 1 && s.movementValues.y != 50) s.movementValues.y++;
if (GetAsyncKeyState(s.valueKeys.y) & 1 && s.movementValues.y != 0) s.movementValues.y--;

// Change sleep value lower = smoother
if (GetAsyncKeyState(s.smoothKeys.x) & 1 && s.movementValues.s != 100) s.movementValues.s++;
if (GetAsyncKeyState(s.smoothKeys.y) & 1 && s.movementValues.s != 1) s.movementValues.s--;

// Close HM keybind
if (GetAsyncKeyState(s.killProcKey)) { MessageBox(0, "Threads Killed.\nPress Ok To Close Macro.", "Closing Hidden Macro", MB_OK); exit(0); }

// Delay for preformace reasons
Sleep(1);
}
}
14 changes: 14 additions & 0 deletions Hidden Macro/Hidden Macro/macro.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "Globals.h"

void threads::macro()
{
while (1)
{
while (GetAsyncKeyState(s.moveKeys.x) && GetAsyncKeyState(s.moveKeys.y) && s.enabled)
{
mouse::move(s.movementValues);
}

Sleep(1);
}
}
22 changes: 22 additions & 0 deletions Hidden Macro/Hidden Macro/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "Globals.h"

int main()
{
// Threads that make the macro & keybinds work
thread(threads::macro).detach();
thread(threads::binds).detach();

// Hides the console window
HWND Stealth;
AllocConsole();
Stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(Stealth, 0);

// Begining message box for showing keybinds
MessageBox(0, "Macro Threads Started.\nClick Ok To Hide Message Box.\n\nKeybinds:\n F1: Enable\n F2: Disable\n F8: Kill Process\n Up Arrow: More Control\n Down Arrow: Less Control\n Right Arrow: Less Smoothing\n Left Arrow: More Smoothing", "Hidden Macro Binds", MB_OK);

while (1)
{
// This is only here to keep the program running all the features are running in threads
}
}
7 changes: 7 additions & 0 deletions Hidden Macro/Hidden Macro/mouse.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "Globals.h"

void mouse::move(Vector3 value)
{
mouse_event(0x0001, value.x, value.y, 0, 0);
Sleep(value.s);
}

0 comments on commit 11ad7eb

Please sign in to comment.