Tyranlol 0 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] Share this post Link to post Share on other sites
omikron48 0 Posted July 20, 2010 You're doing it wrong... ControlSend("WindowTitle", '', '', "{" & $Text & " Down}") Share this post Link to post Share on other sites
Tyranlol 0 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] Share this post Link to post Share on other sites