AutoHotkey

. ; ; ; , ; .
www.autohotkey.com

“ ”, , .

IP-TV Player Channel Changer

, IP-TV Player. , . (1 ), . , «Enter» .
zip-.
: 1.08
: 2011-01-01
: 1658 ()
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*
IP-TV Player
Big Digger

• Windows XP/Vista/7
• AutoHotkey v1.0.48.05 http://www.autohotkey.com/download/
• IP-TV Player v0.28.1.8814 http://borpas.info/iptvplayer
*/

#NoEnv
#SingleInstance, Force
SetTitleMatchMode, 3
DetectHiddenWindows, On

GroupAdd, IpTvPlayerGroup, ahk_class IpTvPlayerMainWndClass
GroupAdd, IpTvPlayerGroup, ahk_class IpTvPlayerVideoWndClass

Menu, Tray, Tip, IP-TV Player Channel Changer

Return


IpTvChannelChange:
SetTimer, IpTvChannelChange, Off
PostMessage, 0x111, ChannelNumber + 4186, 0, , ahk_class IpTvPlayerMainWndClass ; WM_COMMAND
ChannelNumber =
Return

#IfWinActive, ahk_group IpTvPlayerGroup
$0::
$1::
$2::
$3::
$4::
$5::
$6::
$7::
$8::
$9::
$Enter::
$Numpad0::
$Numpad1::
$Numpad2::
$Numpad3::
$Numpad4::
$Numpad5::
$Numpad6::
$Numpad7::
$Numpad8::
$Numpad9::
$NumpadEnter::
$vkBFsc035::
If A_ThisHotkey in $Enter,$NumpadEnter,$vkBFsc035
{
IfEqual, ChannelNumber,
SendInput, % "{" . SubStr(A_ThisHotkey, 2) . "}"
Else If A_ThisHotkey in $Enter,$NumpadEnter
SetTimer, IpTvChannelChange, -1
}
Else
{
ChannelNumber .= SubStr(A_ThisHotkey, 0)
SendMessage, 0x146, 0, 0, obj_COMBOBOX1, ahk_class IpTvPlayerMainWndClass ; CB_GETCOUNT
ChannelCount := ErrorLevel >= 1 ? ErrorLevel - 1 : 0
While, ChannelNumber > ChannelCount
StringTrimRight, ChannelNumber, ChannelNumber, 1
If ChannelNumber between 0 and %ChannelCount%
{
IfWinExist, ahk_class IpTvPlayerVideoWndClass
ControlGet, ControlHwnd, Hwnd, , obj_STATIC2
Else
{
ControlGetText, ControlText, obj_STATIC4
If ControlText contains IP-TV Player
ControlGet, ControlHwnd, Hwnd, , obj_STATIC38
Else
ControlGet, ControlHwnd, Hwnd, , obj_STATIC3
}
ControlGetPos, , , , Height, , ahk_id %ControlHwnd%
ControlMove, , , , Height * 2, , ahk_id %ControlHwnd%
Control, Hide, , , ahk_id %ControlHwnd%
ControlSetText, , %ChannelNumber%, ahk_id %ControlHwnd%
Control, Show, , , ahk_id %ControlHwnd%
If (ChannelCount < ChannelNumber * 10 or StrLen(ChannelCount) = StrLen(ChannelNumber))
SetTimer, IpTvChannelChange, -1
Else
SetTimer, IpTvChannelChange, 1000
}
}
Return

Copyleft 2009 Big Digger Valid XHTML 1.0 Transitional Valid CSS!