Gui bei Chat Message +1 Zählen

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

SnowTimeZ0710
Posts: 1
Joined: 20 Aug 2018, 10:44

Gui bei Chat Message +1 Zählen

20 Aug 2018, 10:50

Guten Tag liebe AutoHotkey Community,

ich wollte, dass immer wenn eine bestimmte Chat Message im Spiel GTA:SA erscheint, im GUI +1 gerechnet wird. Leider funktioniert es bei mir nicht wirklich.

#SingleInstance, force
Gui, Show, x30 y40 h610 w960, Counter
Gui, Add, Edit, x10 y10 w50 h20 ReadOnly, %variable%
return

GUIclose:
ExitApp

#Include API.ahk

variable 0
Zähler:
GetChatLine (0, chat)
if (InStr(chat, "SERVER: Graffiti erfolgreich bereinigt (+$15).")
{
variable += 1
}

Könte mir vllt. jemand tipps geben? Danke im Vorraus.

MfG SnowTimeZ
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Gui bei Chat Message +1 Zählen

21 Aug 2018, 09:47

GuiControl

Code: Select all

#SingleInstance, force
Gui, Add, Edit, x10 y10 w50 h20 ReadOnly +HwndhEdit, %variable%
Gui, Show, x30 y40 h610 w960, Counter
return

GUIclose:
ExitApp

#Include API.ahk

variable := 0

Zähler:
	GetChatLine(0, chat)

	if (InStr(chat, "SERVER: Graffiti erfolgreich bereinigt (+$15).")
	{
		variable += 1
		GuiControl, Text, % hEdit, % variable
	}
return

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 53 guests