-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0fb69ae
Showing
53 changed files
with
4,579 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# ========================= | ||
# Project Files | ||
# ========================= | ||
|
||
# User files | ||
*.suo | ||
|
||
# Objects | ||
/EasyMacros/obj/* | ||
|
||
# Binary | ||
/EasyMacros/bin/* | ||
|
||
# ========================= | ||
# Operating System Files | ||
# ========================= | ||
|
||
# Windows | ||
# ========================= | ||
|
||
# Image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# OSX | ||
# ========================= | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear on external disk | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyMacros", "EasyMacros\EasyMacros.csproj", "{0F9A072B-F5C7-41E4-B200-B3B56806060F}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x86 = Debug|x86 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{0F9A072B-F5C7-41E4-B200-B3B56806060F}.Debug|x86.ActiveCfg = Release|x86 | ||
{0F9A072B-F5C7-41E4-B200-B3B56806060F}.Debug|x86.Build.0 = Release|x86 | ||
{0F9A072B-F5C7-41E4-B200-B3B56806060F}.Release|x86.ActiveCfg = Release|x86 | ||
{0F9A072B-F5C7-41E4-B200-B3B56806060F}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using EasyMacros.Macros; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionClose : MacroAction | ||
{ | ||
public string toclose; | ||
public ActionClose(string windowtoclose) | ||
{ | ||
toclose = windowtoclose; | ||
} | ||
public override void Do() | ||
{ | ||
Process[] procs = Process.GetProcesses(); | ||
for (int i = 0; i < procs.Length; i++) | ||
{ | ||
if (procs[i].ProcessName.ToLower() + ".exe" == toclose.ToLower()) | ||
{ | ||
procs[i].CloseMainWindow(); | ||
} | ||
else if (procs[i].ProcessName.ToLower().Contains(toclose.ToLower())) | ||
{ | ||
procs[i].CloseMainWindow(); | ||
} | ||
else if (procs[i].MainWindowHandle != IntPtr.Zero && procs[i].MainWindowTitle.ToLower().Contains(toclose.ToLower())) | ||
{ | ||
procs[i].CloseMainWindow(); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using EasyMacros.Macros; | ||
using EasyMacros.Utilities; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionKeyPress : MacroAction | ||
{ | ||
public byte Key; | ||
|
||
public ActionKeyPress(byte K) | ||
{ | ||
Key = K; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
KeySender.KeyPress(Key); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using EasyMacros.Macros; | ||
using EasyMacros.Utilities; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionKeyRelease : MacroAction | ||
{ | ||
public byte Key; | ||
|
||
public ActionKeyRelease(byte K) | ||
{ | ||
Key = K; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
KeySender.KeyRelease(Key); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using EasyMacros.Macros; | ||
using EasyMacros.Utilities; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionKeyStroke : MacroAction | ||
{ | ||
public byte Key; | ||
|
||
public ActionKeyStroke(byte K) | ||
{ | ||
Key = K; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
KeySender.KeyStroke(Key); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Diagnostics; | ||
using EasyMacros.Macros; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionKill : MacroAction | ||
{ | ||
public string process; | ||
|
||
public ActionKill(string name) | ||
{ | ||
process = name; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
ProcessStartInfo P = new ProcessStartInfo("taskkill", "/f /im " + process); | ||
P.WindowStyle = ProcessWindowStyle.Hidden; | ||
Process.Start(P).WaitForExit(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Drawing; | ||
using EasyMacros.Utilities; | ||
using EasyMacros.Macros; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionMouseClick : MacroAction | ||
{ | ||
public KeySender.MouseButton Button; | ||
public Point ClickPos = Point.Empty; | ||
public bool CustomPos = false; | ||
|
||
public ActionMouseClick(KeySender.MouseButton B, Point Coordinates) | ||
{ | ||
Button = B; | ||
CustomPos = true; | ||
ClickPos = Coordinates; | ||
} | ||
|
||
public ActionMouseClick(KeySender.MouseButton B) | ||
{ | ||
Button = B; | ||
CustomPos = false; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
if (CustomPos) | ||
{ | ||
KeySender.MouseClick(Button, ClickPos); | ||
} | ||
else KeySender.MouseClick(Button); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Drawing; | ||
using EasyMacros.Utilities; | ||
using EasyMacros.Macros; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionMousePress : MacroAction | ||
{ | ||
public KeySender.MouseButton Button; | ||
public Point ClickPos = Point.Empty; | ||
public bool CustomPos = false; | ||
|
||
public ActionMousePress(KeySender.MouseButton B, Point Coordinates) | ||
{ | ||
Button = B; | ||
CustomPos = true; | ||
ClickPos = Coordinates; | ||
} | ||
|
||
public ActionMousePress(KeySender.MouseButton B) | ||
{ | ||
Button = B; | ||
CustomPos = false; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
if (CustomPos) | ||
{ | ||
KeySender.MousePress(Button, ClickPos); | ||
} | ||
else KeySender.MousePress(Button); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Drawing; | ||
using EasyMacros.Utilities; | ||
using EasyMacros.Macros; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionMouseRelease : MacroAction | ||
{ | ||
public KeySender.MouseButton Button; | ||
public Point ClickPos = Point.Empty; | ||
public bool CustomPos = false; | ||
|
||
public ActionMouseRelease(KeySender.MouseButton B, Point Coordinates) | ||
{ | ||
Button = B; | ||
CustomPos = true; | ||
ClickPos = Coordinates; | ||
} | ||
|
||
public ActionMouseRelease(KeySender.MouseButton B) | ||
{ | ||
Button = B; | ||
CustomPos = false; | ||
} | ||
|
||
public override void Do() | ||
{ | ||
if (CustomPos) | ||
{ | ||
KeySender.MouseRelease(Button, ClickPos); | ||
} | ||
else KeySender.MouseRelease(Button); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Windows.Forms; | ||
using EasyMacros.Macros; | ||
using EasyMacros.Utilities; | ||
|
||
namespace EasyMacros.Actions | ||
{ | ||
public class ActionPaste : MacroAction | ||
{ | ||
public string topaste; | ||
public ActionPaste(string textToPaste) | ||
{ | ||
topaste = textToPaste; | ||
} | ||
public override void Do() | ||
{ | ||
string previous_clipboard = Clipboard.GetText(); | ||
Clipboard.SetText(topaste); | ||
System.Threading.Thread.Sleep(50); | ||
KeySender.KeyPress(KeyConverter.Name2Key(KeyConverter.WinFormKey2Name(Keys.LControlKey))); | ||
KeySender.KeyStroke(KeyConverter.Name2Key(KeyConverter.WinFormKey2Name(Keys.V))); | ||
KeySender.KeyRelease(KeyConverter.Name2Key(KeyConverter.WinFormKey2Name(Keys.LControlKey))); | ||
System.Threading.Thread.Sleep(50); | ||
try | ||
{ | ||
Clipboard.SetText(previous_clipboard); | ||
} | ||
catch | ||
{ | ||
try | ||
{ | ||
Clipboard.SetText(""); | ||
} | ||
catch { } | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.