floker Posted May 15, 2007 Posted May 15, 2007 hi, I'm a newbee on this forum and i'm using AutoIt for only a week. I have to make some scripts at work. I'v downloaded AutoIt from the official site and I make my scripts with ScITE. But I have some problems, there are some commands that don't work. For example I have this in my script : Repeat, 11 Send("{down}{SPACE}") sleep(200) EndRepeat When I trey to run my script I get an error : Repeat, 11 ^ ERROR Error : error parsing function call I have this error also with other commands. It's like some commands are not recognized by the compiler Can someone tell me why? thx
November Posted May 15, 2007 Posted May 15, 2007 hi,I'm a newbee on this forum and i'm using AutoIt for only a week. I have to make some scripts at work. I'v downloaded AutoIt from the official site and I make my scripts with ScITE.But I have some problems, there are some commands that don't work. For example I have this in my script : Repeat, 11 Send("{down}{SPACE}") sleep(200) EndRepeatWhen I trey to run my script I get an error : Repeat, 11^ ERRORError : error parsing function callI have this error also with other commands. It's like some commands are not recognized by the compilerCan someone tell me why? thxHi Repeat command doesnt exist at allTry this: while 1 Send("{down}{SPACE}") sleep(200) wendCheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font]
floker Posted May 15, 2007 Author Posted May 15, 2007 Hi Repeat command doesnt exist at allTry this: while 1 Send("{down}{SPACE}") sleep(200) wendCheersI can't remember where but I'v found a quick reference quide for AutoIt. There it was mentioned that Repeat is also a command. But thx for your help, I'll try with a while loop
James Posted May 15, 2007 Posted May 15, 2007 (edited) Repeat is not a command. Try thisWhile 1 ; Continous Loop For $i = 1 to 11 ; Do something till 1 = 11 Send("{down}{SPACE}") ; Send down and Space sleep(200) ; Sleep Next ; Re-do making $i = 2 Exit ; Exit after it has done something 11 times Wend ; Finish the loopEdit: Repeat was a command in V2 Edited May 15, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
floker Posted May 15, 2007 Author Posted May 15, 2007 Repeat is not a command. Try this While 1 ; Continous Loop For $i = 1 to 11 ; Do something till 1 = 11 Send("{down}{SPACE}") ; Send down and Space sleep(200) ; Sleep Next ; Re-do making $i = 2 Exit ; Exit after it has done something 11 times Wend ; Finish the loop Edit: Repeat was a command in V2 thx, now it works
James Posted May 15, 2007 Posted May 15, 2007 No problem. Glad I could help. See you, Secure Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
floker Posted May 15, 2007 Author Posted May 15, 2007 (edited) I still have a little question. i would like to make a script to automate the installation of some programs. the problem is : for example, during the installation I get a window where I have to put in my organisation and my serial number. So I have something like that : Send("myOrganisation") sleep(200) Send("{TAB}") sleep(200) Send("mySerialNumber") Send("{ENTER}") but when I delete the program and run my script again, my organisation is already filled in and the focus is set to the field where I have to put my serial number in. It meens that the name of my oranisation is filled in instead of my serial number. Can someone help me? Edited May 15, 2007 by floker
James Posted May 15, 2007 Posted May 15, 2007 Hmm, You could make it press Tab untill it gets back to the right control. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
floker Posted May 15, 2007 Author Posted May 15, 2007 Hmm, You could make it press Tab untill it gets back to the right control.that was my first tought, but then I have to make two scripts, one for the first install and one for the second time people want to install it again... this seems a little crazy for me and I hope there is another solution
James Posted May 15, 2007 Posted May 15, 2007 Not really, use If and EndIf statements to read if a text is in the box. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
floker Posted May 16, 2007 Author Posted May 16, 2007 Not really, use If and EndIf statements to read if a text is in the box.thx, great help
James Posted May 16, 2007 Posted May 16, 2007 My pleasure. Glad I could help. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
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