Jump to content

Connection to a remote server to specific port


Recommended Posts

Hi,

Is it possible to connect by using AutoIt script to a certain server and to a certain port and to send ascii data? This would be nice, if it could - thus I wouldn't need to use my VB application to do it (it basically uses winsock control to do it).

I have this project where I am controlling my other computer in my lan, by sending ascii commands by using vb applications (client and server).

The client's actions (which it sends to the vb server application in other computer in my lan) are controlled by an AutoIt script. When the server gets an ascii command from vb client application, it launches pre defined compiled autoit executable. Both of these computers are running a certain game, thus both computers are kind of stressed. So if I could get rid of those vb applications (at least) it might make the concept bit simpler at least - and would perhaps run bit smoother (two autoit scripts running in loop in both computers - communicating with each other).

Link to comment
Share on other sites

That's really interesting. I'd love to do that. But I don't have a client-server environment. Maybe in the future...

To answer your question: I don't think AutoIt can send information over the Web.

Currently AutoIt can only download files from the Web.

Link to comment
Share on other sites

If you network the two computers so that they can both access the same directory as a shared folder, you could have them put information you need to transfer in a file (such as a text or ini file) and have the 2nd script on the other computer pick up this information and use it. So basically both scripts would loop doing their stuff, and, when required, placing a file in the shared folder. Of course, both would also have to be watching for a new file from the other script.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

If you network the two computers so that they can both access the same directory as a shared folder, you could have them put information you need to transfer in a file (such as a text or ini file) and have the 2nd script on the other computer pick up this information and use it.  So basically both scripts would loop doing their stuff, and, when required, placing a file in the shared folder.  Of course, both would also have to be watching for a new file from the other script.

I was starting to work on a script to upload the calendar to a website embedded in a exe so the director can download it at his home and check the schedule.

This is because I read VPN for Dummies and was too stupid to understand it - jeez

Rick

Link to comment
Share on other sites

I don't think AutoIt can send information over the Web.

Currently AutoIt can only download files from the Web.

Not directally, but you can send data through an FTP tunnel with nifty manipulation of the FTP command. Using the -s:filename switch, you could FileInstall a script with a list of FTP commands to use, and run a hidden command prompt to run FTP with that file as a paramater for the -s switch. That would allow you to send files to an FTP server, even if you wanted to use a password. Just be careful with sensitive passwords, since a smart user could either stop the script after it installs the file of FTP commands, or copy it before you delete it.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

  • 1 year later...

Hi,

Is it possible to connect by using AutoIt script to a certain server and to a certain port and to send ascii data? This would be nice, if it could - thus I wouldn't need to use my VB application to do it (it basically uses winsock control to do it).

I have this project where I am controlling my other computer in my lan, by sending ascii commands by using vb applications (client and server).

The client's actions (which it sends to the vb server application in other computer in my lan) are controlled by an AutoIt script. When the server gets an ascii command from vb client application, it launches pre defined compiled autoit executable. Both of these computers are running a certain game, thus both computers are kind of stressed. So if I could get rid of those vb applications (at least) it might make the concept bit simpler at least - and would perhaps run bit smoother (two autoit scripts running in loop in both computers - communicating with each other).

<{POST_SNAPBACK}>

If I maybe so bold, I think what you need is to use and application called PSEXEC to do a remote call to the other computer, telling it to run the Autoit script on the server side.
Link to comment
Share on other sites

TCP Functions...You may want to have some type of authentication with it, say, the first text recieved is user|password, and then run any text sent straight into a command prompt Run(@Comspec & " /c")

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
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...