Skip to content

Commit

Permalink
Added img for omnisphere
Browse files Browse the repository at this point in the history
  • Loading branch information
Viruzober committed Jul 16, 2020
1 parent 3f60380 commit dbe73bc
Show file tree
Hide file tree
Showing 13 changed files with 624 additions and 18 deletions.
Binary file added Images/NotPaint.bmp
Binary file not shown.
Binary file added Images/Omnisphere/BP.bmp
Binary file not shown.
12 changes: 12 additions & 0 deletions MagicKeys.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Update="Plugins\Omnisphere\OmnisphereSearchActions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Plugins\Omnisphere\OmnisphereSearchForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Plugins\Omnisphere\OmnisphereWNDProc.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>

<Choose>
<When Condition=" '$(Platform)'=='x86' ">
<ItemGroup>
Expand Down
21 changes: 3 additions & 18 deletions Plugins/Omnisphere/Omnisphere.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
using System;
using System;
using static MagicKeys.MagicKeys;

namespace MagicKeys
{
public static partial class Omnisphere
{

public static void CopySerial()
public static void Search()
{
int[] CS = ImgSearch(@"Images\Omnisphere\CopySerial.bmp", true);
MouseClick("Left", CS[1], CS[2], 1, 0, 0, 10);
Speak("copied "+GetText());
}

public static void PasteCode()
{
int[] PC = ImgSearch(@"Images\Omnisphere\PasteCode.bmp", true);
MouseClick("Left", PC[1], PC[2], 1, 0, 0, 10);
Speak("Pasted "+GetText());
}

public static void ActiveCode()
{
int[] AC = ImgSearch(@"Images\Omnisphere\ActiveCode.bmp", true);
MouseClick("Left", AC[1], AC[2], 1, 0, 0, 10);
MouseClick("Left", P[1]+30, P[2]+70, 1, 0, 0, 10);
}

}
Expand Down
102 changes: 102 additions & 0 deletions Plugins/Omnisphere/OmnisphereBank.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
using System;
using System.Threading;
using System.Windows.Forms;
using static MagicKeys.MagicKeys;

namespace MagicKeys
{
public partial class Omnisphere
{

public static void OmnisphereBank(string To)
{
if (To == "Back")
{
int[] NXUP = ImgSearchArea(@"Images\Omnisphere\OmnisphereUp.bmp", P[1]+330, P[2]+70, P[1]+350, P[2]+130, 40);
if (NXUP[0] == 1)
{
OmnisphereBankPage("Back");
return;
}
else if (NXUP[0] == 0)
{
int[] NXBP = ImgSearchArea(@"Images\Omnisphere\OmnisphereBP.bmp", P[1]+260, P[2]+90, P[1]+280, P[2]+270, 20);
if (NXBP[0] == 1)
{
MouseClick("Left", NXBP[1]+15, NXBP[2]-5, 1, 0, 0, 10);
MouseClick("Right", NXBP[1]+15, NXBP[2]-5, 1, 0, 0, 10);
Thread.Sleep(200);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15,MRect[1]+15, 1, 0, 0, 50);
Thread.Sleep(100);
string Bank = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+450, P[2]+105, 2, 0, 0, 50);
Speak(Bank);
}
}
}
else if (To == "Next")
{
int[] NXDW = ImgSearchArea(@"Images\Omnisphere\OmnisphereDown.bmp", P[1]+300, P[2]+220, P[1]+330, P[2]+250, 40);
if (NXDW[0] == 1)
{
OmnisphereBankPage("Next");
return;
}
else if (NXDW[0] == 0)
{
int[] NXBP = ImgSearchArea(@"Images\Omnisphere\OmnisphereBP.bmp", P[1]+260, P[2]+90, P[1]+280, P[2]+270, 20);
if (NXBP[0] == 1)
{
int[] NXEND = ImgSearchArea(@"Images\Omnisphere\OmnisphereEnd.bmp", NXBP[5], NXBP[6], NXBP[5]+15, NXBP[6]+20, 20);
if (NXEND[0] == 1)
{
SoundPlay("End.ogg", 0);
}
else if (NXEND[0] == 0)
{
MouseClick("Left", NXBP[1]+15, NXBP[2]+15, 1, 0, 0, 50);
MouseClick("Right", NXBP[1]+15, NXBP[2]+15, 1, 0, 0, 50);
Thread.Sleep(200);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15, MRect[1]+15, 1, 0, 0, 50);
Thread.Sleep(100);
string Bank = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+450, P[2]+105, 2, 0, 0, 50);
Speak(Bank);
}
}
}
}
}

public static void OmnisphereSearch()
{
OmnisphereSearchForm F = new OmnisphereSearchForm();
F.ShowDialog();
if (F.DialogResult == DialogResult.OK)
{
MouseClick("Right", P[1]+330, P[2]+230, 1, 0, 0, 10);
Thread.Sleep(200);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 7);
MouseClick("Left", MRect[0]+15,MRect[1]+15, 1, 0, 0, 50);
Thread.Sleep(100);
ControlSetText(API.GetWTitle(), API.GetWClass(), "Edit", F.GetString());
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+450, P[2]+105, 2, 0, 0, 10);
}
}

}
}
51 changes: 51 additions & 0 deletions Plugins/Omnisphere/OmnisphereBankPage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System;
using System.Threading;
using System.Windows.Forms;
using static MagicKeys.MagicKeys;

namespace MagicKeys
{
public partial class Omnisphere
{

public static void OmnisphereBankPage(string To)
{
if (To == "Back")
{
int[] FH = ImgSearchArea(@"Images\Omnisphere\FullHome.bmp", P[1]+350, P[2]+50, P[1]+460, P[2]+160, 20);
if (FH[0] == 1)
{
SoundPlay("End.ogg", 0);
return;
}
SoundPlay("Scrol.ogg", 0);
MouseClick("Left", P[1]+400, P[2]+105, 1, 0, 0, 10);
MouseClick("Right", P[1]+330, P[2]+230, 1, 0, 0, 10);
}
else if (To == "Next")
{
int[] FH = ImgSearchArea(@"Images\Omnisphere\FullEnd.bmp", P[1]+350, P[2]+200, P[1]+460, P[2]+260, 20);
if (FH[0] == 1)
{
SoundPlay("End.ogg", 0);
return;
}
SoundPlay("Scrol.ogg", 0);
MouseClick("Left", P[1]+400, P[2]+220, 1, 0, 0, 10);
MouseClick("Right", P[1]+330, P[2]+105, 1, 0, 0, 10);
}
Thread.Sleep(200);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15,MRect[1]+15, 1, 0, 0, 10);
Thread.Sleep(100);
string Bank = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+450, P[2]+105, 2, 0, 0, 10);
Speak(Bank);
}

}
}
16 changes: 16 additions & 0 deletions Plugins/Omnisphere/OmnisphereLoader.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Threading;
using static MagicKeys.MagicKeys;

namespace MagicKeys
Expand All @@ -8,6 +9,21 @@ public static partial class Omnisphere

public static void PluginLoad()
{
while(
ImgSearch(@"Images\Omnisphere\Splash.bmp", true)[0] == 0 &
ImgSearch(@"Images\Omnisphere\Reg.bmp", true)[0] == 0 &
ImgSearch(@"Images\Omnisphere\Logo.bmp", true)[0] == 0)
{
if (WinActive(API.GetWTitle(), API.GetWClass()) == false)
{
return;
}
}
if (ImgSearch(@"Images\Omnisphere\Splash.bmp", true)[0] == 1)
{
MouseClick("Left", P[1]+100, P[2]+10, 1, 0, 0, 10);
Thread.Sleep(500);
}
if (ImgSearch(@"Images\Omnisphere\Reg.bmp", true)[0] == 1)
{
VUIObjectSwitcher(true, "false", 1, 1);
Expand Down
82 changes: 82 additions & 0 deletions Plugins/Omnisphere/OmnispherePatch.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System;
using System.Threading;
using System.Windows.Forms;
using static MagicKeys.MagicKeys;

namespace MagicKeys
{
public partial class Omnisphere
{

public static void OmnispherePatch(string To)
{
if (To == "Back")
{
int[] NXUP = ImgSearchArea(@"Images\Omnisphere\OmnisphereUp.bmp", P[1]+450, P[2]+70, P[1]+480, P[2]+150, 40);
if (NXUP[0] == 1)
{
OmnispherePatchPage("Back");
return;
}
else if (NXUP[0] == 0)
{
int[] NXBP = ImgSearchArea(@"Images\Omnisphere\OmnisphereBP.bmp", P[1]+400, P[2]+90, P[1]+430, P[2]+270, 40);
if (NXBP[0] == 1)
{
MouseClick("Right", NXBP[1]+15, NXBP[2]-5, 1, 0, 0, 10);
Thread.Sleep(100);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15,MRect[1]+15, 1, 0, 0, 10);
Thread.Sleep(100);
string Patch = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+50, P[2]+50, 1, 0, 0, 10);
MouseClick("Left", NXBP[1]+15, NXBP[2]-5, 2, 0, 0, 10);
Speak(Patch);
}
}
}
else if (To == "Next")
{
int[] NXDW = ImgSearchArea(@"Images\Omnisphere\OmnisphereDown.bmp", P[1]+530, P[2]+220, P[1]+570, P[2]+260, 40);
if (NXDW[0] == 1)
{
OmnispherePatchPage("Next");
return;
}
else if (NXDW[0] == 0)
{
int[] NXBP = ImgSearchArea(@"Images\Omnisphere\OmnisphereBP.bmp", P[1]+400, P[2]+90, P[1]+430, P[2]+270, 40);
if (NXBP[0] == 1)
{
int[] NXEND = ImgSearchArea(@"Images\Omnisphere\OmnisphereEnd.bmp", NXBP[5], NXBP[6], NXBP[5]+15, NXBP[6]+25, 20);
if (NXEND[0] == 1)
{
SoundPlay("End.ogg", 0);
}
else if (NXEND[0] == 0)
{
MouseClick("Right", NXBP[1]+15, NXBP[2]+15, 1, 0, 0, 10);
Thread.Sleep(100);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15, MRect[1]+15, 1, 0, 0, 10);
Thread.Sleep(100);
string Patch = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+50, P[2]+50, 1, 0, 0, 10);
MouseClick("Left", NXBP[1]+15, NXBP[2]+15, 2, 0, 0, 10);
Speak(Patch);
}
}
}
}
}

}
}
62 changes: 62 additions & 0 deletions Plugins/Omnisphere/OmnispherePatchPage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;
using System.Threading;
using System.Windows.Forms;
using static MagicKeys.MagicKeys;

namespace MagicKeys
{
public partial class Omnisphere
{

public static void OmnispherePatchPage(string To)
{
if (To == "Back")
{
int[] FH = ImgSearchArea(@"Images\Omnisphere\FullHome.bmp", P[1]+540, P[2]+50, P[1]+590, P[2]+160, 20);
if (FH[0] == 1)
{
SoundPlay("End.ogg", 0);
return;
}
SoundPlay("Scrol.ogg", 0);
MouseClick("Left", P[1]+575, P[2]+120, 1, 0, 0, 10);
MouseClick("Right", P[1]+450, P[2]+230, 1, 0, 0, 10);
Thread.Sleep(100);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15,MRect[1]+15, 1, 0, 0, 10);
Thread.Sleep(100);
string Patch = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+450, P[2]+230, 2, 0, 0, 10);
Speak(Patch);
}
else if (To == "Next")
{
int[] FH = ImgSearchArea(@"Images\Omnisphere\FullEnd.bmp", P[1]+540, P[2]+180, P[1]+590, P[2]+280, 20);
if (FH[0] == 1)
{
SoundPlay("End.ogg", 0);
return;
}
SoundPlay("Scrol.ogg", 0);
MouseClick("Left", P[1]+575, P[2]+220, 1, 0, 0, 10);
MouseClick("Right", P[1]+450, P[2]+105, 1, 0, 0, 10);
Thread.Sleep(100);
IntPtr HWND = WinExistsHandle("", "#32768");
IntPtr HMenu = SendMessage(HWND, 0x01E1, 0, IntPtr.Zero);
int[] MRect = GetMIRect(HWND, HMenu, 1);
MouseClick("Left", MRect[0]+15,MRect[1]+15, 1, 0, 0, 10);
Thread.Sleep(100);
string Patch = ControlGetText(API.GetWTitle(), API.GetWClass(), "Edit");
Keyboard.KeyDown(Keys.Enter);
Keyboard.KeyUp(Keys.Enter);
MouseClick("Left", P[1]+450, P[2]+105, 2, 0, 0, 10);
Speak(Patch);
}
}

}
}
Loading

0 comments on commit dbe73bc

Please sign in to comment.