Tyranlol Posted July 20, 2010 Share Posted July 20, 2010 (edited) Hello out there! I'm having some troubles here making a script What this is supposed to do is that it has to find a random number between 1 and 4 and if the number is 3 it'll hold down the key what's inside the variable '$Text' but i can't make it work with a variable $button = random(1,4,1) $Text = "W" If $button = 3 Then ControlSend("WindowTitle", '', '', "{$Text Down}") Endif it works without the variable as shown below but in order to make this script work properly i need ControlSend to work with a variable ControlSend("WindowTitle", '', '', "{W Down}") Any help would be appreciated Edited July 20, 2010 by Tyranlol [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] Link to comment Share on other sites More sharing options...
omikron48 Posted July 20, 2010 Share Posted July 20, 2010 You're doing it wrong... ControlSend("WindowTitle", '', '', "{" & $Text & " Down}") Link to comment Share on other sites More sharing options...
Tyranlol Posted July 20, 2010 Author Share Posted July 20, 2010 You're doing it wrong... ControlSend("WindowTitle", '', '', "{" & $Text & " Down}") Thanks buddy, working perfectly [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now