tk5801 Posted October 29, 2017 Share Posted October 29, 2017 Hello, I was wondering how to use a key to send another key (or more than one key) While 1 send("f") sleep(300) send("g") sleep(300) wend The problem with this is I don't know how to add in a command that uses one key to activate this macro, thank you. Link to comment Share on other sites More sharing options...
gruntydatsun Posted October 29, 2017 Share Posted October 29, 2017 look up hotkeyset Link to comment Share on other sites More sharing options...
badcoder123 Posted October 30, 2017 Share Posted October 30, 2017 You can send more than one key at once ex: Send("ExampleUser{TAB}ExamplePass{Enter}") Link to comment Share on other sites More sharing options...
gruntydatsun Posted October 30, 2017 Share Posted October 30, 2017 Run that in notepad and see what happens. Link to comment Share on other sites More sharing options...
tk5801 Posted October 30, 2017 Author Share Posted October 30, 2017 (edited) This is the macro I was using before HotKeySet("f", "send_keys")HotKeySet("{ESC}", "exit_script")While 1 Sleep(50)WEndFunc send_keys() Send("G") Sleep(735) Send("H")EndFuncFunc exit_script() ExitEndFunc I just cant get it to work all of the time, so I was wondering if there is a different way to write that. F would send G (and then wait .735 seconds) and then send H. I could keep having those 2 keys be pressed over and over by pressing "F" again. Edited October 30, 2017 by tk5801 Link to comment Share on other sites More sharing options...
gruntydatsun Posted October 30, 2017 Share Posted October 30, 2017 Use Opt("SendKeyDelay") to set whatever sleep time you want between keystrokes, in milliseconds. Then just use Send("GH") to do it repeatedly put it in a loop. In Scite press F1. Everything you need to know to do pretty much anything is in there. Link to comment Share on other sites More sharing options...
badcoder123 Posted October 30, 2017 Share Posted October 30, 2017 Are you looking for a script to send GH on a toggle key? HotKeySet("{F1}", "_Terminate") HotKeySet("{F2}", "togglePause") Global $Paused While 1 Sleep(500) Send("GH") WEnd Func _Terminate() Exit EndFunc Func togglePause($Paused) $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is paused. Press "F2" to resume.',1700,300) WEnd ToolTip("") EndFunc When you press F2 it does nothing then you click it again and it sends G and H until you press it? 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