Fermer Script

Poser vos questions de programmation en AutoHotkey
GeraldB
Posts: 2
Joined: 09 Feb 2021, 14:50

Fermer Script

Post by GeraldB » 09 Feb 2021, 14:55

Bonjour,
J'ai Raiden IV Overkill installé sur ma borne d'arcade tournant sous LaunchBox (BigBox), mais pour quitter le jeu il faut appuyer sur la touche "F2" et cette touche ne peut pas être réassignée. J'ai donc créé un petit script avec AutoHotKey pour pouvoir quitter Raiden IV à l'aide de la touche Esc. et j'en ai profité pour modifier les touches z et x :

Code: Select all

#SingleInstance, Off
Esc::F2
LCtrl::z
Alt::x
return
Tout fonctionne, mais le script reste ouvert après avoir fermé Raiden IV. Comment fermer le script en même temps que le jeu (Raiden IV : Overkill)
merci 😉

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Fermer Script

Post by joedf » 09 Feb 2021, 15:57

depuis https://www.autohotkey.com/boards/viewtopic.php?p=176972#p176972
Tu peux essayer qqch comme ceci :think:

Code: Select all

monJeux := "C:\Program Files (x86)\...\RaidenVI.exe"
SetTitleMatchMode, 3
Run, % monJeux
WinWait, Jeux, , 5
SetTimer, Jeux_Exit, 100
 
Jeux_Exit:
IfWinNotExist, ahk_exe %monJeux%
    ExitApp
Return
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

GeraldB
Posts: 2
Joined: 09 Feb 2021, 14:50

Re: Fermer Script

Post by GeraldB » 10 Feb 2021, 13:23

Merci, je vais essayer ;)

User avatar
Thinky
Posts: 3
Joined: 06 Mar 2021, 11:20

Re: Fermer Script

Post by Thinky » 06 Mar 2021, 11:58

Tout simplement en écrivant ceci :

Code: Select all

ExitApp

Post Reply

Return to “J'ai besoin d'aide”