Skip to content

Commit

Permalink
switch to command line argument startup
Browse files Browse the repository at this point in the history
  • Loading branch information
h-flash committed Jan 29, 2021
1 parent 5af3ffd commit 4722178
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,26 +149,7 @@ private string Base64Decode(string s)

private void Open(string url)
{
//Process p = Process.GetProcessesByName("flashplayer").FirstOrDefault();
//if (p == null)
//{
var p = Process.Start(System.IO.Path.Combine(Application.StartupPath, "flashplayer.exe"));
p.WaitForInputIdle();
//}
IntPtr h = p.MainWindowHandle;
SendKeys.SendWait("^(o)");
var o = Clipboard.GetText();
Clipboard.SetText(url);
SendKeys.SendWait("^(v)");
SendKeys.SendWait("{enter}");
if (!String.IsNullOrEmpty(o))
{
Clipboard.SetText(o);
}
else {
Clipboard.Clear();
}

Process.Start(System.IO.Path.Combine(Application.StartupPath, $"flashplayer.exe"), url);
}

}
Expand Down

0 comments on commit 4722178

Please sign in to comment.