Module Winkawaks.ahk

Un problème que vous ne pouvez classer dans aucune des autres sections?

Modérateurs : Porko, Modérateurs

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Module Winkawaks.ahk

Message par poolpe » 08 mai 2013 - 08:54

Bonjour,

J'ai pu installer un module Winkawaks.ahk qui permet le lancement des roms NeoGeo , CSP1, CSP2 sous hyperspin.

Par contre il y a quelques défauts qui sont censés être géré par le module qui ne se font pas.


;----------------------------------------------------------------------------
; SNK Neo Geo, CPS1, CPS2
; WinKawaks v1.62
; by djvj
; 1.3
;
; Notes:
; If you want to use fading, turn off hide_desktop in your Hyperspin\Settings\Settings.ini
; Set your roms dir in the emu by going to File-Configure paths. If all your roms are in one dir, you only need to set one of them. If they are in seperate dirs, makes sure they are all defined here.
; All your roms should be zipped. Bios zips should be placed in the same dir as the games they are for. (ex.  neogeo.zip should be with the neogeo roms)
; Load a game and set your controls at Game-Redefine keys-Player1 and 2. Then click Game-save key settings as default. Now they will be mapped for every game.
; Set your Region to USA by going to Game-NeoGeo settings-USA. If you don't want to use coins, select Game-NeoGeo settings-Console
; Set Sound-Sound frequency-44 KHz (or 48 KHz)

; The larger games take a long time to load, be patient.
;----------------------------------------------------------------------------
Fullscreen = true
Freeplay = 0                     ; 0=off, 1=on
Country = 1                     ; 0 = Japan,  1 = USA,  2 = Europe
Hardware = 1                     ; 0 = Console, 1 = Arcade
Hotkeys = 1                     ; Set to 0 to disable menu shortcuts (handy for Hotrod players)
;----------------------------------------------------------------------------

wkINI := CheckFile(emuPath . "WinKawaks.ini")

GUI_ID := FadeInStart()

; Now let's update all our keys if they differ in the ini
iniLookup =
( ltrim c
  NeoGeo, NeoGeoFreeplay, %Freeplay%
  NeoGeo, NeoGeoCountry, %Country%
  NeoGeo, NeoGeoSystem, %Hardware%
  Misc, EnableHotKeys, %Hotkeys%
)
Loop, Parse, iniLookup, `n
{
   StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
   IniRead, tempVar, %wkINI%, %split1%, %split2%
   If ( tempVar != split3 )
      IniWrite, % split3, %wkINI%, %split1%, %split2%
}

Fullscreen := (If Fullscreen = "true" ? ("-fullscreen") : (""))

7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)

; This allows us to send variables, that when empty, are not sent to the Run command
RunEmu(executable, romName, Fullscreen, emuPath)

WinWait, Kawaks
WinWaitActive, Kawaks

Loop { ; looping until WinKawaks is done loading game
      Sleep, 200
      WinGetTitle, winTitle, Kawaks 1.62 ahk_class Afx:400000:0 ; excluding the title of the GUI window so we can read the title of the game window instead
      StringSplit, T, winTitle, %A_Space%
      If ( T4 != "Initializing" T4 != "Lost" T4 != "" ) {
         Sleep, 500 ; need a bit longer so we don't see the winkawaks window
         Break
      }
   }

; Sometimes the border and titlebar appear and flash rapidly, this gets rid of them
If Fullscreen {
      WinSet, Style, -0xC00000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the TitleBar
      WinSet, Style, -0x40000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the border of the game window
   }

GUI_ID2 := FadeInExit()

Process, WaitClose, %executable%

7z2 := 7zCleanUp()

GUI_ID4 := FadeOutExit()

WinActivate, Hyperspin

ExitApp


RunEmu(exe,rom,param1=0,relativepath=0, option=0) {
      Run, %exe% %rom% %param1%, %relativepath%, %option%
   }

ProcessExist(PidOrName) {
      Process, Exist, %PidOrName%
      return ErrorLevel
   }


CloseProcess:
   GUI_ID3 := FadeOutStart()
   Send, {ENTER} ; pause emu
   Sleep, 1000 ; increase this if winkawaks is not closing and only going into windowed mode
   WinClose, Kawaks 1.62 ahk_class Afx:400000:0
   Sleep, 500
   #If ProcessExist(executable)
      Process, Close, %executable% ; sometimes the process doesn't close when using the GUI, this makes sure it closes (eeprom still saves with previous line)
Return




Maintenant j'ai 3 problèmes qui ne sont pas gérés :
- need a bit longer so we don't see the winkawaks window
- Sometimes the border and titlebar appear and flash rapidly, this gets rid of them
-sometimes the process doesn't close when using the GUI, this makes sure it closes (eeprom still saves with previous line

J'ai beau augmenter le temps après "sleep" pour corriger le problème 1 et 3 ca ne change rien. Faut il compiler ? ou juste éditer et sauvegarder le .ahk ?

Est ce que Kawaks 1.62 à une importance dans le script car je ne connais pas la version de mon WinKawaks.

Donc si quelqu un peut me confirmer comment modifier un .ahk ? ( éditer et sauvegarder suffit ? ) et s'il y a des variables précises à vérifier comme Kawaks 1.62 ? Car j ai une barre windows qui clignote lors de l emulation, je vois winkawaks se lancer au démarrage de la rom, et quand je quitte le processus Hyperlaunch.exe reste et donc impossible de lancer une autre rom.

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Module Winkawaks.ahk

Message par soft-bug » 08 mai 2013 - 10:11

Hello,

On peut pas dire que tu commences par le plus simple !

Tout d'abord, je pense qu'il faut savoir si tu utilises HyperLaunch 1.x ou HyperLaunch 2.x car dans ton cas ce module Ahk est valable pour HyperLaunch 2.x (oui je sais c'est marqué 1.3 mais comme le package 7zip qu'il utilise dans ce script est dans le v2.x) !

Hyperlaunch 1.X = un seul fichier ahk qui comprend tous les modules, la v2.x permet d'avoir un fichier ahk par module.

Courage tu fais le même constat que la majorité d'entre-nous à savoir que les "modules" officiels sont pourraves et incitent à s'inscrire et payer ... :pale:

Bref, je ne connais pas ton émulateur, mais commence déjà à savoir comment il fonctionne et quels sont les paramètres qu'il accepte en ligne de commande !

Ensuite dans le package Autohotkey, il y a l'utilitaire AU3_Spy.exe ... lance le et tu verras la "classe" de ton émulateur (lance ton émul ensuite) : il faudra le comparer avec celle de ton ahk et cela te permettra de voir si tu es dans les choux ! Par exemple mon explorateur CHrome à la classe : ahk_class Chrome_WidgetWin_1
... :pirat:

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Re: Module Winkawaks.ahk

Message par poolpe » 08 mai 2013 - 10:35

J'utilise hyperlaunch v2.25c la dernière sortie.

Mais sinon pour éditer le .ahk il suffit de faire enregistrer ? pas de compilation ou autre ?

Je vérifie la "classe" de mon émulateur :

( Window Title Class )
Kawaks 1.54 - No game loaded
ahk_class Afx:400000:0


La classe est bonne mais pas la version du coup, je vais mettre à jour par principe mais je ne sais pas si c'est important

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Re: Module Winkawaks.ahk

Message par poolpe » 08 mai 2013 - 10:48

Effectivement une simple mise à jour de winkawaks fait que tout marche parfaitement.

Merci pour le coup de main en tout cas avec autohotkey.

Ya plus qu'à mettre les thèmes et vidéo :cheers:

C'est là que le travail commence nan ?

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Re: Module Winkawaks.ahk

Message par poolpe » 08 mai 2013 - 15:00

Quelqu un peut il me confirmer que pour modifier un .ahk il suffit juste de l enregistrer pas d'autre manip à faire ? Car je reste avec ma fenetre Winkawaks pendant 2 secondes avant le lancement de la rom.

Et au niveau des touches c'est le gros bordel :]. La configuration se fait bien sur l'émulateur avant de lancer hyperspin ou hyperspin possède des combinaisons de touches ?

Car je joue et si j'appuie un peu n importe où ou que j'appuie sur 2 boutons en même temps, je retourne sur le bureau avec hyperspin.


Sinon j'ai toujours mes bugs censés être gérés par le .ahk

Comment être sur que le .ahk est bien lu ...

Avatar de l’utilisateur
NutsreturN2
Modérateur
Modérateur
Messages : 2811
Inscription : 19 oct. 2012 - 01:00
Localisation : BAGES 66670
A remercié : 105 fois
A été remercié : 80 fois

Re: Module Winkawaks.ahk

Message par NutsreturN2 » 08 mai 2013 - 15:57

Si tu utilise le dernier Hyperlaunch tu as juste a modifier ton ahk , enregistrer et sortir .
Pour les touches tu utilises quoi ? un Hack clavier ? Car il me semble que si tu appuie sur q et s ca te ferme Hyperspin .
Sinon evite de compiler tes ahk , ca risque de foutre le bordel dans ton Hyperlaunch .
Est ce que tu utilises la derniere version d Hyperspin ?

Sinon bizarre que tes roms neo geo ne fonctionne pas avec mame ...

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Re: Module Winkawaks.ahk

Message par poolpe » 08 mai 2013 - 18:07

j utilisé les dernieres versions pour tout ^^

pour mame c est juste quelques roms. et surtout les écrans d avertissement et un truc vert degueu avant le lancement de la rom.

je suis sur un Pc classique pour le moment. je configure tout avant la construction du meuble.

Pour remettre à plat hyperlaunch , je retelecharge le fichier et c est tout ?

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Re: Module Winkawaks.ahk

Message par poolpe » 09 mai 2013 - 09:39

Les touches de l'émulateur se melangent avec les touches configurées sur hyperspin. C'est ce que doit éviter hyperlaunch dans la théorie ? Ca veut dire que mon fichier winkawaks.ahk est mauvais ?

Avatar de l’utilisateur
NutsreturN2
Modérateur
Modérateur
Messages : 2811
Inscription : 19 oct. 2012 - 01:00
Localisation : BAGES 66670
A remercié : 105 fois
A été remercié : 80 fois

Re: Module Winkawaks.ahk

Message par NutsreturN2 » 09 mai 2013 - 10:04

Non , ne touche pas au .ahk
Pourquoi est ce que tu ne reconfigure pas les touches d hyperspin ?

Avatar de l’utilisateur
poolpe
Apprenti
Apprenti
Messages : 15
Inscription : 05 mai 2013 - 01:00

Re: Module Winkawaks.ahk

Message par poolpe » 09 mai 2013 - 10:57

j essaye de savoir comment ça marche surtout.

les touches configurées sur l émulateur et d hyperspin fonctionne en même temps. normal ou pas ? après je serais avec des stick arcade donc ça réglera le problème sûrement. Mais comme les corrections censées être apportées par le winkawaks ne marchent pas, je cherche ou je peux ^^ une explication.

Au final je sens que je vais changer d émulateur mais bon winkawaks est clairement mieux que Mame a mes yeux. Autant le ahk pour Taito fonctionne sans problème que pour winkawaks non. peux être que j ai mal réglé l émulateur. Mais est ce que le .ahk n impose pas ses réglages et prend la main sur mes propres réglages ?

Avatar de l’utilisateur
Meth
Administrateur
Administrateur
Messages : 4541
Inscription : 19 oct. 2012 - 01:00
Localisation : Conflans-en-Jarnisy
A remercié : 989 fois
A été remercié : 2180 fois
Contact :

Re: Module Winkawaks.ahk

Message par Meth » 13 nov. 2013 - 12:59

Désolé de remonter ce vieux post, mais j'ai un problème avec mon module winkawaks sous HL3.

Lorsque je quit, il me laisse l’émulateur en fenêtré en fond.

voici le module:

MEmu = WinKawaks
MEmuV = v1.62
MURL = http://www.kawaks.net/
MAuthor = djvj
MVersion = 2.0
MCRC = 1E128178
iCRC = 84C72842
MID = 635038268935109871
MSystem = "SNK Neo Geo","SNK Neo Geo AES","SNK Neo Geo MVS"
;----------------------------------------------------------------------------
; SNK Neo Geo, CPS1, CPS2

; Notes:
; If you want to use fading, turn off hide_desktop in your Hyperspin\Settings\Settings.ini
; Set your roms dir in the emu by going to File-Configure paths. If all your roms are in one dir, you only need to set one of them. If they are in seperate dirs, makes sure they are all defined here.
; All your roms should be zipped. Bios zips should be placed in the same dir as the games they are for. (ex.  neogeo.zip should be with the neogeo roms)
; Load a game and set your controls at Game-Redefine keys-Player1 and 2. Then click Game-save key settings as default. Now they will be mapped for every game.
; Set your Region to USA by going to Game-NeoGeo settings-USA. If you don't want to use coins, select Game-NeoGeo settings-Console
; Set Sound-Sound frequency-44 KHz (or 48 KHz)

; The larger games take a long time to load, be patient.
;----------------------------------------------------------------------------
StartModule()
FadeInStart()

settingsFile := modulePath . "\" . moduleName . ".ini"
Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
Freeplay := IniReadCheck(settingsFile, "Settings", "Freeplay","0",,1)                  ; 0=off, 1=on
Country := IniReadCheck(settingsFile, "Settings", "Country","1",,1)                  ; 0 = Japan,  1 = USA,  2 = Europe
Hardware := IniReadCheck(settingsFile, "Settings", "Hardware","1",,1)                  ; 0 = Console, 1 = Arcade
Hotkeys := IniReadCheck(settingsFile, "Settings", "Hotkeys","1",,1)                  ; Set to 0 to disable menu shortcuts (handy for Hotrod players)

7z(romPath, romName, romExtension, 7zExtractPath)

wkINI := CheckFile(emuPath . "\WinKawaks.ini")

; Now let's update all our keys if they differ in the ini
iniLookup =
( ltrim c
  NeoGeo, NeoGeoFreeplay, %Freeplay%
  NeoGeo, NeoGeoCountry, %Country%
  NeoGeo, NeoGeoSystem, %Hardware%
  Misc, EnableHotKeys, %Hotkeys%
)
Loop, Parse, iniLookup, `n
{   StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
   IniRead, tempVar, %wkINI%, %split1%, %split2%
   If ( tempVar != split3 )
      IniWrite, % split3, %wkINI%, %split1%, %split2%
}

Fullscreen := If Fullscreen = "true" ? ("-fullscreen") : ("")

Run(executable . " " . romName . " " . Fullscreen, emuPath)

WinWait("Kawaks")
WinWaitActive("Kawaks")

Loop { ; looping until WinKawaks is done loading game
   Sleep, 200
   WinGetTitle, winTitle, Kawaks 1.62 ahk_class Afx:400000:0 ; excluding the title of the GUI window so we can read the title of the game window instead
   StringSplit, T, winTitle, %A_Space%
   If ( T4 != "Initializing" T4 != "Lost" T4 != "" ) {
      Sleep, 500 ; need a bit longer so we don't see the winkawaks window
      Break
   }
}

; Sometimes the border and titlebar appear and flash rapidly, this gets rid of them
If Fullscreen {
   WinSet, Style, -0xC00000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the TitleBar
   WinSet, Style, -0x40000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the border of the game window
}

FadeInExit()
Process("WaitClose",executable)
7zCleanUp()
FadeOutExit()
ExitModule()


CloseProcess:
   FadeOutStart()
   Send, {ENTER} ; pause emu
   Sleep, 10000 ; increase this if winkawaks is not closing and only going into windowed mode
   WinClose("Kawaks 1.62 ahk_class Afx:400000:0")
   Sleep, 1000
   IfWinExist, Kawaks 1.62 ahk_class Afx:400000:0
   {   WinActivate ; use the window found above
      Send, {Alt}FX
   }   
   ; alternate closing method
   ; errorLvl := Process("Exist", executable)
   ; If errorLvl
      ; Process("Close", executable)   ; sometimes the process doesn't close when using the GUI, this makes sure it closes (eeprom still saves with previous line)
ReturnJuste pour info, pour quitter kawaks, il faut faire pause (touche entré) et ensuite quitter (alt+ F4), et je pense que c'est la que ça bugg je ne vois pas la touche F4 et je ne sais pas la rajouter ne comprenant rien aux modules. J'ai tenté d'augmenter le Sleep comme recommandé mais rien n'y fait. 

Merci a ceux qui peuvent m'aider.

Avatar de l’utilisateur
micaelo14
Modérateur
Modérateur
Messages : 3379
Inscription : 19 oct. 2012 - 01:00
Localisation : Centre
A remercié : 98 fois
A été remercié : 165 fois

Re: Module Winkawaks.ahk

Message par micaelo14 » 13 nov. 2013 - 13:42

pour la néo un mame gère aussi bien ;)  
Pourquoi faire compliqué :D  

Avatar de l’utilisateur
Meth
Administrateur
Administrateur
Messages : 4541
Inscription : 19 oct. 2012 - 01:00
Localisation : Conflans-en-Jarnisy
A remercié : 989 fois
A été remercié : 2180 fois
Contact :

Re: Module Winkawaks.ahk

Message par Meth » 13 nov. 2013 - 15:02

Réponse jugée non satisfaisante  :twisted:

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Module Winkawaks.ahk

Message par soft-bug » 13 nov. 2013 - 19:12

Désolé de remonter ce vieux post, mais j'ai un problème avec mon module winkawaks sous HL3.

Lorsque je quit, il me laisse l’émulateur en fenêtré en fond.

voici le module:

MEmu = WinKawaks
MEmuV = v1.62
MURL = http://www.kawaks.net/
MAuthor = djvj
MVersion = 2.0
MCRC = 1E128178
iCRC = 84C72842
MID = 635038268935109871
MSystem = "SNK Neo Geo","SNK Neo Geo AES","SNK Neo Geo MVS"
;----------------------------------------------------------------------------
; SNK Neo Geo, CPS1, CPS2

; Notes:
; If you want to use fading, turn off hide_desktop in your Hyperspin\Settings\Settings.ini
; Set your roms dir in the emu by going to File-Configure paths. If all your roms are in one dir, you only need to set one of them. If they are in seperate dirs, makes sure they are all defined here.
; All your roms should be zipped. Bios zips should be placed in the same dir as the games they are for. (ex.  neogeo.zip should be with the neogeo roms)
; Load a game and set your controls at Game-Redefine keys-Player1 and 2. Then click Game-save key settings as default. Now they will be mapped for every game.
; Set your Region to USA by going to Game-NeoGeo settings-USA. If you don't want to use coins, select Game-NeoGeo settings-Console
; Set Sound-Sound frequency-44 KHz (or 48 KHz)

; The larger games take a long time to load, be patient.
;----------------------------------------------------------------------------
StartModule()
FadeInStart()

settingsFile := modulePath . "\" . moduleName . ".ini"
Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
Freeplay := IniReadCheck(settingsFile, "Settings", "Freeplay","0",,1) ; 0=off, 1=on
Country := IniReadCheck(settingsFile, "Settings", "Country","1",,1) ; 0 = Japan,  1 = USA,  2 = Europe
Hardware := IniReadCheck(settingsFile, "Settings", "Hardware","1",,1) ; 0 = Console, 1 = Arcade
Hotkeys := IniReadCheck(settingsFile, "Settings", "Hotkeys","1",,1) ; Set to 0 to disable menu shortcuts (handy for Hotrod players)

7z(romPath, romName, romExtension, 7zExtractPath)

wkINI := CheckFile(emuPath . "\WinKawaks.ini")

; Now let's update all our keys if they differ in the ini
iniLookup =
( ltrim c
   NeoGeo, NeoGeoFreeplay, %Freeplay%
   NeoGeo, NeoGeoCountry, %Country%
   NeoGeo, NeoGeoSystem, %Hardware%
   Misc, EnableHotKeys, %Hotkeys%
)
Loop, Parse, iniLookup, `n
{ StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
 IniRead, tempVar, %wkINI%, %split1%, %split2%
 If ( tempVar != split3 )
 IniWrite, % split3, %wkINI%, %split1%, %split2%
}

Fullscreen := If Fullscreen = "true" ? ("-fullscreen") : ("")

Run(executable . " " . romName . " " . Fullscreen, emuPath)

WinWait("Kawaks")
WinWaitActive("Kawaks")

Loop { ; looping until WinKawaks is done loading game
 Sleep, 200
 WinGetTitle, winTitle, Kawaks 1.62 ahk_class Afx:400000:0 ; excluding the title of the GUI window so we can read the title of the game window instead
 StringSplit, T, winTitle, %A_Space%
 If ( T4 != "Initializing" T4 != "Lost" T4 != "" ) {
 Sleep, 500 ; need a bit longer so we don't see the winkawaks window
 Break
 }
}

; Sometimes the border and titlebar appear and flash rapidly, this gets rid of them
If Fullscreen {
 WinSet, Style, -0xC00000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the TitleBar
 WinSet, Style, -0x40000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the border of the game window
}

FadeInExit()
Process("WaitClose",executable)
7zCleanUp()
FadeOutExit()
ExitModule()


CloseProcess:
 FadeOutStart()
 Send, {ENTER} ; pause emu
 Sleep, 10000 ; increase this if winkawaks is not closing and only going into windowed mode
 WinClose("Kawaks 1.62 ahk_class Afx:400000:0")
 Sleep, 1000
 IfWinExist, Kawaks 1.62 ahk_class Afx:400000:0
 { WinActivate ; use the window found above
 Send, {Alt}FX
 }
; alternate closing method
 ; errorLvl := Process("Exist", executable)
 ; If errorLvl
 ; Process("Close", executable) ; sometimes the process doesn't close when using the GUI, this makes sure it closes (eeprom still saves with previous line)
ReturnJuste pour info, pour quitter kawaks, il faut faire pause (touche entré) et ensuite quitter (alt+ F4), et je pense que c'est la que ça bugg je ne vois pas la touche F4 et je ne sais pas la rajouter ne comprenant rien aux modules. J'ai tenté d'augmenter le Sleep comme recommandé mais rien n'y fait. 

Merci a ceux qui peuvent m'aider.Hello Meteore,

Bon, je n'ai pas la doc AutoHotkey au moment ou je fais ce message, mais en fonction de ce que tu dis, le script m’intrigue sur la section CloseProcess:

En effet, il envoi la touche Entrée, comme tu l'indiques, par Send, {ENTER}

Mais par la suite il n'envoie pas le ALT+F4, il envoie un truc bizarre : Send, {Alt}FX

Bon, faut tester en remplaçant Send, {Alt}FX par le truc qui fait ALT+F4 .... dès que je retrouve la doc ! :pirat:  

Avatar de l’utilisateur
Meth
Administrateur
Administrateur
Messages : 4541
Inscription : 19 oct. 2012 - 01:00
Localisation : Conflans-en-Jarnisy
A remercié : 989 fois
A été remercié : 2180 fois
Contact :

Re: Module Winkawaks.ahk

Message par Meth » 13 nov. 2013 - 19:43

Oui voila soft je te remercie j'avais bien vu ça malgré mes faibles connaissances. C'est pourquoi j'aimerais connaitre la fonction "send" qui me permettra de commander l'appui simultané Alt+F4.

Il peu pas ce quitter avec Echap comme tout les émulateurs :x

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Module Winkawaks.ahk

Message par soft-bug » 13 nov. 2013 - 21:03

Oui voila soft je te remercie j'avais bien vu ça malgré mes faibles connaissances. C'est pourquoi j'aimerais connaitre la fonction "send" qui me permettra de commander l'appui simultané Alt+F4.

Il peu pas ce quitter avec Echap comme tout les émulateurs :x Metheore,

Voilà donc l'instruction pour faire ALT+F4 est Send !{f4} qui doit normalement remplacer Send, {Alt}FX

Au fait, quand tu dis que "tu as essayé d'augmenter le sleep", c'est pour prendre une taille XXL !! :clown:  

Voilà, j'ai pas mieux en stock ! :pirat:

Avatar de l’utilisateur
Meth
Administrateur
Administrateur
Messages : 4541
Inscription : 19 oct. 2012 - 01:00
Localisation : Conflans-en-Jarnisy
A remercié : 989 fois
A été remercié : 2180 fois
Contact :

Re: Module Winkawaks.ahk

Message par Meth » 13 nov. 2013 - 21:54

Merci soft je test ça demain :) .

Pour le slip non je suis alaise dans du M :p

Avatar de l’utilisateur
Meth
Administrateur
Administrateur
Messages : 4541
Inscription : 19 oct. 2012 - 01:00
Localisation : Conflans-en-Jarnisy
A remercié : 989 fois
A été remercié : 2180 fois
Contact :

Re: Module Winkawaks.ahk

Message par Meth » 14 nov. 2013 - 15:23

Juste pour info si ça intéresse quelqu'un, j'ai ressui a solutionner le problème.

La commande AutoHotKey ALT+F4 ce traduit: Send, !{f4}

Par contre étrangement j'ai du la répéter 2 fois sinon j'avais toujours le même problème.
Je poste le module:

MEmu = WinKawaks
MEmuV = v1.62
MURL = http://www.kawaks.net/
MAuthor = djvj
MVersion = 2.0
MCRC = 1E128178
iCRC = 84C72842
MID = 635038268935109871
MSystem = "SNK Neo Geo","SNK Neo Geo AES","SNK Neo Geo MVS"
;----------------------------------------------------------------------------
; SNK Neo Geo, CPS1, CPS2

; Notes:
; If you want to use fading, turn off hide_desktop in your Hyperspin\Settings\Settings.ini
; Set your roms dir in the emu by going to File-Configure paths. If all your roms are in one dir, you only need to set one of them. If they are in seperate dirs, makes sure they are all defined here.
; All your roms should be zipped. Bios zips should be placed in the same dir as the games they are for. (ex.  neogeo.zip should be with the neogeo roms)
; Load a game and set your controls at Game-Redefine keys-Player1 and 2. Then click Game-save key settings as default. Now they will be mapped for every game.
; Set your Region to USA by going to Game-NeoGeo settings-USA. If you don't want to use coins, select Game-NeoGeo settings-Console
; Set Sound-Sound frequency-44 KHz (or 48 KHz)

; The larger games take a long time to load, be patient.
;----------------------------------------------------------------------------
StartModule()
FadeInStart()

settingsFile := modulePath . "\" . moduleName . ".ini"
Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
Freeplay := IniReadCheck(settingsFile, "Settings", "Freeplay","0",,1)                  ; 0=off, 1=on
Country := IniReadCheck(settingsFile, "Settings", "Country","1",,1)                  ; 0 = Japan,  1 = USA,  2 = Europe
Hardware := IniReadCheck(settingsFile, "Settings", "Hardware","1",,1)                  ; 0 = Console, 1 = Arcade
Hotkeys := IniReadCheck(settingsFile, "Settings", "Hotkeys","1",,1)                  ; Set to 0 to disable menu shortcuts (handy for Hotrod players)

7z(romPath, romName, romExtension, 7zExtractPath)

wkINI := CheckFile(emuPath . "\WinKawaks.ini")

; Now let's update all our keys if they differ in the ini
iniLookup =
( ltrim c
  NeoGeo, NeoGeoFreeplay, %Freeplay%
  NeoGeo, NeoGeoCountry, %Country%
  NeoGeo, NeoGeoSystem, %Hardware%
  Misc, EnableHotKeys, %Hotkeys%
)
Loop, Parse, iniLookup, `n
{   StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
   IniRead, tempVar, %wkINI%, %split1%, %split2%
   If ( tempVar != split3 )
      IniWrite, % split3, %wkINI%, %split1%, %split2%
}

Fullscreen := If Fullscreen = "true" ? ("-fullscreen") : ("")

Run(executable . " " . romName . " " . Fullscreen, emuPath)

WinWait("Kawaks")
WinWaitActive("Kawaks")

Loop { ; looping until WinKawaks is done loading game
   Sleep, 200
   WinGetTitle, winTitle, Kawaks 1.62 ahk_class Afx:400000:0 ; excluding the title of the GUI window so we can read the title of the game window instead
   StringSplit, T, winTitle, %A_Space%
   If ( T4 != "Initializing" T4 != "Lost" T4 != "" ) {
      Sleep, 500 ; need a bit longer so we don't see the winkawaks window
      Break
   }
}

; Sometimes the border and titlebar appear and flash rapidly, this gets rid of them
If Fullscreen {
   WinSet, Style, -0xC00000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the TitleBar
   WinSet, Style, -0x40000, Kawaks 1.62 ahk_class Afx:400000:0 ; Removes the border of the game window
}

FadeInExit()
Process("WaitClose",executable)
7zCleanUp()
FadeOutExit()
ExitModule()


CloseProcess:
   FadeOutStart()
   Send, {ENTER} ; pause emu
   Sleep, 1000 ; increase this if winkawaks is not closing and only going into windowed mode
   WinClose("Kawaks 1.62 ahk_class Afx:400000:0")
   Sleep, 500
   IfWinExist, Kawaks 1.62 ahk_class Afx:400000:0
   {   WinActivate ; use the window found above
      Send, !{f4}
   }
    Sleep, 500
   Send, {ENTER}
   IfWinExist, Kawaks 1.62 ahk_class Afx:400000:0
   {   WinActivate ; use the window found above
      Send, !{f4}
   }      
   ; alternate closing method
   ; errorLvl := Process("Exist", executable)
   ; If errorLvl
      ; Process("Close", executable)   ; sometimes the process doesn't close when using the GUI, this makes sure it closes (eeprom still saves with previous line)
Return

Avatar de l’utilisateur
Firch
Guide
Guide
Messages : 1875
Inscription : 30 déc. 2012 - 00:00
A été remercié : 1 fois

Re: Module Winkawaks.ahk

Message par Firch » 14 nov. 2013 - 21:41

metheore,, si tu veux une touche "echap" qui fait office de alt+f4 sur HL3
normalement, y' pas besoin de trafiquer les modules

il y a quelques mois, greg, l'un de nos membre avais rencontrer ce soucis avec l'emulatur NullDC
j'y ai poster la procedure à suivre sur ce post
http://www.thehyperfreespin.com/t1638p1 ... lldc-altf4

tu regarde le 3eme message pour voir l'explication
sinon, sache que par defaut, le bouton "-" (moins) du pave numerique de ton clavier fait office de alt+f4
(mais avec l'explication du lien, tu pourra configurer un alt+f4 sur n'importe quel touche du clavier)

Avatar de l’utilisateur
Meth
Administrateur
Administrateur
Messages : 4541
Inscription : 19 oct. 2012 - 01:00
Localisation : Conflans-en-Jarnisy
A remercié : 989 fois
A été remercié : 2180 fois
Contact :

Re: Module Winkawaks.ahk

Message par Meth » 14 nov. 2013 - 22:18

Ouai merci Firch j’étais passé a coté de cette fonction.

Répondre

Revenir à « Divers »