Jump to content
Sign in to follow this  
DraikSword

Please help me to control over 10 applications at time...

Recommended Posts

DraikSword

Hi all.

I wrote code to copy each line of text file and sent that sentence to another application by using _ClipBoard_SetData and ControlSend ^v (Ctrl + V). My script works well but it just sends to each window at time but I have over 10 windows need to be sent at the same time. I think I can make 10 scripts to control 10 windows but it isn't a good idea.

I've searched in google and this forum for times. People said that there're some solutions such as: hook; dll; multithread (Autoit doesn't support) or use another language to code (like C++)... I'm newbie and have just begun study coding, it's really hard for me to know which is the best solution for my problem. Moreover, Autoit is easy to understand and pratice more than C++. Anyone can show me how to solve my problem in Autoit. Thank so much.

And if Autoit can't do this truely, please show me another way. It's wonderful if you give me a small example. Thank for your help.

Share this post


Link to post
Share on other sites
martin

Hi all.

I wrote code to copy each line of text file and sent that sentence to another application by using _ClipBoard_SetData and ControlSend ^v (Ctrl + V). My script works well but it just sends to each window at time but I have over 10 windows need to be sent at the same time. I think I can make 10 scripts to control 10 windows but it isn't a good idea.

I've searched in google and this forum for times. People said that there're some solutions such as: hook; dll; multithread (Autoit doesn't support) or use another language to code (like C++)... I'm newbie and have just begun study coding, it's really hard for me to know which is the best solution for my problem. Moreover, Autoit is easy to understand and pratice more than C++. Anyone can show me how to solve my problem in Autoit. Thank so much.

And if Autoit can't do this truely, please show me another way. It's wonderful if you give me a small example. Thank for your help.

No matter how you write the code or in what language I don't think you will ever get the text sent to 10 windows at the same time. Multithreading isn't really running all processes at the same time so I doubt that even a multithreading language would do the job significantly faster than AutoIt. All you need to do is just have a loop

For $iN = 0 to 9
 ControlSend($WinHandle[$iN],"",$iID[$iN],$sText)
Next

If you have written the applications whose windows you want to send text to then there are other ways which could be faster. I suppose the questions are, how fast is it at the moment, what problem does that cause and how fast does it need to be?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
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
Sign in to follow this  

×