Is there any way of using SendKeys with Bridge, everything works fine with Photoshop but not Bridge.
I have been trying C#
Code: Select allusing System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace SendKeysTest
{
public class Driver
{
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("User32")]
public static extern int SetForegroundWindow(IntPtr hwnd);
public static void Main(string[] args)
{
IntPtr iHandle = FindWindow("Bridge", null);
SetForegroundWindow(iHandle);
SendKeys.SendWait("^q");
}
}
}
SendKeys
SendKeys
Got it sorted...
Code: Select allusing System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace SendKeysTest
{
public class Driver
{
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("User32")]
public static extern int SetForegroundWindow(IntPtr hwnd);
public static void Main(string[] args)
{
System.Diagnostics.Process[] p = System.Diagnostics.Process.GetProcessesByName("bridge");
if (p.Length > 0)
{
SetForegroundWindow(p[0].MainWindowHandle);
}
SendKeys.SendWait("^q");
}
}
}
Code: Select allusing System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace SendKeysTest
{
public class Driver
{
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("User32")]
public static extern int SetForegroundWindow(IntPtr hwnd);
public static void Main(string[] args)
{
System.Diagnostics.Process[] p = System.Diagnostics.Process.GetProcessesByName("bridge");
if (p.Length > 0)
{
SetForegroundWindow(p[0].MainWindowHandle);
}
SendKeys.SendWait("^q");
}
}
}