So, basically what I'm trying to do is simulate a left mouse button click, a short delay (300ms or so) and then a keyboard button press input (in this case 1)
I've tried a whole whack of different variations on this I can can't seem to get any to work, any help would be awesome - thank you.
Variations I tried were, there were a bunch of others too just to give you an idea.
#IfWinActive, ESO
1::
BlockInput On
SendInput {Click}{1}
BlockInput Off
Return
#IfWinActive, ESO
1::
BlockInput On
Click
Delay 300
SendInput {1}
BlockInput Off
Return
#IfWinActive, ESO
1::
BlockInput On
sendinput {LButton down}
KeyWait, LButton
sendinput {LButton up}
Sleep 300
SendInput {1}
BlockInput Off
Return
New, can't seem to get this simple script to work.
Re: New, can't seem to get this simple script to work.
Remove the braces around the 1.
Re: New, can't seem to get this simple script to work.
That doesn't seem to work either.
The problem is I only seem to be able to either get the mouse click OR the button press to work, I can't seem to get them to both happen one after the other.
The problem is I only seem to be able to either get the mouse click OR the button press to work, I can't seem to get them to both happen one after the other.
Re: New, can't seem to get this simple script to work.
Code: Select all
!1::
SendInput {LButton}
Sleep 300
SendInput {1}
Return
Re: New, can't seem to get this simple script to work.
Ya, I can't use the alt key because it activates something else (just the way the game is designed)
And just taking out the alt key indicator (!) and just using 1 has the same problem I was having before, where the mouse click will go off but the button press doesn't happen.
And just taking out the alt key indicator (!) and just using 1 has the same problem I was having before, where the mouse click will go off but the button press doesn't happen.
Re: New, can't seem to get this simple script to work.
The issue when you were using just 1 as the hotkey may be fixed by changing your hotkey definition to $1:: to keep the hotkey routine from calling itself.
-
- Posts: 319
- Joined: 23 Jan 2016, 23:03
Re: New, can't seem to get this simple script to work.
Boiler is right. Currently the line sendinput {1} is going to trigger the hotkey itself. This should do the trick:boiler wrote:The issue when you were using just 1 as the hotkey may be fixed by changing your hotkey definition to $1:: to keep the hotkey routine from calling itself.
Code: Select all
$1::
BlockInput On
sendinput {LButton}
Sleep 300
SendInput {1}
BlockInput Off
Return
Re: New, can't seem to get this simple script to work.
Thanks guys, putting the $ in front of the 1 made it work out beautifully - appreciate the help, you rock.
Who is online
Users browsing this forum: downstairs, Google [Bot], OrangeCat and 180 guests