Update 1.3.7.0
Add macro text box, allow minimizing
This commit is contained in:
29
TypeClipboard/Form1.Designer.cs
generated
29
TypeClipboard/Form1.Designer.cs
generated
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,5 +121,10 @@ namespace TypeClipboard
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
_tc.Type(textBox2.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -9,7 +9,7 @@
|
||||
<Identity
|
||||
Name="3373JedLaundry.TypeClipboard"
|
||||
Publisher="CN=CE320BA0-58BC-4F47-AF5B-94DB661147CC"
|
||||
Version="1.3.5.0" />
|
||||
Version="1.3.7.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>TypeClipboard</DisplayName>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
|
||||
<AppInstallerUri>C:\temp</AppInstallerUri>
|
||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||
<PackageCertificateThumbprint>F1AC865F3B57360B33C17D9B7ECE4A4BFD2EC9CC</PackageCertificateThumbprint>
|
||||
<PackageCertificateThumbprint>DFF25B896771BFB75D948AD107C34534A21A08B1</PackageCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
@@ -109,7 +109,6 @@
|
||||
<Content Include="Images\StoreLogo.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-200.png" />
|
||||
<None Include="Package.StoreAssociation.xml" />
|
||||
<None Include="TypeClipboardAppx_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TypeClipboard\TypeClipboard.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user