Noobcube Posted February 27, 2010 Posted February 27, 2010 Hi, i would like to make a script what on the first time it will type. texttext A texttext , but when it loops it will be like texttext B texttext and so on, is they a way to do this with autoit? Thanks
Developers Jos Posted February 27, 2010 Developers Posted February 27, 2010 Lookup these functions and have a go: For...Next Chr() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Noobcube Posted February 27, 2010 Author Posted February 27, 2010 On 2/27/2010 at 10:05 PM, 'Jos said: Lookup these functions and have a go:For...NextChr()Thanks ill take a look, im guess the Chr stands for character?
Fubarable Posted February 27, 2010 Posted February 27, 2010 On 2/27/2010 at 10:10 PM, 'Noobcube said: Thanks ill take a look, im guess the Chr stands for character?No need to guess when you have the help file up and running.
dani Posted February 27, 2010 Posted February 27, 2010 (edited) But yes, it stands for character. Check its reference page for more information. Here are all the ASCII codes: Edited February 27, 2010 by d4ni
Noobcube Posted February 27, 2010 Author Posted February 27, 2010 (edited) Looking at the help files i came up with this $text = "" For $i = 97 to 122 Step 1 $text = $text & Chr($i) Next MsgBox(0, "Uppercase alphabet", $text) however this just opens a msg box with abcdefg.... etc. I need it so first time a msg box will show with a, i close it then one with b opens, etc. How would i go about changing my code for this to work? EDIT sleep(2000) $text = "" For $i = 97 to 122 Step 1 send("Text sample , letter $i") Next so far i think this will work, however it types Text sample , letter $i, how do i tell it not to type $a but to find its value if you understand what i mea PS: Thanks d4ni Thanks Edited February 27, 2010 by Noobcube
dani Posted February 27, 2010 Posted February 27, 2010 (edited) For $i = 97 to 122 ; Lowercase = 65 through 90 $text = Chr($i) MsgBox(0, "Uppercase alphabet", $text) Next Although that's not uppercase, it's lowercase Btw, use autoit tags, not code tags ~ edit I didn't see that edit of yours, but to answer the question: Quote so far i think this will work, however it types Text sample , letter $i, how do i tell it not to type $a but to find its value if you understand what i mea PS: Thanks d4ni Thanks The easiest way it to use this: Sleep(2000) For $i = 97 to 122 Send("Text sample , letter " & $i) ; Or you can set AutoitSetOption(ExpandVarStrings, 1) and use "Text sample, letter $i$" -- notice the 2nd $ though. Next Edited February 27, 2010 by d4ni
Noobcube Posted February 27, 2010 Author Posted February 27, 2010 i used sleep(2000) $text = "" For $i = 97 to 122 Step 1 send("Text sample , letter " & $i) Next and it works great thanks i need this for my website, im adding photos to a page, and i have 150+ photos labeled a b c d etc, then aa ab ac so this will speed up my coding no end
Noobcube Posted February 28, 2010 Author Posted February 28, 2010 ive come across another issue, the code i need to send it <td><a href='becciresize/$text$".jpg' target='_new' title='Click to enlarge'> <img src='becciresize/$text$.jpg' width=100 height=75 border=0></a> <br> Photo1</td> however its coming up with the error C:\Users\TomHart0\Desktop\alphabet.au3 (15) : ==> Unterminated string.: send("<td><a href='becciresize/$text$".jpg' target='_new' title='Click to enlarge'> im guessing thats because it has <> in it, is there a way i can get it to type all that out include referencing $text$ to tput the letters a,b,d etc in it thanks
Developers Jos Posted February 28, 2010 Developers Posted February 28, 2010 Show the whole record where you have the error on, but in general: When you need a double quote inside a String that has double quotes at the start end end you need to double them up. eg: this string: test "a" example should be: $test = "test ""a"" example" Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Fulano Posted March 1, 2010 Posted March 1, 2010 On 2/27/2010 at 11:55 PM, 'Noobcube said: i used sleep(2000) $text = "" For $i = 97 to 122 Step 1 send("Text sample , letter " & $i) Next and it works great thanks i need this for my website, im adding photos to a page, and i have 150+ photos labeled a b c d etc, then aa ab ac so this will speed up my coding no end If you are doing this for a website, you might look into learning PHP or another web scripting language. It'll give you much more flexibility for your website, and make your webpage code *much* easier to read. #fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!
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