Skitty Posted February 2, 2011 Posted February 2, 2011 (edited) My grandpa has a pond (about 40yds away) where we have a tone of fish (talapia) and next to that pond, there's a small 10x10sqr. ft. room with a tv and a computer that controls several pumps and dispensers. The computer is not on the same network but it has internet, what type of connection would I have to implement on the PC in question in order to have it sit there and wait until I launch a script and press a button to turn off/on some of the dispensers? It would be nice to have a program that could automate clicking a button on an existing GUI from another program window that never closes, that way we don't have to walk to it and do it manually every morning and at night. Its an old application and it doesn't come with a timer The connection needed, needs to send a command and depending on what I press, it responds with a script according to the button pressed. I think what I'm looking for is dubed "rat" remote administration tool, is there a different approach I should use? I tried one I found in the help area but it doesn't work since it says its for network based connections. inb4: botnets and B& Edited February 2, 2011 by System238
ChrisL Posted February 2, 2011 Posted February 2, 2011 That script you reffer to might have worked but you need port forwarding and DNS forwarding.By the sounds of it you'd be best looking at a remote access program like TeamViewer [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Skitty Posted February 2, 2011 Author Posted February 2, 2011 That script you reffer to might have worked but you need port forwarding and DNS forwarding.By the sounds of it you'd be best looking at a remote access program like TeamViewerDidn't here about that, thanks.Can't believe it's free, but id still like to script it myself since I'd imagine AutoIt executables are much lighter and and more flexible.This way I could ad a function that upgrades itself with another newer version that I would make. Cause I don't really need to see whats on its screen anyway.
AdmiralAlkex Posted February 2, 2011 Posted February 2, 2011 Internet IS a network .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
ChrisL Posted February 2, 2011 Posted February 2, 2011 Didn't here about that, thanks.Can't believe it's free, but id still like to script it myself since I'd imagine AutoIt executables are much lighter and and more flexible.This way I could ad a function that upgrades itself with another newer version that I would make. Cause I don't really need to see whats on its screen anyway.Then your going to need to look up DNS forwarding... NO-IP.com and learn how to configure port forwarding on your router in your outbuilding, if your opening ports then you better be sure about your security too. [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Skitty Posted February 2, 2011 Author Posted February 2, 2011 Then your going to need to look up DNS forwarding... NO-IP.com and learn how to configure port forwarding on your router in your outbuilding, if your opening ports then you better be sure about your security too.Both are easy, but why do that?
jvanegmond Posted February 2, 2011 Posted February 2, 2011 It would be easy to set up a telnet server written in AutoIt to do what you want. In the past I have made availabele a telnet server skeleton to get you started: Here you can implement commands like:Switch $sBuffer[$x] Case "quit", "q", "exit" ; Closes the server on the remote client TCPCloseSocket($sSocket[$x]) $sSocket[$x] = "" $sBuffer[$x] = "" $iAuth[$x] = 0 Case "pumpon" ; Turn the pump on with some Autoit code here TCPSend($sSocket[$x], "Pump is turned on") Case "pumpoff" ; Turn the pump off with some Autoit code here TCPSend($sSocket[$x], "Pump is turned off") Case Else TCPSend($sSocket[$x], "Invalid command. Valid commands are: pumpon, pumpoff, quit.") EndSwitchYou connect to the server via a telnet client from any operating system and most smartphones. If you think that a telnet server is not powerful enough for you, or you simply don't want to type commands then you can get started with this HTTP server: The downside of the HTTP server is that authentication is not supported in the skeleton like it is in the telnet client. github.com/jvanegmond
ChrisL Posted February 2, 2011 Posted February 2, 2011 Both are easy, but why do that?Based on your earlier questions, that is why, I'll try and elaborate.My grandpa has a pond (about 40yds away) where we have a tone of fish (talapia) and next to that pond, there's a small 10x10sqr. ft. room with a tv and a computer that controls several pumps and dispensers. The computer is not on the same network but it has internet, what type of connection would I have to implement on the PC in question in order to have it sit there and wait until I launch a script and press a button to turn off/on some of the dispensers?The Computer in the outbuilding has an internet connection and is not on a LAN to the house, I assume that the IP address for the internet connection is not static so will require a no-ip type solution to update the DNS records to allow you to have an application in the house that is able to communicate over the internet to the out building computer. The computer in the out building will be behind an adsl router which will require port forwarding configured to allow access to your application in order to accept remote commands from your house computer running the client software that you are going to write.It would be nice to have a program that could automate clicking a button on an existing GUI from another program window that never closes, that way we don't have to walk to it and do it manually every morning and at night. Its an old application and it doesn't come with a timerThe connection needed, needs to send a command and depending on what I press, it responds with a script according to the button pressed. I think what I'm looking for is dubed "rat" remote administration tool, is there a different approach I should use? I tried one I found in the help area but it doesn't work since it says its for network based connections.Everything in this last statement points to you wanting a "network" program that sends commands to the out building on the internet, therefore you are going to be doing all of the things I have previously said.Does that make sense? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Skitty Posted February 2, 2011 Author Posted February 2, 2011 Based on your earlier questions, that is why, I'll try and elaborate.The Computer in the outbuilding has an internet connection and is not on a LAN to the house, I assume that the IP address for the internet connection is not static so will require a no-ip type solution to update the DNS records to allow you to have an application in the house that is able to communicate over the internet to the out building computer. The computer in the out building will be behind an adsl router which will require port forwarding configured to allow access to your application in order to accept remote commands from your house computer running the client software that you are going to write.Everything in this last statement points to you wanting a "network" program that sends commands to the out building on the internet, therefore you are going to be doing all of the things I have previously said.Does that make sense?o.k..
Skitty Posted February 2, 2011 Author Posted February 2, 2011 It would be easy to set up a telnet server written in AutoIt to do what you want. In the past I have made availabele a telnet server skeleton to get you started: Here you can implement commands like: Switch $sBuffer[$x] Case "quit", "q", "exit" ; Closes the server on the remote client TCPCloseSocket($sSocket[$x]) $sSocket[$x] = "" $sBuffer[$x] = "" $iAuth[$x] = 0 Case "pumpon" ; Turn the pump on with some Autoit code here TCPSend($sSocket[$x], "Pump is turned on") Case "pumpoff" ; Turn the pump off with some Autoit code here TCPSend($sSocket[$x], "Pump is turned off") Case Else TCPSend($sSocket[$x], "Invalid command. Valid commands are: pumpon, pumpoff, quit.") EndSwitch You connect to the server via a telnet client from any operating system and most smartphones. If you think that a telnet server is not powerful enough for you, or you simply don't want to type commands then you can get started with this HTTP server: The downside of the HTTP server is that authentication is not supported in the skeleton like it is in the telnet client. Thank you, this gives me a more or less good idea and way to start off!
willichan Posted February 2, 2011 Posted February 2, 2011 Wouldn't it be easier to just write the scripts that will push the appropriate buttons, and schedule them in the Windows Scheduler to handle things in the morning and the evening? That way you don't have to remote to it to do the work either. In essence, you would be making your own timer for the older system. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
Saladin Posted February 2, 2011 Posted February 2, 2011 I was wondering about that above post is right if u just have it on a set time to do a script which would load the program make sure active then push the apprpiate buttons or nothing else control them from autoit its self as i think that it does have ability to use serial ports or usb such things and do it that way.. but then you would not have to actually do anything as stated above other than the setup of the times ... but if such then you would just make a time sheet as to when and when not to do the program(s) also might be able to make it email you or even "IM" you the status over txt msg to your phone(s) so i hope i gave you a few more ideas as to how to go about it as well.. still newb at coding but have tons of ideas just really learning how to code them:(
Jfish Posted February 2, 2011 Posted February 2, 2011 Here is another easier idea for you if you really want a remote control ... Setup a mail client on the older machine. Create a rule so that if an email comes in with subject line of "foobar" then execute "your.exe." You can create as many programs as you want and just send emails to that system to invoke them. It is lower tech but it should work. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
Skitty Posted February 3, 2011 Author Posted February 3, 2011 Wouldn't it be easier to just write the scripts that will push the appropriate buttons, and schedule them in the Windows Scheduler to handle things in the morning and the evening? That way you don't have to remote to it to do the work either. In essence, you would be making your own timer for the older system.As a matter of fact, yes it would, but the machine also controls some lights etc, so my vision was to create a small app that could connect to that pc only from any pc using a usb drive.
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