Innovative Posted May 19, 2008 Posted May 19, 2008 Clicked on the connect button , but nothing came out =.= This is the frequent problem im having.. expandcollapse popup#include <GUIConstants.au3> #include <Constants.au3> #include <IE.au3> #include <inet.au3> #include <Array.au3> Opt("GUIDataSeparatorChar", @LF) ; Some people have | in their names.. Ex.: Manadar|Away Opt("TrayMenuMode", 1) ; 1 = no default menu - I need this later Opt("TrayOnEventMode", 1) Opt("GUIOnEventMode", 1) Opt("GUIResizeMode", $GUI_DOCKAUTO) Global $Target_IP = _INetGetSource("http://xandaire.no-ip.org/bu/GETIP.php") Global $sock, $version = 0.1 Global $port = 6667 $GUIOpt = GUICreate("Connect to XandaireAssist", 225, 223) GUISetOnEvent($GUI_EVENT_CLOSE, "_Opt_Close") ; Start of Login Informations GUICtrlCreateGroup("Login Information", 5, 5, 215, 105) GUICtrlCreateLabel("Username :", 15, 28, 52, 17) $InputUsername = GUICtrlCreateInput("", 75, 25, 126, 21) GUICtrlCreateLabel("Password :", 15, 55, 52, 17) $InputPassword = GUICtrlCreateInput("", 75, 55, 126, 21) $ButtonRegister = GUICtrlCreateButton("Register", 15, 80, 55, 20) $ButtonConnect = GUICtrlCreateButton("Connect", 85, 80, 55, 20) ; End of Login Informations GUICtrlCreateGroup("Application Options", 5, 115, 215, 105) $CheckboxMultiple = GUICtrlCreateCheckbox("Multiple Assist Connection", 15, 130) $CheckboxSkipUpdate = GUICtrlCreateCheckbox("Skip Application Update (premium)", 15, 150) $CheckboxRemotely = GUICtrlCreateCheckbox("Assist connected System (premium)", 15, 170) $CheckboxConnectState = GUICtrlCreateCheckbox("Connect anonymously (premium)", 15, 190) GUICtrlSetState($CheckboxConnectState, $GUI_DISABLE) GUICtrlSetState($CheckboxSkipUpdate, $GUI_DISABLE) GUICtrlSetState($CheckboxRemotely, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $ButtonConnect MsgBox(0, "", "") EndSwitch WEnd
zackrspv Posted May 19, 2008 Posted May 19, 2008 (edited) Clicked on the connect button , but nothing came out =.= This is the frequent problem im having.. expandcollapse popup#include <GUIConstants.au3> #include <Constants.au3> #include <IE.au3> #include <inet.au3> #include <Array.au3> Opt("GUIDataSeparatorChar", @LF) ; Some people have | in their names.. Ex.: Manadar|Away Opt("TrayMenuMode", 1) ; 1 = no default menu - I need this later Opt("TrayOnEventMode", 1) Opt("GUIOnEventMode", 1) Opt("GUIResizeMode", $GUI_DOCKAUTO) Global $Target_IP = _INetGetSource("http://xandaire.no-ip.org/bu/GETIP.php") Global $sock, $version = 0.1 Global $port = 6667 $GUIOpt = GUICreate("Connect to XandaireAssist", 225, 223) GUISetOnEvent($GUI_EVENT_CLOSE, "_Opt_Close") ; Start of Login Informations GUICtrlCreateGroup("Login Information", 5, 5, 215, 105) GUICtrlCreateLabel("Username :", 15, 28, 52, 17) $InputUsername = GUICtrlCreateInput("", 75, 25, 126, 21) GUICtrlCreateLabel("Password :", 15, 55, 52, 17) $InputPassword = GUICtrlCreateInput("", 75, 55, 126, 21) $ButtonRegister = GUICtrlCreateButton("Register", 15, 80, 55, 20) $ButtonConnect = GUICtrlCreateButton("Connect", 85, 80, 55, 20) ; End of Login Informations GUICtrlCreateGroup("Application Options", 5, 115, 215, 105) $CheckboxMultiple = GUICtrlCreateCheckbox("Multiple Assist Connection", 15, 130) $CheckboxSkipUpdate = GUICtrlCreateCheckbox("Skip Application Update (premium)", 15, 150) $CheckboxRemotely = GUICtrlCreateCheckbox("Assist connected System (premium)", 15, 170) $CheckboxConnectState = GUICtrlCreateCheckbox("Connect anonymously (premium)", 15, 190) GUICtrlSetState($CheckboxConnectState, $GUI_DISABLE) GUICtrlSetState($CheckboxSkipUpdate, $GUI_DISABLE) GUICtrlSetState($CheckboxRemotely, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $ButtonConnect MsgBox(0, "", "") EndSwitch WEnd Why are you using ONEVENTMODE and GUIGETMESSAGE? From help File: If the GUIOnEventMode option is set to 1 then the return from GUIGetMsg is always 0 and the @error is set to 1. If the option GUIEventOptions is set to 1 the minimize, restore and maximize button will not do any action on the window just a simple notification. This code works: expandcollapse popup#include<GUIConstantsEx.au3> #include<Inet.au3> Opt("GUIDataSeparatorChar", @LF); Some people have | in their names.. Ex.: Manadar|Away Opt("TrayMenuMode", 1); 1 = no default menu - I need this later Opt("TrayOnEventMode", 1) Opt("GUIResizeMode", $GUI_DOCKAUTO) Global $Target_IP = _INetGetSource("http://xandaire.no-ip.org/bu/GETIP.php") Global $sock, $version = 0.1 Global $port = 6667 $GUIOpt = GUICreate("Connect to XandaireAssist", 225, 223) ; Start of Login Informations GUICtrlCreateGroup("Login Information", 5, 5, 215, 105) GUICtrlCreateLabel("Username :", 15, 28, 52, 17) $InputUsername = GUICtrlCreateInput("", 75, 25, 126, 21) GUICtrlCreateLabel("Password :", 15, 55, 52, 17) $InputPassword = GUICtrlCreateInput("", 75, 55, 126, 21) $ButtonRegister = GUICtrlCreateButton("Register", 15, 80, 55, 20) $ButtonConnect = GUICtrlCreateButton("Connect", 85, 80, 55, 20) ; End of Login Informations GUICtrlCreateGroup("Application Options", 5, 115, 215, 105) $CheckboxMultiple = GUICtrlCreateCheckbox("Multiple Assist Connection", 15, 130) $CheckboxSkipUpdate = GUICtrlCreateCheckbox("Skip Application Update (premium)", 15, 150) $CheckboxRemotely = GUICtrlCreateCheckbox("Assist connected System (premium)", 15, 170) $CheckboxConnectState = GUICtrlCreateCheckbox("Connect anonymously (premium)", 15, 190) GUICtrlSetState($CheckboxConnectState, $GUI_DISABLE) GUICtrlSetState($CheckboxSkipUpdate, $GUI_DISABLE) GUICtrlSetState($CheckboxRemotely, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $ButtonConnect MsgBox(0, "", "") Case $GUI_EVENT_CLOSe Exit EndSwitch WEnd Edited May 19, 2008 by zackrspv -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë ë§§ëñ§ë øƒ !ïƒë.
Innovative Posted May 19, 2008 Author Posted May 19, 2008 Look at this , i just cant get over TCPAccept While 1 $msg = GUIGetMsg() Switch $msg Case $ButtonConnect GUICtrlDelete($ButtonRegister) GUICtrlDelete($ButtonConnect) GUICtrlCreateLabel("Status : Checking login informations..", 15, 80) TCPStartup() $s_ConnectSocket = TCPConnect($Target_IP, $port) MsgBox(0, "", "Over connect - "& $s_ConnectSocket &"") TCPSend($s_ConnectSocket, "<connect>" & _INetGetSource("http://whatismyip.org")) $MainSocket = TCPListen(@IPAddress1, 6666) MsgBox(0, "", "Over listen - "& $MainSocket &"") Do $ConnectedSocket = TCPAccept($MainSocket) Until $ConnectedSocket <> -1 MsgBox(0, "", "Over accept")
zackrspv Posted May 19, 2008 Posted May 19, 2008 Look at this , i just cant get over TCPAccept While 1 $msg = GUIGetMsg() Switch $msg Case $ButtonConnect GUICtrlDelete($ButtonRegister) GUICtrlDelete($ButtonConnect) GUICtrlCreateLabel("Status : Checking login informations..", 15, 80) TCPStartup() $s_ConnectSocket = TCPConnect($Target_IP, $port) MsgBox(0, "", "Over connect - "& $s_ConnectSocket &"") TCPSend($s_ConnectSocket, "<connect>" & _INetGetSource("http://whatismyip.org")) $MainSocket = TCPListen(@IPAddress1, 6666) MsgBox(0, "", "Over listen - "& $MainSocket &"") Do $ConnectedSocket = TCPAccept($MainSocket) Until $ConnectedSocket <> -1 MsgBox(0, "", "Over accept") IDK, to me that Do/Until loop looks wrong lol but then, i'm no expert as im sure many MVP's would say *sighs*, but hey i'm getting there. From the Help File: ; look for client connection ;-------------------- While 1 $ConnectedSocket = TCPAccept( $MainSocket) If $ConnectedSocket >= 0 Then msgbox(0,"","my server - Client Connected") exit EndIf Wend Maybe change your do loop to: Do $ConnectedSocket = TCPAccept($MainSocket) Until $ConnectedSocket >= 0 MsgBox(0, "", "Over accept")[/autoit] I tested your connect code and created a 2nd autoit file to connect back to my @ipaddress on port 666 and it went over that, so perhaps those changes will work for you. -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë ë§§ëñ§ë øƒ !ïƒë.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now