
: Thank K3tp

:
I have make that:
Code:
#Persistent
WinGetTitle, Title, ahk_class MediaPlayerClassicW
StringTrimRight, Title, Title, % StrLen( " - Media Player Classic" ) ; % ; ------
ControlGetText, OutputVar, Static2,%title%
StringLen, length, OutputVar
if length >14
{
StringRight, OutputVar, OutputVar, 8
StringRight, OutputVarS, OutputVar, 2
StringTrimRight, OutputVar, OutputVar, 3
StringRight, OutputVarM, OutputVar, 2
StringTrimRight, OutputVar, OutputVar, 3
StringRight, OutputVarH, OutputVar, 2
}
else
{
StringRight, OutputVar, OutputVar, 5
StringRight, OutputVarS, OutputVar, 2
StringTrimRight, OutputVar, OutputVar, 3
StringRight, OutputVarM, OutputVar, 2
OutputVarH = 0
}
OutputVarH2 := OutputVarH * 3600
OutputVarM2 := OutputVarM * 60
OutputVarS2 := OutputVarS * 1
TEMPS_TOTAL := OutputVarH2 +OutputVarM2 + OutputVarS2
; MsgBox, 4096,, %OutputVarH%`n%OutputVarM%`n%OutputVarS%`n`n= %tempsseconde%
;MsgBox, 4096,, = %tempsseconde%
;tempsseconde := CONVERSIONenSECONDES(OutputVar)
gosub console
guicontrol ,,TEMPS_POSI1, 0
guicontrol ,,TEMPS_POSI2, %TEMPS_TOTAL%
;ControlGetPos, x, y, w, h, %Control%, ahk_id %id%
;ToolTip, = %tempsseconde%
;MsgBox, 4096,, = %tempsseconde%
SetTimer ,AFFICHE_TEMPS,500
return
; -------------------------------------------------------------------------------
CONSOLE:
Gui, Font, S8 Bold cGreen, Verdana
Gui, Add, Text, x6 y107 w130 h50 vNOMTITRE +Center, %title%
Gui, Font, S8 Bold cBlack, Verdana
Gui, Add, Text, x86 y7 w50 h20 , %TEMPS_TOTAL%
Gui, Font, S7 Norm cBlack, Verdana
Gui, Add, Button, x6 y47 w60 h20 gBOUCLE1, F1 &Debut
Gui, Add, Button, x6 y67 w80 h20 gBOUCLE2, F2 &Faire
Gui, Add, Edit, x86 y47 w50 h20 vTEMPS_POSI1 +Right,
Gui, Add, Edit, x86 y67 w50 h20 vTEMPS_POSI2 +Right,
Gui, Add, Edit, x86 y27 w50 h20 vTEMPS_POSIN,
Gui, Add, Button, x66 y47 w20 h20 gRAZBOUCLE1, 0
Gui, Add, Button, x6 y87 w130 h20 gRAZBOUCLE2, F3 &Stopper boucle
Gui, Show, h168 w150,, %SelectedFileName%
Return
; -------------------------------------------------------------------------------
':: ;4
F1::
BOUCLE1:
WinGetTitle, Title, ahk_class MediaPlayerClassicW
StringTrimRight, Title, Title, % StrLen( " - Media Player Classic" ) ; % ; ------
ControlGetText, OutputVar, Static2,%title%
TEMPS_POSI1 := CONVERSIONenSECONDES(OutputVar)
guicontrol ,,TEMPS_POSI1, %TEMPS_POSI1%
SplashTextOn, 100, 20,
SplashTextOff
return
; -------------------------------------------------------------------------------
è:: ;7
F2::
BOUCLE2:
WinGetTitle, Title, ahk_class MediaPlayerClassicW
StringTrimRight, Title, Title, % StrLen( " - Media Player Classic" ) ; % ; ------
ControlGetText, OutputVar, Static2,%title%
TEMPS_POSI2 := CONVERSIONenSECONDES(OutputVar)
guicontrol ,,TEMPS_POSI2, %TEMPS_POSI2%
SplashTextOn, 100, 20,
SplashTextOff
return
; -------------------------------------------------------------------------------
AFFICHE_TEMPS:
;ControlGetPos, x, y, w, h, %Control%, ahk_id %id%
;ToolTip, = %tempsseconde%
;MsgBox, 4096,, = %tempsseconde%
WinGetTitle, Title, ahk_class MediaPlayerClassicW
StringTrimRight, Title, Title, % StrLen( " - Media Player Classic" ) ; % ; ------
ControlGetText, OutputVar, Static2,%title%
tempsseconde := CONVERSIONenSECONDES(OutputVar)
guicontrol ,,TEMPS_POSIN, %tempsseconde%
guiControlGet ,TEMPS_POSI1
guiControlGet ,TEMPS_POSI2
az = 1 ; nombre de fois
if tempsseconde > %TEMPS_POSI2%
{
send à
Loop
{
ControlSend , #327704, {Left %AZ%}, %title% ;my key for little back
ControlGetText, OutputVar, Static2,%title%
tempsseconde := CONVERSIONenSECONDES(OutputVar)
guicontrol ,,TEMPS_POSIN, %tempsseconde%
guiControlGet ,TEMPS_POSI1
guiControlGet ,TEMPS_POSI2
if tempsseconde < %TEMPS_POSI1%
{
send à
break
}
}
}
return
; ------------------------------------------------------------------
RAZBOUCLE1:
guicontrol ,,TEMPS_POSI1, 0
return
ç::
F4::
F3::
RAZBOUCLE2:
guicontrol ,,TEMPS_POSI2, %TEMPS_TOTAL%
return
; -------------------------------------------------------------------------------
CONVERSIONenSECONDES(OutputVar) {
;MsgBox, 4096,, %OutputVar%`n
StringLen, length, OutputVar
;MsgBox, 4096,, %length%`n
; MsgBox, 4096,, LONGUEUR=%length%`n %OutputVar%
if length >14
{
StringTrimRight, OutputVar, OutputVar, 11
StringRight, OutputVarS, OutputVar, 2
StringTrimRight, OutputVar, OutputVar, 3
StringRight, OutputVarM, OutputVar, 2
StringTrimRight, OutputVar, OutputVar, 3
StringRight, OutputVarH, OutputVar, 2
; MsgBox, 4096,, %OutputVarH%`n%OutputVarM%`n%OutputVarS%`n
}
else
{
StringTrimRight, OutputVar, OutputVar, 8
StringRight, OutputVarS, OutputVar, 2
StringTrimRight, OutputVar, OutputVar, 3
StringRight, OutputVarM, OutputVar, 2
OutputVarH = 0
}
OutputVarH2 := OutputVarH * 3600
OutputVarM2 := OutputVarM * 60
OutputVarS2 := OutputVarS * 1
tempsseconde := OutputVarH2 +OutputVarM2 + OutputVarS2
; MsgBox, 4096,, %OutputVarH%`n%OutputVarM%`n%OutputVarS%`n`n= %tempsseconde%
return %tempsseconde%
}
; -------------------------------------------------------------------------------
F5::
reload
return
F7::
ExitApp
return
GuiClose:
ExitApp
; -------------------------------------------------------------------------------
a little console for make a sample
define the begin and the end of the loop
but not clean
cause i send the <MPC hotkey for back
i prefer to send goto at MPC, but i dontt find how to make that!
do you no if it s possible?
