Code: Select all
;Si no está abierto el 'foobar2000' se abre
F9::
If procesoExiste("foobar2000.exe") {
Send ^{Media_Play_Pause}
} Else {
Run, "H:\Mis Documentos\_PORTABLES\Foobar2000 (portable)\foobar2000.exe"
Sleep 1000
Send ^{Media_Play_Pause}
}
return
;función: devuelve un 'true' si el proceso de Windows funciona
procesoExiste(proceso) {
Process, Exist, %proceso%
return Errorlevel
}
a veces se atranca en el sleep, pues todavía no ha cargado el proceso foobar.
Por cierto, he probado con el
Code: Select all
IfWinExist, foobar2000 {
Code: Select all
IfWinExist, *foobar2000* {
gracias