Jump to content

List-help


Recommended Posts

I've got a problem with a list. the one on the right ("profile") works fine, but the upper one ("nachrichten") doesn't work.

does anyone know why???

(i'm using BETA)

#include <GUIConstants.au3>
#include <INet.au3>
#include <md5.au3>
Global $logstring, $msgtxt, $autor[300],$sendto,$gprofile, $gsend, $gmsgtxt, $email, $gmsglist
$logstring = 0
$autall = ""
$oldlist = ""
$mailput = RegRead("HKEY_CURRENT_USER\Software\sbc",@username)
GUICreate("Scratchbook Client",550,550,-1,-1)
$label1 = GUICtrlCreateLabel("Email:",170,203)
$email = GUICtrlCreateInput($mailput,225,200,150,20)
$label2 = GUICtrlCreateLabel("Passwort:",170,227)
$pw = GUICtrlCreateInput("",225,225,150,20,$ES_PASSWORD)
$logmein = GUICtrlCreateButton("OK",265,250,60)
$loading = GUICtrlCreateLabel("",245,300,200,100)
    GUICtrlSetFont(-1,12,600)
GUISetState()
_yourein()

do
$msg = GUIGetMsg()

If $msg = $logmein then _login(GUICtrlRead($email),_md5(GUICtrlRead($pw)))
If $msg = $gsend then _sendmsg(GUICtrlRead($sendto),GUICtrlRead($gmsgtxt))
If GUICtrlRead($sendto) <> $oldlist then
    $oldlist = GUICtrlRead($sendto)
    _profileswitch($oldlist)
Endif
TrayTip("",GUICtrlRead($gmsglist),1)

until $msg = $GUI_EVENT_CLOSE

Func _login($email,$pw)
$logstring = "http://www.scratchbook.ch/sbc.php?email=" & $email & "&pw=" & $pw
If _INetGetSource("http://www.scratchbook.ch/sbc.php?email=" & $email & "&pw=" & $pw) <> "" then _yourein()
Endfunc

Func _sendmsg($sendto,$msgtxt)
$sendmail = Iniread(@scriptdir & "\autlist.ini","autmails",$sendto,"")
$msgtxt = Stringreplace($msgtxt,@crlf,"[crlf]")
;censored-send-stuff...
GUICtrlSetData($gmsgtxt,"")
Endfunc

Func _profileswitch($oldlist)
GUICtrlSetData($gprofile,$oldlist)

EndFunc

Func _yourein()
GUICtrlSetData($loading,"Loading...")
RegWrite("HKEY_CURRENT_USER\Software\sbc",@username,"REG_SZ",GUICtrlRead($email))
FileWrite(@scriptdir & "\autlist.ini",_INetGetSource("http://www.scratchbook.ch/sbc.php?getautlist"))
for $x = 1 to Iniread(@scriptdir & "\autlist.ini","autnum","autnum",1)
    $autor[$x] = Iniread(@scriptdir & "\autlist.ini","autnum",$x,"error")
    $autall = $autall & $autor[$x] & "|"
next
$autall = StringTrimRight($autall,1)
GUICtrlDelete($label1)
GUICtrlDelete($email)
GUICtrlDelete($label2)
GUICtrlDelete($pw)
GUICtrlDelete($logmein)
GUICtrlDelete($loading)
$label1 = GUICtrlCreateLabel("Profile",5,10,100,25)
    GUICtrlSetFont(-1,12,800)
$sendto = GUICtrlCreateList("",5,35,135,500,0x00200001)
    GUICtrlSetData(-1,$autall)
$gprofile = GUICtrlCreateLabel("<-- Wähle ein Profil",145,10,390,20,0x01)
    GUICtrlSetFont(-1,12,800)
$label2 = GUICtrlCreateLabel(" Nachrichten:",145,35,400,410,BitOr($SS_SIMPLE,$SS_SUNKEN))
    GUICtrlSetFont(-1,10,600)
$gmsglist = GUICtrlCreateList("",150,55,390,110,$LBS_NOTIFY)
    GUICtrlSetData(-1,"asdf1|asdf2|asdf3")
$label3 = GUICtrlCreateLabel(" Details:",145,170,400,350)
    GUICtrlSetFont(-1,10,600)
$gmsgdisp = GUICtrlCreateEdit("",150,185,390,235,0x1804)
    GUICtrlSetBkColor(-1,0xFFFFFF)
$greply = GUICtrlCreatebutton("reply",435,422,50,20)
$gdismiss = GUICtrlCreatebutton("dismiss",490,422,50,20)
$gmsgtxt = GUICtrlCreateEdit("",145,460,345,80,0x1004)
$gsend = GUICtrlCreateButton("send",495,460,50,80)
Endfunc
Link to comment
Share on other sites

Replace this line:

$label2 = GUICtrlCreateLabel(" Nachrichten:",145,35,400,410,BitOr($SS_SIMPLE,$SS_SUNKEN))

with:

$label2 = GUICtrlCreateLabel(" Nachrichten:",145,35,400,21,BitOr($SS_SIMPLE,$SS_SUNKEN))

The height of the label is overlapping the list.

Link to comment
Share on other sites

label sizes were too large..

replae with this

$label1 = GUICtrlCreateLabel("Profile",5,10,100,25)
    GUICtrlSetFont(-1,12,800)
$sendto = GUICtrlCreateList("",5,35,135,500,0x00200001)
    GUICtrlSetData(-1,$autall)
$gprofile = GUICtrlCreateLabel("<-- Wähle ein Profil",145,10,390,20,0x01)
    GUICtrlSetFont(-1,12,800)
$label2 = GUICtrlCreateLabel(" Nachrichten:",145,35,400,20,BitOr($SS_SIMPLE,$SS_SUNKEN))
    GUICtrlSetFont(-1,10,600)
$gmsglist = GUICtrlCreateList("",150,55,390,110,$LBS_NOTIFY)
    GUICtrlSetData(-1,"asdf1|asdf2|asdf3")
$label3 = GUICtrlCreateLabel(" Details:",145,170,400,20)
    GUICtrlSetFont(-1,10,600)
$gmsgdisp = GUICtrlCreateEdit("",150,185,390,235,0x1804)
    GUICtrlSetBkColor(-1,0xFFFFFF)
$greply = GUICtrlCreatebutton("reply",435,422,50,20)
$gdismiss = GUICtrlCreatebutton("dismiss",490,422,50,20)
$gmsgtxt = GUICtrlCreateEdit("",145,460,345,80,0x1004)
$gsend = GUICtrlCreateButton("send",495,460,50,80)

8)

OK___M SO >>> I GOT SOME COFFEE.... and was just a little late

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...