Sign in to follow this  
Followers 0
emoyasha

interactive tree view

1 post in this topic

ok... now i need some help, now it logs in and fetches all contacts for a user, then adds then to a tree view, and i want a user to be able to double click, to bring up a meesage box display the user they clicked, or to be able to right click and select "message" and it bring up a message box with their username. could whoever helps please comment how this is done, i only need a message box because i want help making an action happen based on what user is clicked, i can write the actual messaging and stuff myself.

#include <GUIConstants.au3>
#include <Inet.au3>
#include <string.au3>

AutoItSetOption("MustDeclareVars", 0)
#AutoIt3Wrapper_plugin_funcs = MD5Hash
#AutoIt3Wrapper_plugin_funcs = SHAHash
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("YourSpace Web Messenger", 266, 557, 193, 125)
GUISetCursor (3)
$picloc = IniRead("sets.ini", "prof", "pic", "230221413.jpg")
$usern = IniRead("sets.ini", "prof", "login", "UserName")
$passw = IniRead("sets.ini", "prof", "pass", "")
$pass2 = _StringEncrypt(0, $passw, "yourspace")

$Pic1 = GUICtrlCreatePic($picloc, 80, 56, 116, 116)
$Graphic1 = GUICtrlCreateGraphic(64, 40, 148, 148)
GUICtrlSetColor(-1, 0x1A1A1A)
GUICtrlSetBkColor(-1, 0xA6CAF0)
$User = GUICtrlCreateInput($usern, 56, 208, 153, 21)
$Input2 = GUICtrlCreateInput($pass2, 56, 240, 153, 21, 0x0020)
$login = GUICtrlCreateButton("Log In", 96, 280, 75, 25, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_CENTER ))
$Label1 = GUICtrlCreateLabel("Register For An Account", 72, 368, 120, 17)
$Label2 = GUICtrlCreateLabel("Forgot Your Password?", 72, 400, 114, 17)
$Avi1 = GUICtrlCreateAvi("No File", -1, 16, 448, 233, 81)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $login
            $plH = PluginOpen("MD5Hash.dll")
            $md5 = MD5Hash(GUICtrlRead($Input2), 2, True)
            $md5 = StringLower ( $md5 )
           
           
            PluginClose($plH)
            $login = _INetGetSource("http://notmyspace.info/check2.php?login="&GUICtrlRead($User)&"&pass="&$md5)
            $login = StringSplit($login,"\")
            
           

            if $login[1] = "YES" Then
                $picdl = StringSplit($login[2],".")
                            inetget($login[2], "pic."&$picdl[3])
            IniWrite("sets.ini","prof","pic","pic."&$picdl[3])
            IniWrite("sets.ini","prof","login",GUICtrlRead($User))
            IniWrite("sets.ini","prof","pass",_StringEncrypt(1, GUICtrlRead($Input2), "yourspace"))
                msgbox(64, "Yes", "login sucessfull")
                GUIDelete()
                $Form1 = GUICreate("YourSpace Web Messenger", 266, 557, 193, 125)
GUISetCursor (3)
$treeview = GUICtrlCreateTreeView(-1, -1, 266, 557)
                $contacts   = GUICtrlCreateTreeViewitem("Contacts", $treeview)
                 $cnt = _INetGetSource("http://notmyspace.info/check2.php?act=cont2")
                 $cnt = StringSplit($cnt, " ")
                 $x = UBound($cnt)
                 msgbox(64, "", $x)
                 $y = 1
                
                do
                    
                $contact  = GUICtrlCreateTreeViewitem($cnt[$y], $contacts)
               $y = $y + 1
               
           until $y = $x
           GUISetState(@SW_SHOW)
           While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $contact
            
            EndSwitch
        WEnd
        
           
                Else
                msgbox(64, "No", "login unsucessfull")
            exit
EndIf
    EndSwitch
WEnd

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

Share this post


Link to post
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
Sign in to follow this  
Followers 0