peni4142 Posted August 7, 2019 Posted August 7, 2019 Hey Guys, I am looking for a solution to let a key conditional send itself. Is there a smarter solution? My solution is that far: HotKeySet("r","r") Func r() If _IsPressed(14) Then ;~ Do some fancy stuff Else SendOriginal("r") EndIf EndFunc Func SendOriginal($key) HotKeySet($key) Send($key) HotKeySet($key,$key) EndFunc
Developers Jos Posted August 7, 2019 Developers Posted August 7, 2019 Define smarter please? ... and also please do not post images of sourcecode but post the actual source it in a codeblock <>. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
peni4142 Posted August 7, 2019 Author Posted August 7, 2019 That is not an image... for ahk there is a other solution normal you define a key in ahk like this: h:: ;do stuff Return to solve my problem I could define the key like that: $h:: Send("h") the $ sign is preventing here an in infinite loop. Is there something like that in autoit?
peni4142 Posted August 7, 2019 Author Posted August 7, 2019 Or in this case: $h:: Send("a") Return $a:: Send("hello") Return the $ take care that I will send "a" and not hello
Developers Jos Posted August 7, 2019 Developers Posted August 7, 2019 2 minutes ago, peni4142 said: That is not an image... mmm.. you're right ...but still prefer the regular codebox. 2 minutes ago, peni4142 said: for ahk there is a other solution Not really interested in that ...sorry. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
peni4142 Posted August 7, 2019 Author Posted August 7, 2019 yeah I want to use autoit, but I have the problem, that I want to change only user-input. I don't want to change the result of autoit-output.
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