Communication between two computers.

Get help with using AutoHotkey and its commands and hotkeys
x32
Posts: 101
Joined: 25 Nov 2016, 16:44

Communication between two computers.

20 Jul 2018, 14:29

I'm guessing it's not possible to send a message from a script on one computer to a control on a script on another computer. I need to do something similar.

Is there an easy to use networking script or library available? I have done similar functions with ahksock but it's not what I call easy to use.

Any suggestions? Thanks
MannyKSoSo
Posts: 406
Joined: 28 Apr 2018, 21:59

Re: Communication between two computers.

20 Jul 2018, 14:35

It depends if both computers are on the same network or not. If both computers are on the same network and can share folder then you can share them that way. Otherwise you would have to go by a different approach. Maybe take a look at an AHK chat program and see what they are using for reference. But just to clarify are they able to access the same folders or half way across the world
gregster
Posts: 2662
Joined: 30 Sep 2013, 06:48

Re: Communication between two computers.

20 Jul 2018, 14:35

I use the official Bot API of the Telegram messenger to do this, not only between windows computers, but also to trigger things on my computer from my smartphone or tablet, when I am away. If it is easier to use, I don't know :)

Something similar like https://autohotkey.com/boards/viewtopic ... am#p219760 or https://autohotkey.com/boards/viewtopic ... am#p192355 You can send messages from every device that has a Telegram client. The receiving computer will obviously need to run windows, if you want to use AHK. But you can also upload files or images from your computer to your phone, if needed. That get's a little trickier, though, than just text messages :geek:
Last edited by gregster on 20 Jul 2018, 14:43, edited 1 time in total.
x32
Posts: 101
Joined: 25 Nov 2016, 16:44

Re: Communication between two computers.

20 Jul 2018, 14:42

MannyKSoSo wrote:But just to clarify are they able to access the same folders or half way across the world
In the same house, networked together, so yes they share folders.
MannyKSoSo
Posts: 406
Joined: 28 Apr 2018, 21:59

Re: Communication between two computers.

20 Jul 2018, 14:51

This post might be of interest https://autohotkey.com/board/topic/5772 ... r-network/
gregster- Thats an interesting script, going to have to look over that one and see what I can use it for :D
gregster
Posts: 2662
Joined: 30 Sep 2013, 06:48

Re: Communication between two computers.

20 Jul 2018, 15:03

MannyKSoSo wrote:gregster- Thats an interesting script, going to have to look over that one and see what I can use it for :D
Sure, unfortunately the weather was much to good recently, so the project of a complete wrapper class is a bit asleep.
Something you won't find yet on the forum is the part of uploading other things than text (aka text messages) via the Bot API. But I have done it already many times with images - I think other file types will work similarly (as long as they are supported). If, in the future, you are interested in these functions, or you have problems with the API, let me know. I will try to help with what I have already...
x32
Posts: 101
Joined: 25 Nov 2016, 16:44

Re: Communication between two computers.

20 Jul 2018, 15:13

Looks like the messenger script is writing to a text file that the other side reads, correct? I am doing similar now but having one side write to an ini file every second and having the other side read it every second. I was hoping to be able to communicate directly between the two scripts but this may have to do. I was sending the same info with ahksock but it will lock up after a few minutes.

The bot api looks interesting but your examples are above my head. It is something I may try to learn in the near future. Thanks
Freire
Posts: 16
Joined: 10 Dec 2017, 11:30

Re: Communication between two computers.

21 Jul 2018, 23:00

This is a very interesting script, gregster.
I'll also use this to one of my projects.

Return to “Ask For Help”

Who is online

Users browsing this forum: ElDunco, Flipeador, Google [Bot], KamanaMMO, TheBeginner and 187 guests