such as when i click in the box then it will auto type " fffff " or something like 9999 in the box .
i have read and copy this code but it work sometime
i test in notepad and firefox.
sometime its work like crazy but sometime its do nothing .
https://www.autohotkey.com/board/topic/50345-mouse-button-send-q-and-send-mouse-button-same-time/
when click left mouse then auto typing something in the box
Re: when click left mouse then auto typing something in the box
For a desktop program, you could define a hotkey for ~LButton that checks to see if the current control is an edit control. If it is, then you can issue a Send command.
Re: when click left mouse then auto typing something in the box
thank you so mcuh
Re: when click left mouse then auto typing something in the box
i rewrite macro and i want to do the same thing " click and just type 9999 "
this is it and its new question here
==========================================================
[Mod edit: [code][/code] tags added.]
I do this because i want to stop script for awhile when i dont know how to let it run " only in game "
so what should i write when i need autohotkey for stop but not dead and it can reload
another question
this is information that i have spy with autohotkey
=====================================================
Planet Coaster
ahk_class FrontierDevelopmentsAppWinClass
ahk_exe PlanetCoaster.exe
ahk_pid 1156
=======================================================
i have read some information on the net so i put this line
if WinActive("ahk_class FrontierDevelopmentsAppWinClass")
but the autohotkey run everywhere ...
how to write proper script ?
this is it and its new question here
==========================================================
Code: Select all
lbutton::
click
sendinput {9 down}
sendinput {9 up }
sendinput {9 down}
sendinput {9 up }
sendinput {9 down}
sendinput {9 up }
sendinput {9 down}
sendinput {9 up }
return
;i do what i want to ( click and just tying )
Esc::
ExitApp
;here is the problem
f1::suspend ; i guess this will stop macro for awhile
f10::reload ; so i think this key will let macro run again but it dont do it ( i need to right click and choose " reload this script")
I do this because i want to stop script for awhile when i dont know how to let it run " only in game "
so what should i write when i need autohotkey for stop but not dead and it can reload
another question
this is information that i have spy with autohotkey
=====================================================
Planet Coaster
ahk_class FrontierDevelopmentsAppWinClass
ahk_exe PlanetCoaster.exe
ahk_pid 1156
=======================================================
i have read some information on the net so i put this line
if WinActive("ahk_class FrontierDevelopmentsAppWinClass")
but the autohotkey run everywhere ...
how to write proper script ?
Re: when click left mouse then auto typing something in the box
For your second question, you need to use a directive to make a hotkey conditional, not a regular if statement:
Code: Select all
#If WinActive("ahk_class FrontierDevelopmentsAppWinClass")
Re: when click left mouse then auto typing something in the box
Yes, and that will mostly answer the first question, too, because the hotkey would work only in the context that boiler defined. F1 will suspend the hotkey, which means that pressing the hotkey again will have no effect. Once the SendInput occurs, you would have trouble stopping it with Pause because it is so fast.
Code: Select all
class = FrontierDevelopmentsAppWinClass
F1::Suspend
#If WinActive("ahk_class " class)
~LButton Up::SendInput 9999 ; Can remove "Up" if needed
#If
Re: when click left mouse then auto typing something in the box
thank you so much friend for helping and guiding.
i
i