diff --git a/TypeClipboard/Form1.Designer.cs b/TypeClipboard/Form1.Designer.cs
index f0ebc79..6b4b924 100644
--- a/TypeClipboard/Form1.Designer.cs
+++ b/TypeClipboard/Form1.Designer.cs
@@ -31,6 +31,8 @@
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.chkHotkey = new System.Windows.Forms.CheckBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
@@ -63,19 +65,38 @@
this.chkHotkey.UseVisualStyleBackColor = true;
this.chkHotkey.CheckedChanged += new System.EventHandler(this.chkHotkey_CheckedChanged);
//
+ // textBox2
+ //
+ this.textBox2.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.textBox2.Location = new System.Drawing.Point(12, 64);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(201, 22);
+ this.textBox2.TabIndex = 3;
+ this.textBox2.Text = "(non-clipboard macro)";
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(219, 64);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(103, 22);
+ this.button2.TabIndex = 4;
+ this.button2.Text = "Type (2s delay)";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.ClientSize = new System.Drawing.Size(334, 66);
+ this.ClientSize = new System.Drawing.Size(334, 99);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.textBox2);
this.Controls.Add(this.chkHotkey);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
- this.MinimizeBox = false;
this.Name = "Form1";
this.ShowIcon = false;
- this.ShowInTaskbar = false;
this.Text = "Type Clipboard";
this.TopMost = true;
this.Activated += new System.EventHandler(this.Form1_Activated);
@@ -93,6 +114,8 @@
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox chkHotkey;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.Button button2;
}
}
diff --git a/TypeClipboard/Form1.cs b/TypeClipboard/Form1.cs
index 0c6328a..74e4fcc 100644
--- a/TypeClipboard/Form1.cs
+++ b/TypeClipboard/Form1.cs
@@ -121,5 +121,10 @@ namespace TypeClipboard
Properties.Settings.Default.Save();
}
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ _tc.Type(textBox2.Text);
+ }
}
}
diff --git a/TypeClipboard/Properties/AssemblyInfo.cs b/TypeClipboard/Properties/AssemblyInfo.cs
index 5af9ce5..dcaad5a 100644
--- a/TypeClipboard/Properties/AssemblyInfo.cs
+++ b/TypeClipboard/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Jed Laundry")]
[assembly: AssemblyProduct("Type Clipboard")]
-[assembly: AssemblyCopyright("Copyright © Jed Laundry, 2020")]
+[assembly: AssemblyCopyright("Copyright © Jed Laundry, 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.6.0")]
-[assembly: AssemblyFileVersion("1.3.6.0")]
+[assembly: AssemblyVersion("1.3.7.0")]
+[assembly: AssemblyFileVersion("1.3.7.0")]
diff --git a/TypeClipboard/Typer.cs b/TypeClipboard/Typer.cs
index 43038a8..c77ec0e 100644
--- a/TypeClipboard/Typer.cs
+++ b/TypeClipboard/Typer.cs
@@ -12,52 +12,57 @@ namespace TypeClipboard
{
private const int INTERKEY_DELAY = 20;
+ public void Type(String str, int delay = 2000)
+ {
+ Thread.Sleep(delay);
+ foreach (Char c in str.ToCharArray())
+ {
+ // Some characters have special meaning
+ // https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/sendkeys-statement
+ switch (c)
+ {
+ case '\n':
+ return;
+ case '\r':
+ return;
+ case '{':
+ SendKeys.Send("{{}");
+ break;
+ case '}':
+ SendKeys.Send("{}}");
+ break;
+ case '+':
+ SendKeys.Send("{+}");
+ break;
+ case '^':
+ SendKeys.Send("{^}");
+ break;
+ case '%':
+ SendKeys.Send("{%}");
+ break;
+ case '~':
+ SendKeys.Send("{~}");
+ break;
+ case '(':
+ SendKeys.Send("{(}");
+ break;
+ case ')':
+ SendKeys.Send("{)}");
+ break;
+ default:
+ SendKeys.Send(c.ToString());
+ break;
+ }
+ Thread.Sleep(INTERKEY_DELAY);
+ }
+ }
+
public void TypeClipboard(int delay = 2000)
{
if (Clipboard.ContainsText(TextDataFormat.UnicodeText))
{
String clipboard = Clipboard.GetText(TextDataFormat.UnicodeText);
- Thread.Sleep(delay);
- foreach (Char c in clipboard.ToCharArray())
- {
- // Some characters have special meaning
- // https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/sendkeys-statement
- switch (c)
- {
- case '\n':
- return;
- case '\r':
- return;
- case '{':
- SendKeys.Send("{{}");
- break;
- case '}':
- SendKeys.Send("{}}");
- break;
- case '+':
- SendKeys.Send("{+}");
- break;
- case '^':
- SendKeys.Send("{^}");
- break;
- case '%':
- SendKeys.Send("{%}");
- break;
- case '~':
- SendKeys.Send("{~}");
- break;
- case '(':
- SendKeys.Send("{(}");
- break;
- case ')':
- SendKeys.Send("{)}");
- break;
- default:
- SendKeys.Send(c.ToString());
- break;
- }
- Thread.Sleep(INTERKEY_DELAY);
- }
+ this.Type(clipboard, delay);
}
}
}
diff --git a/TypeClipboard/typeclipboard.ico b/TypeClipboard/typeclipboard.ico
index 582c200..77ab272 100644
Binary files a/TypeClipboard/typeclipboard.ico and b/TypeClipboard/typeclipboard.ico differ
diff --git a/TypeClipboardAppx/Package.appxmanifest b/TypeClipboardAppx/Package.appxmanifest
index 4a65c61..20d682d 100644
--- a/TypeClipboardAppx/Package.appxmanifest
+++ b/TypeClipboardAppx/Package.appxmanifest
@@ -9,7 +9,7 @@
+ Version="1.3.7.0" />
TypeClipboard
diff --git a/TypeClipboardAppx/TypeClipboardAppx.wapproj b/TypeClipboardAppx/TypeClipboardAppx.wapproj
index f27a557..7081107 100644
--- a/TypeClipboardAppx/TypeClipboardAppx.wapproj
+++ b/TypeClipboardAppx/TypeClipboardAppx.wapproj
@@ -63,7 +63,7 @@
neutral
C:\temp
0
- F1AC865F3B57360B33C17D9B7ECE4A4BFD2EC9CC
+ DFF25B896771BFB75D948AD107C34534A21A08B1
Always
@@ -109,7 +109,6 @@
-