I have the following code:
Code: Select all
{ ;QNEXTCOHD
{ ;KEYTRIGGER
#if winexist("WO")
lctrl & numpad8::
`::
guiWOQNCOHD:
coordmode, mouse, screen
sendinput, {lalt down}
sendinput, {F4}
send {lalt up}
sleep 1000
click, 240, 90
sleep 100
click, 240, 90
Goto, guiWOCOHD
return
#if
}
}
{ ; WOCOHD - CONTROLE HARDWARE SOFTWARE DOORSTROOM
{ ;KEYTRIGGER
#if winexist("WO")
lctrl & numpad7::
guiWOCOHD:
coordmode, mouse, screen
sleep 500
click, 200, 120
sleep 100
click, 200, 120
sleep 50
ALTCB2:=GETALTCB2(ALTCB2) ; GET WONUMMER
sleep 100
click, 505, 120 ;OPEN CHANGE
sleep 3000
click, 520, 330 ;OPEN AANVRAGER
sleep 2000
click, 110, 735 ;SHOW RECORD DETAILS
sleep 1000
click, 230, 490 ;SHOW CI
GUIWOCOHD()
return
#if
}
But what i want to achieve, is that if i press lctrl&numpad8, that it will automatically execute the tasks of lctrl&numpad7 as well.
The only way to make that happen as far as my knowledge goes, is to add a "Goto, guiWOCOHD". But that doesn't seem to work as it gives me an error "A goto/gosub must not jump into a block that doesn't enclose it".
Could anyone please bring me in the right direction of what to do?
(sorry if some of the comments are not understandable, they are in my own language)