OK..I give up...
I took a perfectly running script and TRIED to change the target program and it keeps saying that it doesn't like the "\" in the adddress...well how do I put in the program address with no "\"s
this is a modified IEPopup script.
It first looks to see if there is an instance already running, otherwise it opens it...
I marked in RED what I think it is objecting to...
#USING System.Diagnostics
#USING System.Runtime.InteropServices
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetForegroundWindow(IntPtr hWnd);
void Main( object param )
{
IntPtr hWnd = FindWindow(null,"Redwall1 (SXVGA) TOSHIBA Network Camera - IK-WB15A. - Windows Internet Explorer");
if( hWnd == IntPtr.Zero )
{
ProcessStartInfo processStartInfo = new ProcessStartInfo();
processStartInfo.FileName = "VideoLAN\VLC\vlc.exe";
processStartInfo.Arguments = param.ToString();
processStartInfo.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start( processStartInfo );
}
else
{
SetForegroundWindow( hWnd );
}
}
I took a perfectly running script and TRIED to change the target program and it keeps saying that it doesn't like the "\" in the adddress...well how do I put in the program address with no "\"s
this is a modified IEPopup script.
It first looks to see if there is an instance already running, otherwise it opens it...
I marked in RED what I think it is objecting to...
#USING System.Diagnostics
#USING System.Runtime.InteropServices
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetForegroundWindow(IntPtr hWnd);
void Main( object param )
{
IntPtr hWnd = FindWindow(null,"Redwall1 (SXVGA) TOSHIBA Network Camera - IK-WB15A. - Windows Internet Explorer");
if( hWnd == IntPtr.Zero )
{
ProcessStartInfo processStartInfo = new ProcessStartInfo();
processStartInfo.FileName = "VideoLAN\VLC\vlc.exe";
processStartInfo.Arguments = param.ToString();
processStartInfo.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start( processStartInfo );
}
else
{
SetForegroundWindow( hWnd );
}
}
Comment