Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# press key

SendKeys.Send("{keyname}");
Comment

c# press key


static class Program
{
    [DllImport("user32.dll")]
    public static extern int SetForegroundWindow(IntPtr hWnd);

    [STAThread]
    static void Main()
    {
        while(true)
        {
            Process [] processes = Process.GetProcessesByName("iexplore");

            foreach(Process proc in processes)
            {
                SetForegroundWindow(proc.MainWindowHandle);
                SendKeys.SendWait("{F5}");
            }

            Thread.Sleep(5000);
        }
    }
}

Comment

PREVIOUS NEXT
Code Example
Csharp :: how to instantiate as child unity 
Csharp :: c# unity camera follow player horizontal axis 
Csharp :: c# string to datetime 
Csharp :: unity empty action 
Csharp :: c# get project directory 
Csharp :: c# require administrator permissions 
Csharp :: if get key down unity 
Csharp :: C# console app how to run another program 
Csharp :: wpf label text color rgb string 
Csharp :: Unity Rotate around the real center 
Csharp :: set active text unity 
Csharp :: remove all text after string c# 
Csharp :: unity list of gameobjects 
Csharp :: unity change tag of go 
Csharp :: how to usefor loop in c# 
Csharp :: countdown timer c# unity 
Csharp :: wpf rounded image 
Csharp :: turtle graphics face in direction 
Csharp :: unity agent walks in place at start 
Csharp :: oncollisionenter 
Csharp :: aabb collision with direction 
Csharp :: c# close 1 form open another form 
Csharp :: convert object to xml c# example code 
Csharp :: unity set sprite transparency 
Csharp :: how is c# pronounced 
Csharp :: newtonsoft json conditionally ignore property 
Csharp :: unity destroy all children 
Csharp :: c# read from file 
Csharp :: csharp check if env is development 
Csharp :: bootstrap distane between col 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =