hiho ich hab mal wieder en komischen bug und zwar muss ich wenn man einmal auf advanced options klickt und dieses GUI wieder schließt alle anderen buttons im main_GUI mehrmals drücken bis was passiert...
2. wüsste ich noch gerne wie man eine File durchsucht also in irgendeiner zeile sollte stehen
exec connect.cfg
wenn das nicht dasteht soll er diese zeile reinschreiben wenn sie schon in der textdatei drinsteht soll er einfach garnix machen...
geht das über ne schleife indem ich quasi sage wenn line 1 <> exec connect.cfg nimm line 1 + 1 oder so, also halt einfach die nächste
Spoiler anzeigen
#include
#include
#include
;MsgBox(0, "BLA", @WorkingDir)
AutoItSetOption("WinTitleMatchMode", 2)
$main = GUICreate( "Half-Live TV Client by FireFlyer", 450, 225, 100, 100)
GUICtrlCreateLabel( "This is a help to configure your HLTV Proxy", 10, 8, 300, 20)
GUICtrlCreateLabel( "You can get more help when you drive with your mouse over the text", 10, 25, 350, 20)
Dim $record
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$servercfg = FileReadLine( "connect.cfg", 1)
$pwcfg = FileReadLine( "connect.cfg", 2)
$demo = FileReadLine( "connect.cfg", 3)
$record2 = StringLeft( $demo, 6)
$servercfg2 = StringMid( $servercfg, 9)
$pwcfg2 = StringMid( $pwcfg, 16)
$demo2 = StringMid( $demo,
GUICtrlCreateLabel( "Server IP:", 10, 53, 100, 20)
$server = GUICtrlCreateInput( $servercfg2, 120, 50, 150, 20)
GUICtrlCreateLabel( "(Example: 85.214.40.16:27100)", 275, 53, 200, 20)
GUICtrlCreateLabel( "Serverpassword:", 10, 83, 100, 20)
$serverpw = GUICtrlCreateInput( $pwcfg2, 120, 80, 150, 20)
GUICtrlCreateLabel( "(Example: Password)", 275, 83, 200, 20)
GUICtrlCreateLabel( "Demoname:", 10, 112, 100, 20)
$demoname = GUICtrlCreateInput( $demo2, 120, 110, 150, 20)
;GUICtrlCreateLabel( "(Example: Name)", 275, 112, 200, 20)
$record = GUICtrlCreateCheckbox( "Record Demo", 280, 112, 100, 20)
$start = GUICtrlCreateButton( "Start HLTV", 10, 175, 75, 25)
$end = GUICtrlCreateButton( "End HLTV", 90, 175, 75, 25)
$folder = GUICtrlCreateButton( "Demo-Folder", 170, 175, 75, 25)
$options = GUICtrlCreateButton( "Advanced Options", 250, 175, 110, 25)
$exit = GUICtrlCreateButton( "Exit", 365, 175, 75, 25)
GUISetState(@SW_SHOW, $main)
$optionen = GUICreate( "Half-Live TV Advanced Options by FireFlyer", 450,500,300,300)
;LABELS
GUICtrlCreateLabel( "Here you can modify the most important options", 10, 10, 300, 15)
GUICtrlCreateLabel( "\\Name-Settings", 10, 40, 100, 15)
GUICtrlCreateLabel( "Name", 10, 60, 100, 15)
GUICtrlCreateLabel( "Hostname", 10, 80, 100, 15)
GUICtrlCreateLabel( "\\Password-Settings", 10, 110, 100, 15)
GUICtrlCreateLabel( "Admin-Password", 10, 130, 100, 15)
GUICtrlCreateLabel( "Server-Password", 10, 150, 100, 15)
GUICtrlCreateLabel( "Proxy-Password", 10, 170, 100, 15)
GUICtrlCreateLabel( "Spectator-Password", 10, 190, 100, 15)
GUICtrlCreateLabel( "\\Connection-Settings", 10, 220, 100, 15)
GUICtrlCreateLabel( "Rate", 10, 240, 100, 15)
GUICtrlCreateLabel( "Updaterate", 10, 260, 100, 15)
GUICtrlCreateLabel( "MaxRate", 10, 280, 100, 15)
GUICtrlCreateLabel( "MaxLoss", 10, 300, 100, 15)
;INPUTS
GUISetState(@SW_HIDE, $optionen)
Func GetPos()
$a = GUIGetCursorInfo($main)
;_ArrayDisplay($a)
Select
Case not @error And $a[4] = "5" ;server IP
ToolTip("This is the IP where the HLTV Proxy will connect on")
Case not @error And $a[4] = "8" ;server PW
ToolTip("If the GameServer is password-protected type the password in here")
Case not @error And $a[4] = "11" ;DemoName
ToolTip("Demos will be saved with the NAME-YYMMDDhhmm-map.dem")
Case Else
ToolTip("")
EndSelect
EndFunc ;==>GetPos
While 1
GetPos()
$server2 = GUICtrlRead( $server, 1)
$serverpw2 = GUICtrlRead( $serverpw, 1)
$demoname2 = GUICtrlRead( $demoname, 1)
If $demoname2 = "" Then
GUICtrlSetState( $record, $GUI_UNCHECKED)
Else
GUICtrlSetState( $record, $GUI_CHECKED)
EndIf
$msg1 = GUIGetMsg($main)
$msg2 = GUIGetMsg($optionen)
Select
Case $msg2 = $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
Case $msg1 = $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
Case $msg1 = $exit
Exit
Case $msg1 = $end
WinActivate("HLTV")
If WinActive ("HLTV") Then
Send( "exit")
sleep(300)
Send( "{ENTER}")
Else
MsgBox(0, "Error", "HLTV is not opened")
EndIf
Case $msg1 = $start
FileDelete( "connect.cfg" )
FileWriteLine ( "connect.cfg", "connect "&$server2)
FileWriteLine ( "connect.cfg", "serverpassword "&$serverpw2)
If GuiCtrlRead($record) = $GUI_CHECKED Then
FileWriteLine ( "connect.cfg", "record "&$demoname2)
Else
;NOTHING
EndIf
sleep(100)
run( "hltv.exe")
sleep(500)
Send( "exec connect.cfg")
sleep(500)
Send("{Enter}")
sleep(200)
WinSetState("HLTV", "", @SW_MINIMIZE)
Case $msg1 = $folder
run( @Windowsdir&"\explorer.exe "&@WorkingDir&"\cstrike")
Case $msg1 = $options
GUISetState(@SW_SHOW, $optionen)
EndSelect
WEnd
[/autoit]PS: falls da sonst noch sinnlose sachen von mir drin sind einfach mal sagen </Array.au3></File.au3></GUIConstants.au3>
THX & MFG Fire</Array.au3></File.au3></GUIConstants.au3></Array.au3></File.au3></GUIConstants.au3>