AHK Chat Program

Post your working scripts, libraries and tools
florisvos
Posts: 20
Joined: 15 Apr 2016, 06:26
Facebook: https://www.facebook.com/floris.vos.77

AHK Chat Program

26 May 2016, 04:05

I made a little chat program with AHK, thought I'd share it with you. It's just the bare essentials, and it has a lot of room for improvement and addition but I'll leave that up to anyone who wants to. I'll probably add some stuff myself later on. If anybody wants tips or explanation or whatever, feel free to ask.

Code: Select all

wb := ComObjCreate("InternetExplorer.Application")
wb.Navigate("https://shrib.com/jFuNbAhbDfYwhLR")
InputBox, name , name
q=0
Gui, Add, Edit, x1 y1 w220 h20 vsubmit
Gui, Show, x131 y91 h172 w210, CHAT
Gui, Add, Button, default gsubmit, Submit
Gui, Add, Edit, x1 w210 h120 vTOTALCHAT
Gui, Submit, nohide
goto LOOP
return
 
SUBMIT:
q=1
Gui, Submit, nohide
GuiControl,, submit, 
sleep 1000
CHATT := name
CHATT .= " says:"
CHATT .= submit
CHATT .= "`n"
CHATT .= wb.document.getelementbyid("igob").value
wb.document.getelementbyid("igob").value := CHATT
GuiControl,, TOTALCHAT, %CHATT%
sleep 3000
q=0
return

LOOP:
loop
{
sleep 2000
if q = 0
{
ding := wb.document.getelementbyid("igob").value
if CHAT != %ding%
{
CHAT := wb.document.getelementbyid("igob").value
GuiControl,, TOTALCHAT, %CHAT%
}
wb.Navigate("https://shrib.com/jFuNbAhbDfYwhLR")
sleep 1000
}
}
 
GuiClose:
wb.Quit
ExitApp
return
 
UPDATE: I found out that scrolling in an edit is really hard. So I changed the script so now it puts the text on top of the edit! Works alot better now! A regular chatbox.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Bing [Bot], Chunjee, electrone77 and 28 guests