chrissel Posted July 23, 2009 Share Posted July 23, 2009 Hai all. I'm newbie to AutoIt. I'm using AutoIt to test system performance which I want to stress the system. I wanted to run this script on multiple window which will query over 60000 data. I use While loop for the script to query data. What I want is actually to run the loop in multiple window at the same time. Before the loop in 1st window finish I need to make the other window also running the loop without exiting the loop in 1st window. I'm planning to stress the system with running 10 window simultaneously. Could anyone help me with this? Run("telnet x.x.x.x") WinWaitActive("Telnet x.x.x.x") WinSetTitle("Telnet x.x.x.x","","Admin1");set different title for each 10 window WinActivate("Admin1") WinWaitActive("Admin1") $next = 0 while $next <= 500 $next = $next + 1 ;go to the next data using 'Next' function in the system Send("{ENTER}") WEnd Link to comment Share on other sites More sharing options...
nekkutta Posted July 23, 2009 Share Posted July 23, 2009 are you wanting to stress a server? I hope it's your server, otherwise this could be construed as malicious. best method would be to use an array, that way you can use the same code for each instance of telnet and keep it rather simple. and instead of a while loop use a for loop, alot easier to deal with sequential values. that's as much as I'm going to say until your intentions are a little clearer. [size="2"] "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan[/size] Link to comment Share on other sites More sharing options...
chrissel Posted July 24, 2009 Author Share Posted July 24, 2009 (edited) Thanks nekkutta for the reply. My bad that my post is not that understandable. T_T Actually, I'm planning to stress a system to check its performance. I don't really get what do you mean by using an array? Is it something like putting all the command inside the array? Please correct me if I'm wrong. It's more better if you can post me a simple code to help me understand. Edited July 24, 2009 by chrissel Link to comment Share on other sites More sharing options...
Firstone Posted July 24, 2009 Share Posted July 24, 2009 I don't know how to help u with ur program, but an array is using one variable with numbers instead of using lots of variables eg. Test[0] = 4 Test[1] = a This is an array. Link to comment Share on other sites More sharing options...
herewasplato Posted July 24, 2009 Share Posted July 24, 2009 ... I'm planning to stress the system with running 10 window simultaneously. ...Welcome to the forum. Try something like this:;open and set different title for each 10 window For $i = 1 To 10 Run("telnet x.x.x.x") WinWait("Telnet x.x.x.x") WinSetTitle("Telnet x.x.x.x", "", "Admin" & $i) WinWait("Admin" & $i) Next For $ii = 1 To 500 For $i = 1 To 10 WinActivate("Admin" & $i) WinWaitActive("Admin" & $i) Send("{ENTER}") Next Next [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now