-
Notifications
You must be signed in to change notification settings - Fork 119
/
LaunchPidgin.ahk
67 lines (55 loc) · 1.37 KB
/
LaunchPidgin.ahk
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
#include FcnLib.ahk
; /msg chanserv invite #ahk-ops
ExitApp ;TODO COMMENTME turn off pidgin while out of the office
;copypasta from UpdatePidginImStatus.ahk ... should there be a pidgin lib?
RunProgram("C:\Program Files (x86)\Pidgin\pidgin.exe")
while NOT ForceWinFocusIfExist("Buddy List ahk_class gdkWindowToplevel")
{
RunProgram("C:\Program Files (x86)\Pidgin\pidgin.exe")
Sleep, 100
count++
if (count > 1000)
fatalErrord("silent log", "the pidgin window never activated", A_ScriptName, A_LineNumber)
}
;SleepSeconds(10)
;joinIrc("ahk")
;joinIrc("ahk-social")
;joinIrc("dbix-class")
;startGchat("frigg")
;ForceWinFocus("frigg")
;Send, ^!a
ForceWinFocus("Buddy List")
WinClose
ForceWinFocus("ahk_class gdkWindowToplevel")
Send, ^!a
ExitApp
joinIrc(channel)
{
ForceWinFocus("Buddy List")
Send, ^c
ForceWinFocus("Join a Chat")
;ControlSend, , {ALT DOWN}c{ALT UP}, Join a Chat
ss()
Click(460, 100)
ss()
;sometimes i have to change this between != and == (that option changes locations in the dropdown)
if (channel == "dbix-class")
Click(165, 137)
else
Click(165, 115)
ss()
SendRaw, #%channel%
Send, {ENTER}
}
startGchat(user)
{
ForceWinFocus("Buddy List")
Send, ^m
ForceWinFocus("Pidgin")
ss()
Send, %user%{ENTER}
}
ss()
{
sleep 200
}