topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 10:49 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Ability to select multiple windows and send keyboard input to all of them  (Read 27407 times)

gottadoit

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 45
    • View Profile
    • Donate to Member
It would be really nice to be able to have several windows and be able to send all keyboard input to them at the same time
This would be most useful to have several terminal emulation windows open to several hosts and perform the same changes on all
(ie: select a number of windows quickly and easily)

There are other situations where you might also want to have a notepad window open to keep track of everything you type, and in that case you might want to be able to say to send the keyboard input to the foreground window as well as the notepad window.

In both cases it would also be very useful if text pasted from the clipboard also went to the selected destination windows
This is so that I can have something similar to pconsole or fanterm [linux] to use under Windows

There is quite a useful description of functionality for a little tool like this on the Putty website
See http://www.chiark.gr...terminal-fanout.html

It would be great if the windows under control were tagged in a visible way to indicate that they are part of a set

Thanks

NB: A way I have seen other utilities like this work is to have their own "input" window that you can type in so that the keystrokes are directed to all of the child windows
« Last Edit: July 17, 2006, 02:10 AM by gottadoit »

gottadoit

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 45
    • View Profile
    • Donate to Member
Seeing as there doesn't seem to be too much interest in doing one for me, can someone that knows a little about AHK give me some pointers on whether this is feasible to do and a pointer or two ?

Thanks

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
I'm sorry i can't do this right now.
But i'm sure that if Skrommel comes around, he should do it in no time.
Anyway, if you'd like to give it a try yourself, you could start by the Send command and the Inputbox command. The first will allow you to send text to a specified window, and the latter will allow you to easily input text.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
After all i did get some time to do this. Lets hope it's what you expected.

MultipleSend v1.0 created 29-07-2006:
Send the same text to several windows at the same time
[Forum Topic][.ahk Version][.exe Version]

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 632
    • View Profile
    • Donate to Member
jgpavia you are beautiful :)

I just tested your "little script" and it works pretty well.  I used EditPad Lite and evolvED to create new blank documents.  I started you ahk script, selected the two editor windows and started typing. 

There is a slight delay between sending and having control back, which makes sense.

There are two minor things I offer for improvement:
1) Add a "Continue" button on your splash screen.  It took me a while to figure out that I needed to close it to continue.
2) It might be cool to have a checkbox on the text sumission box to allow sending CRLF or not.
I might not want to send that at each line end.... My thought is that it would be check to send CRLF and would be the default.  If I unchecked it, it would just send the text w/o CRLF and I would append the line.

Nice job jg   :Thmbsup:
Insert Brilliant Sig line here

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
There is a slight delay between sending and having control back, which makes sense.
Yes, that's the time it takes to send to all controls, i think i can't make that not happen.

There are two minor things I offer for improvement:
1) Add a "Continue" button on your splash screen.  It took me a while to figure out that I needed to close it to continue.
Oops.. Right, i'll do that!

2) It might be cool to have a checkbox on the text sumission box to allow sending CRLF or not.
Yes, i have to find a way to do that. I think the normal way to do it would be to have it not send the raw text. This would allow you to write `n and it'd work as a CRLF.

I'm glad it works well! :D

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Ok, now it works like this:

If the 2 first characters in the phrase are '\\', it'll send the text using ahk's map. This means that the following phrase:
\\!{f4}
Will close the active window. And the next one:
\\hi there{enter}
Will send "hi there" followed by a {enter} key press.

Notice that with this method, to send a literal '!' or a  literal '%' or a literal '^' or any other characters used by ahk, you'll have to escape them ( `! , `% and `^ ).

As long as the two first characters aren't \\, it'll behave exactly as expected.
For more info about what can be used in the \\ method, check the table on This page.

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 632
    • View Profile
    • Donate to Member
Oh now that IS cool!

I can send special characters, etc. now...

great modification.   :Thmbsup: :Thmbsup: :Thmbsup:
Insert Brilliant Sig line here

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
After all i did get some time to do this. Lets hope it's what you expected.

MultipleSend v1.0 created 29-07-2006:
Send the same text to several windows at the same time
[Forum Topic][.ahk Version][.exe Version]

Upssss
AVG detect .exe file as threat. I download anyway.
 :-*

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Upssss
AVG detect .exe file as threat. I download anyway.
 :-*
It really saddens me that antivirus programs just lazily flag anything written in autohotkey as viruses :(

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I put in exceptions some days ago.
 :P

MohsenEman

  • Participant
  • Joined in 2017
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Dude, the exe is not on the server.....Could you re upload??? or tell how convert your ahk to exe? Thanks in advance

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Dude, the exe is not on the server.....Could you re upload??? or tell how convert your ahk to exe? Thanks in advance

This how to run the AHK file:

You need to install AHK (AutoHotKey). The install version is here (I'm using a portable version myself):
https://www.autohotkey.com/download/

Then run the *.AHK file. Should show in the systray.

PS I not sure how to complile it -- have a search -- probably using AHK.exe as well
Tom