Post by Lepes » 27 Sep 2022, 15:32
No sé muy bien en qué orden debe ejecutarse la función 2 con respecto a la función 1. Yo lo he hecho así, pero no tengo ninguno de los 3 programas y tampoco sé lo que pretendes hacer.
Tal cual lo he puesto, cuando exista la ventana ahk_exe mpc-be64.exe, entonces entraría a funcionar tu "funcion2".
Code: Select all
DetectHiddenWindows, on
SetTitleMatchMode, 2
Funcion1()
return
Funcion1(){
Loop
{
COMPROBAR:
IfWinExist, ahk_exe mpc-be64.exe
{
SendMessage, 0x111, 888,,, ahk_class MediaPlayerClassicW
PostMessage , 0x112 , 0xF060 ,,, ahk_exe Dream Scroller.exe
Goto, ESPERAR
}
Goto, COMPROBAR
ESPERAR:
IfWinNotExist, ahk_exe mpc-be64.exe
{
SendMessage, 0x111, 887,,, ahk_class MediaPlayerClassicW
Goto, ESPERAR
}
WinGetTitle, VR, MPC`-HC`, D3D a pantalla completa ;inicio funcion2
WinGet, Variable_unico, ID, %VR% ahk_exe mpc-hc64.exe
IfWinExist, ahk_id %Variable_unico%
{
WinSet, Bottom, , ahk_id %Variable_unico%
} ; fin funcion2
Goto, COMPROBAR
}
}
Si no es lo que quieres, es cuestión de subir o bajar todo el bloque desde "inicio funcion2" hasta "fin funcion2" para situarlo en el orden que tu necesitas.
No sé muy bien en qué orden debe ejecutarse la función 2 con respecto a la función 1. Yo lo he hecho así, pero no tengo ninguno de los 3 programas y tampoco sé lo que pretendes hacer.
Tal cual lo he puesto, cuando exista la ventana ahk_exe mpc-be64.exe, entonces entraría a funcionar tu "funcion2".
[code]DetectHiddenWindows, on
SetTitleMatchMode, 2
Funcion1()
return
Funcion1(){
Loop
{
COMPROBAR:
IfWinExist, ahk_exe mpc-be64.exe
{
SendMessage, 0x111, 888,,, ahk_class MediaPlayerClassicW
PostMessage , 0x112 , 0xF060 ,,, ahk_exe Dream Scroller.exe
Goto, ESPERAR
}
Goto, COMPROBAR
ESPERAR:
IfWinNotExist, ahk_exe mpc-be64.exe
{
SendMessage, 0x111, 887,,, ahk_class MediaPlayerClassicW
Goto, ESPERAR
}
WinGetTitle, VR, MPC`-HC`, D3D a pantalla completa ;inicio funcion2
WinGet, Variable_unico, ID, %VR% ahk_exe mpc-hc64.exe
IfWinExist, ahk_id %Variable_unico%
{
WinSet, Bottom, , ahk_id %Variable_unico%
} ; fin funcion2
Goto, COMPROBAR
}
}
[/code]
Si no es lo que quieres, es cuestión de subir o bajar todo el bloque desde "inicio funcion2" hasta "fin funcion2" para situarlo en el orden que tu necesitas.