Hello all.
I have a ideia to creat a checkbox with you can select hotkey u need in a box, and write a time in a box
soo if u select in hotkey "F2" "10000"
and when i active checkbox send every "10000" mseconds, hotkey "F2" or another i can change.
Thanks for help
GUI CheckBox hotkey and timer
Re: GUI CheckBox hotkey and timer
Hi,
I like this idea. I wrote a script quickly that tackles this but requires 2 global vars, which is not ideal. This can definitely be improved upon by someone with more time and/or experience than me.
I like this idea. I wrote a script quickly that tackles this but requires 2 global vars, which is not ideal. This can definitely be improved upon by someone with more time and/or experience than me.
Code: Select all
#noenv
#singleinstance,force
global started := 0
gui,keytrigger:new
gui,add,text,xm ym+3 w80 r1,Button to press:
gui,add,edit,w60 r1 x+m yp-2
gui,add,text,xm r1 w80,Interval in ms:
gui,add,edit,w60 r1 x+m yp-2
gui,add,button,w152 xm default gstarter,Start
gui,keytrigger:show,,Key trigger
return
starter()
{
if(started)
{
settimer,sending,off
started := 0
guicontrol,,button1,Start
}
else
{
global whichkey
guicontrolget,whichkey,,edit1
guicontrolget,interval,,edit2
if(!whichkey) | (!interval)
{
msgbox,Fields can't be empty
return
}
started := 1
guicontrol,,button1,Cancel
sleep %interval% ; uncomment this if you want the script to pause for %interval% time before sending the first key
settimer,sending,%interval%
}
}
F3::reload
sending:
send %whichkey%
return
Re: GUI CheckBox hotkey and timer
Hi, thanks for reply.
sorry, as i'm new to ahk i couldn't interpret your code correctly to apply it this way:
can you explain to me how to do this ? thanks again.
sorry, as i'm new to ahk i couldn't interpret your code correctly to apply it this way:
Code: Select all
Gui, Add, Text, x15 y10 w21 h13, keys
Gui, Add, Text, x90 y10 w21 h13, Time
Gui, Add, Hotkey, x15 y40 w65 h20, A
Gui, Add, Checkbox, vKt x15 y130 w71 h13, Active
Gui, Add, Edit, x90 y40 w80 h20, Edit
Gui, Add, Hotkey, x15 y70 w65 h20, A
Gui, Add, Edit, x90 y70 w80 h20, Edit
Gui, Add, Hotkey, x15 y100 w65 h20, A
Gui, Add, Edit, x90 y100 w80 h20, Edit
Gui, Show, w330 h288,
return
GuiClose:
ExitApp
can you explain to me how to do this ? thanks again.
Re: GUI CheckBox hotkey and timer
Could someone help me with the GUI above? I'm a beginner and I don't know how to make it work
Thanks
Thanks