vereinfachen

02/07/2011 16:06 maxi39#1
hi,
wie kann man das hier:

PHP Code:
GUICtrlSetData($List2""&$fach[1][1]&"|"&$fach[2][1]&"|"&$fach[3][1]&"|"&$fach[4][1]&"|"&$fach[5][1]&"|"&$fach[6][1]&"|"&$fach[7][1]&"|"&$fach[8][1]&"|"&$fach[9][1]&"|"&$fach[10][1]&"|"&$fach[11][1]&"|"&$fach[12][1]&"|"&$fach[13][1]&"|"&$fach[14][1]&""
so das man net immter neu $fach[][] schreiben muss.
02/07/2011 17:02 omer36#2
müsste gehen

PHP Code:
For $x=0 To 14
GUICtrlSetData
($List2GUICtrlRead($List2) & $fach[$x][1]&"|")
Next 
02/07/2011 17:28 maxi39#3
Quote:
Quote:
ubscript used with non-Array variable.:
GUICtrlSetData($List2, GUICtrlRead($List2) & $fach[$x][1]&"|")
GUICtrlSetData($List2, GUICtrlRead($List2) & $fach^ ERROR
-.-

Feherl gefunden:

Hab den falschen server angeben zum runterladen , rofl. d.h das er die falsche .ini geladen hat und deshalb es gar net diese section mit den arrays gab


€2 geht doch net, selber fehler

€3 geht doch, ab erst ausgelesen dann gedownloadet lol
02/07/2011 17:36 maxi39#4
@omer36 geht net, in der der liste wird nichts angzeigt, aba es gibt keine fehlermeldung

sagen wir es mal so: statt 14 plätze, wird nur der 14. platz in der tabelle angzeigt
02/07/2011 22:00 KDeluxe#5
Wenn ich mich nicht irre (für alle):
PHP Code:
For $x=0 To 14
GUICtrlSetData
($List2$fach[$x][1], True)
Next 
02/07/2011 22:31 maxi39#6
funkt net -.-
02/07/2011 22:32 KDeluxe#7
Poste mal dein Script, dann kann man dir besser helfen.
02/07/2011 22:39 maxi39#8
PHP Code:
[PHP]InetGet("http://maxius12.ma.ohost.de/info/info.ini","C:\info.ini")

$fach IniReadSection("C:\info.ini""Fach")


#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>


$Form1_1 GUICreate("Schule"616556192124)

$List2 GUICtrlCreateList(""3547193188)
GUICtrlSetFont(-184000"Arial")
For 
$x=0 To 14

GUICtrlSetData
($List2$fach[$x][1], True)
Next


GUISetState
(@SW_SHOW)


while 
1

sleep
(200)

Wend 
[/PHP]


mal auf das übelste gekürzt, es soll ja nur seinen zweck erfüllen und in der liste die sachen anzeigen
02/07/2011 23:08 KDeluxe#9
PHP Code:
#include <GUIConstantsEx.au3>

$IniFile = @ScriptDir "\Info.ini"
InetGet("http://maxius12.ma.ohost.de/info/info.ini"$IniFile)
If @
error Then
    MsgBox
(48"Fehler""Die Datei konnte nicht vom Server herunter geladen werden!")
    Exit
EndIf
$Fach IniReadSection($IniFile"Fach")
$Faecher ""


$Form GUICreate("Schule"616556192124)
$List GUICtrlCreateList(""3547193188)
GUICtrlSetFont(-184000"Arial")
For 
$i1 To $Fach[0][0]
    If 
$Fach[$i][1] <> "" Then
        $Faecher 
&= $Fach[$i][1] & "|"
    
EndIf
Next
GUICtrlSetData
($List$Faecher)
GUISetState(@SW_SHOW)


Do
    
Sleep(10)
Until GUIGetMsg() == $GUI_EVENT_CLOSE 
02/08/2011 08:16 maxi39#10
jo das funkt einwandfrei, danke