BlazerV60 Posted January 11, 2016 Posted January 11, 2016 Hi all,I currently have this small script here:$T_INIT = TimerInit() Do Send("{DEL down}") Until TimerDiff($T_INIT) >= 2000 ;2000 miliseconds = 2 seconds, exactly how long it takes to delete one entire row in Microsoft Word Send("{DEL up}")What the above code does is hold down the delete key for 2 seconds.How would I make this script do the exact same thing if I had "DEL" as a variable? For example something like this: (Which by the way doesn't work)$ChosenKey = "DEL" $T_INIT = TimerInit() Do Send("{$ChosenKey& down}") Until TimerDiff($T_INIT) >= 2000 Send("{$ChosenKey& up}")All the parenthesis and "&" symbols and brackets make this difficult.
InunoTaishou Posted January 11, 2016 Posted January 11, 2016 $ChosenKey = "DEL" $T_INIT = TimerInit() Do Send("{" & $ChosenKey & " Down}") Until TimerDiff($T_INIT) >= 2000 Send("{" & $ChosenKey & " Up}") BlazerV60 1
BlazerV60 Posted January 11, 2016 Author Posted January 11, 2016 Thanks InunoTaishou, you solved my problem!
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