jaydeep Posted January 29, 2010 Share Posted January 29, 2010 i have made a program which can allow to remotely control your computer via the internet from any place...the problem is that i connect to the internet via a wireless network which is subnetted from a common ip... like my ip is 111.231.213.124 and after subnetting it becomes... 192.168.1.2 so whenever i try to connect to my comoputer, iam unable to reach it..because the subnetted ip is local to the wireless network ..also if i try to connect to the main ip.. then also iam unable to do so... please tell me about a way to connect to my computer in this case via tcp... Link to comment Share on other sites More sharing options...
trancexx Posted January 29, 2010 Share Posted January 29, 2010 Port forwarding. Google the term if you don't know how or what. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
jaydeep Posted January 29, 2010 Author Share Posted January 29, 2010 please elaborate how iam going to use that in autoit Link to comment Share on other sites More sharing options...
trancexx Posted January 29, 2010 Share Posted January 29, 2010 Show some progress. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
jaydeep Posted January 29, 2010 Author Share Posted January 29, 2010 sir its basic..gui based tcp connection with simple codes... here is the code... expandcollapse popup#include <GUIConstantsEx.au3> #include <GUIStatusBar.au3> $mainwindow=GUICreate("remote pc controller",500, 300) $button1=GUICtrlCreateButton("CDTrayopen",30,50,60) $button2=GUICtrlCreateButton("CDTrayclose",100,50,60) $button3=GUICtrlCreateButton("connect",180,50,60) $button4=GUICtrlCreateButton("disconnect",260,50,60) $status= _GUICtrlStatusBar_Create($mainwindow) $Input1 = GUICtrlCreateInput("give ip here",50,100,100,20) _GUICtrlStatusBar_SetText($status,@IPAddress1) GUISetState(@SW_SHOW) While 1 _GUICtrlStatusBar_SetText($status,@IPAddress1) $msg=GUIGetMsg() If $msg=$button3 then $ip=GUICtrlRead($Input1) TCPStartup() $port=1000 $connectedsocket=TCPConnect($ip,$port) If @error Then _GUICtrlStatusBar_SetText($status,"cant connect check ip or connection") sleep(1000) Else _GUICtrlStatusBar_SetText($status,"connected") while 1 _GUICtrlStatusBar_SetText($status,"connected to "&$ip) $msg2=GUIGetMsg() If $msg2=$button1 Then TCPSend($connectedsocket,"1") _GUICtrlStatusBar_SetText($status,"send command 1") sleep(1000) EndIf If $msg2=$button2 Then TCPSend($connectedsocket,"2") _GUICtrlStatusBar_SetText($status,"sent command 2") sleep(1000) EndIf If $msg2=$button4 Then TCPSend($connectedsocket,"3") sleep(1000) ;TCPShutdown() _GUICtrlStatusBar_SetText($status,"disconnected") sleep(1000) ExitLoop EndIf WEnd EndIf EndIf If $msg= -3 Then Exit EndIf WEnd u just enter the ip and connect ... it works well on a normal internet connection but in case of a subnetted ip from a main network /...like a wireless internet connection.., it is not able to connect... which is relevant since here all computer share a local main ip... which is subnetted... Link to comment Share on other sites More sharing options...
gruntydatsun Posted July 9, 2010 Share Posted July 9, 2010 Jay is talking about port forwarding on your router. Link to comment Share on other sites More sharing options...
LarryDalooza Posted July 9, 2010 Share Posted July 9, 2010 Your wireless router has a web page for configuration. Point a browser to http://192/168.1.1 and configure forwarding of the TCPConnect "port" to 192.168.1.2 Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
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