Jdurant 0 Posted May 14, 2004 What I'm trying to do here is to get a function to input into a var each letter of the alphabet ie: Send, %varalphy% where varalphy = A at first and then B the next time and then C the time after that and so on. Share this post Link to post Share on other sites
bshoenhair 0 Posted May 14, 2004 Not quite sure exactly what you are trying to do but you could use a loop with the StringMid function if you want to enter each letter seperately. Share this post Link to post Share on other sites
ghettochild 0 Posted May 14, 2004 try checking out the count examples Share this post Link to post Share on other sites
brett 0 Posted May 14, 2004 Not quite sure exactly what you are trying to do but you could useĀ a loop with the StringMid function if you want to enter each letter seperately. Does this help? $ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" $Num = 0 While $Num <= 26 $Letter = StringMid( $ABC, $Num, 1) MsgBox(0, "Next Letter is: ", $Letter) $Num = $Num + 1 WEnd -Brett Share this post Link to post Share on other sites
Jdurant 0 Posted May 14, 2004 well, that has the general idea of what I was going for. basiclly repeat, 26 send, %var% endrepeat which would output: var = A the first time var = B the 2nd time var = C the 3rd time Share this post Link to post Share on other sites
brett 0 Posted May 14, 2004 u could just change the msgbox to Send $ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" $Num = 0 While $Num <= 26 $Letter = StringMid( $ABC, $Num, 1) Send ($Letter) $Num = $Num + 1 WEnd -Brett Share this post Link to post Share on other sites
scriptkitty 1 Posted May 14, 2004 (edited) MsgBox(1,"Hello Everyone","I will now count from A to Z") $x="" For $i=1 To 26 tooltip(chr($i+64)) sleep(500) Next Edited May 14, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
scriptkitty 1 Posted May 14, 2004 or $alpha=StringSplit("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z",",") For $i=1 To $alpha[0] MsgBox(1,"Letter "& $i,$alpha[$i],1) Next ;or $alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ" While $alpha<>"" MsgBox(1,"Alternate Method",StringLeft($alpha,1),1) $alpha=StringTrimLeft($alpha,1) Wend AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
Jdurant 0 Posted May 14, 2004 Thanks guys, I'll give these a try and see which one works out best. Again thanks!! Share this post Link to post Share on other sites
trids 2 Posted May 17, 2004 I would instinctively go with ScriptKitty's Chr() option .. but I see StringSplit has a cool feature that allows you to split undelimited strings..$asLetter = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZ","")Cool hey Share this post Link to post Share on other sites
sykes 0 Posted May 17, 2004 $alpha = StringSplit("a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z", "|") $count = 0 While 1 $count = $count + 1 If $count > 26 then exitloop MsgBox(4096, "Results", $alpha[$count]) Wend We have enough youth. How about a fountain of SMART? Share this post Link to post Share on other sites
ezzetabi 3 Posted May 17, 2004 (edited) smallest codification! (yet) For $a = Asc("a") to Asc("z") $Letter = Chr($a) Next Edit: Argh... How stupid... I didn't see the scriptkitty code Still... The shortest anyway. Edited May 17, 2004 by ezzetabi Share this post Link to post Share on other sites
scriptkitty 1 Posted May 17, 2004 only because I put in a sleep. For $i=1 To 26 tooltip(chr($i+64)) sleep(500) Next tooltip display goes too fast without it, This is about my smallest version, of course no display. For $i=65 To 90; use chr($i) for your letter. Next smallest codification! (yet) AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
ezzetabi 3 Posted May 18, 2004 This is about my smallest version, of course no display. For $i=65 To 90; use chr($i) for your letter. NextThe objective was "Rolling Alphabet into a var" so you script is not valid! Without telling that you're code isnt the shortest (yet) I'll change it to make it valid For $i=65 To 90 $l=chr($i) Next Now it is ok... Al the alphabet rolling in a var in only 31 bytes... ok... 33 if you are using @crlf(s) Share this post Link to post Share on other sites
scriptkitty 1 Posted May 18, 2004 ok, got me on that one. Dang technicalities. Think I read the questions? AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites