Sign in to follow this  
Followers 0
tchld

Having trouble sending simple keystroke

4 posts in this topic

I'm making a small script to switch to my game window and hit the space bar. When i run the script it switches but the space key is not entered. Am i doing something wrong?

WinActivate("Untitled", "");
Sleep(1000)
Send("{SPACE}");

Share this post


Link to post
Share on other sites



I'm making a small script to switch to my game window and hit the space bar. When i run the script it switches but the space key is not entered. Am i doing something wrong?

WinActivate("Untitled", "");
Sleep(1000)
Send("{SPACE}");
What is with this char ; after first and last line from your code?

When the words fail... music speaks

Share this post


Link to post
Share on other sites

i thought it was part of the syntax, but i guess not. took out the semicolons and the program still doesnt hit space

Share this post


Link to post
Share on other sites

i thought it was part of the syntax, but i guess not. took out the semicolons and the program still doesnt hit space

AutoItSetOption("WinTitleMatchMode",2)
Run("notepad.exe")
WinWait("Notepad")
WinActivate("Notepad")
Send("{SPACE}")

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0