Sign in to follow this  
Followers 0
TraderWill

Basic Script, Programming Illiterate

8 posts in this topic

I need a very simple script. I have three pieces of software running on 3 different PCs, where I duplicate the same tasks simultaneously. Right now, what I'm doing is pressing shift+b on one computer, then moving my hands to another computer, and pressing shift+b, then going to the third PC, and pressing shift+b. If I could press shift+b on just one computer, and have it send that keyboard command to all three computers, I would be very happy. I am not totally helpless when it comes to using a computer, but as far as scripting/programming I know nothing and am overwhelmed with this task, which I intuitively understand to be quite simple. If someone can guide me as to how I would accomplish this, or where to begin the learning process, it would be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites



Use the Send or ControlSend functions. There are some tips in the help file on how to run it on a remote computer.

Share this post


Link to post
Share on other sites

Welcome to the Forums/AutoIt!

Assuming you've at least gotten as far as getting AutoIt/SciTE installed, how to accomplish what you want to do depends on exactly what you're doing and what sort of environment you're in.

Q1. Are you typing in the exact same key combination every time, (shift+;) or does it change?

Q2. What prompts you to perform the key combination? (A window popping up, something else?)

Depending on how you answer Q1 & Q2, you could just look at making a script that uses a While...Wend loop to just wait for whatever usually compels you to do the key combination and then send that key combination(s) using ControlSend or WinActivate, WinWaitActive and Send. This would be the simplest solution although it may not work out this way if what you type in changes constantly.

If what you type in changes constantly then you're going to have to make a "client" script that will reside on each computer and somehow retrieves instructions of what to do, then does it. How each client receives instructions will depend on what sort of environment you're in... The "cleanest" way of accomplishing this would be using TCP functions (Like TCPConnect, TCPSend, TCPRecv) to have the computers "talk" to each other and pass along commands of what to do. The more dirty way of doing it, if you have a shared drive available would be to write out files to a central location that each computer has access to that contain instructions of what to do, then have the client scripts check for those files and if they find them, have them execute them.

Share this post


Link to post
Share on other sites

The software I'm running is trading software, called Sterling. I am running three copies of the sterling simultaneously on three different machines, each logged into a different sub-account of mine. I need to be able to send in an order on all three accounts simultaneously. The keys are the same for each piece of software, so my need is pretty straightforward. I want the option to turn the software off with one key, however, (Capslock?), so that if I only want to send in orders on the one PC I'm executing on, that's fine. But otherwise, I want a series of keys to be broadcast to all the machines; I press shift+b, and enter, and it buys stock in all three accounts by sending all the PCs those keystrokes.

How long might it take to learn enough about AutoIT to do this myself?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I learned autoit more or less in two days moving over from c++ and python.

Everyone learns differently because they approach the language and their first script with different goals. Scripting language on average are easier to learn, so that is a plus.

You'll find the forum people vary in helpfulness, including myself. However, rarely do people just write code on request.

PsaltyDS post in this thread is a fair reaction to a beginner begging for script service. http://www.autoitscript.com/forum/index.php?showtopic=118836&st=0&p=827134&#entry827134

If you are short on time, rent-a-coder is your best bet. If you are not short on time, then "how long" it takes you to learn autoit doesn't really matter. There are a lot of example scripts. If you load up the script editor, you will find example scripts in the program files/autoit/examples folder that you can play with.

From what I can gather, this won't be a 1 hour project if that is what you are after.

Edited by targeter

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Unless I've misread your intentions here, you need three separate scripts, one on each PC. The functions in this category, Network functions Reference of the Helpfile could be used to sync up actions of three computers, as long as they're on the same network..

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

I learned autoit more or less in two days moving over from c++ and python.

Everyone learns differently because they approach the language and their first script with different goals. Scripting language on average are easier to learn, so that is a plus.

You'll find the forum people vary in helpfulness, including myself. However, rarely do people just write code on request.

PsaltyDS post in this thread is a fair reaction to a beginner begging for script service. http://www.autoitscript.com/forum/index.php?showtopic=118836&st=0&p=827134&#entry827134

If you are short on time, rent-a-coder is your best bet. If you are not short on time, then "how long" it takes you to learn autoit doesn't really matter. There are a lot of example scripts. If you load up the script editor, you will find example scripts in the program files/autoit/examples folder that you can play with.

From what I can gather, this won't be a 1 hour project if that is what you are after.

What's a fair amount to ask for having something like this written+ minimal support (initially, until it's debugged, which I can't imagine would take more than one or two iterations).

$200 to me seems like a reasonable offer...

I don't mean to disrespect the community or forum rules by putting this here, if I'm supposed to only post in a classified-type section I apologize!

Share this post


Link to post
Share on other sites

If you are short on time, rent-a-coder is your best bet.

When he said rent-a-coder, he meant to go post on http://www.rentacoder.com (apparently known as vWorker now)

Although unless you have absolutely no time to commit to learning this, it really isn't hard to figure out and you'd be better off for doing so..

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  
Followers 0