jimmyjmmy Posted October 22, 2008 Share Posted October 22, 2008 Hi, How do I assign the value of 'a' to 'z' to an array? Thanks Link to comment Share on other sites More sharing options...
Zedna Posted October 22, 2008 Share Posted October 22, 2008 Look at For Next Chr() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 22, 2008 Share Posted October 22, 2008 Look at For NextChr()You forgot the RegExp... $avArray = StringRegExp("abcdefghijklmnopqrstuvwxyz", ".", 3) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Zedna Posted October 22, 2008 Share Posted October 22, 2008 You forgot the RegExp... $avArray = StringRegExp("abcdefghijklmnopqrstuvwxyz", ".", 3) Or$avArray = StringSplit("abcdefghijklmnopqrstuvwxyz", "") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
BrettF Posted October 22, 2008 Share Posted October 22, 2008 #include <Array.au3> ;Outputs A-Z Dim $array[26] For $i = 0 to 25 $array[$i] = Chr (65+$i) Next _ArrayDisplay ($array) ;Outputs a-z Dim $array[26] For $i = 0 to 25 $array[$i] = Chr (97+$i) Next _ArrayDisplay ($array) ;Outputs random case. Dim $array[26] For $i = 0 To 25 $cap = Random (0, 1, 1) If $cap = 1 Then $pre = 65 Else $pre = 97 EndIf $array[$i] = Chr ($pre+$i) Next _ArrayDisplay ($array) Cheers, Brett Privacy 1 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
jimmyjmmy Posted October 22, 2008 Author Share Posted October 22, 2008 Thank You so much everybody for the help. Link to comment Share on other sites More sharing options...
spudw2k Posted October 23, 2008 Share Posted October 23, 2008 (edited) Ok, I had to do some performance testing. On my laptop (Celeron 1.7Ghz) here were my results. PsaltyDS' Method Zedna's Method BrettF's Method To be honest, my first attempt looked exactly like BrettF's. I really need to get it in my head to check out the RegExpr functions when I deal with strings; but it appears in this particular case a good 'ol stringsplit does the trick.a_z_test.au3 Edited October 23, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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