Code: Select all
Suspend on
F10::ExitApp
~Z::Suspend on
~T::Suspend on
~Tab::Suspend on
~R::Suspend on
~Space::Suspend on
~Ctrl::Suspend on
~X::Suspend on
~RButton::Suspend
~LButton::
Loop ; Continuously loop until a 'break' command
{
if GetKeyState("LButton", "P")
{
Sleep 1
mouseXY(0, 12.5)
Sleep 1
mouseXY(0, 0)
}
else ;LButton pressed? If no do this, i.e. exit the loop
break ;will stop the loop
}
mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) ; moves the mouse could easily be the built in autohotkey MouseMove, X, Y
}
Code: Select all
; Generated by AutoGUI 2.6.0
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
Gui Add, Button, x47 y57 w162 h52 gstart, Start
Gui Show, w254 h162 , start
start:
Run rcl.ahk
return
GuiEscape:
GuiClose:
ExitApp
how can I combine both ahk and still get the same result
when I press start button instead of running another ahk is there way to put the code in the same ahk and run that code
[Mod edit: Topic name added]