KillaX Posted January 25, 2008 Share Posted January 25, 2008 Is it possible to use $Slot1 = "91919","Red.jpg" and be able to access only a certain value from it? If not.. Is there a command that acts like this? Just looking for a way to shorten my code up. be even more help full if i could do $Row1 = value1,value2,value3,...,value8 Link to comment Share on other sites More sharing options...
weaponx Posted January 25, 2008 Share Posted January 25, 2008 Dim $array[2] = ["91919","Red.jpg"] ConsoleWrite($array[0]) <--- "91919" ConsoleWrite($array[1]) <--- "Red.jpg" Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 25, 2008 Share Posted January 25, 2008 (edited) Is it possible to use $Slot1 = "91919","Red.jpg" and be able to access only a certain value from it? If not.. Is there a command that acts like this? Just looking for a way to shorten my code up. be even more help full if i could do $Row1 = value1,value2,value3,...,value8 It's called an array. Each element stored in it has a number (index). #include <array.au3> ; just for _ArrayDisplay() Global $Row1 = StringSplit("value1,value2,value3", ",") _ArrayDisplay($Row1, "Debug: $Row1") MsgBox(64, "$Row1[2]", "$Row1[2] = " & $Row1[2]) P.S. Confound those WeaponX bots, they're too fast! Edited January 25, 2008 by PsaltyDS 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...
KillaX Posted January 25, 2008 Author Share Posted January 25, 2008 (edited) Dim $array[2] = ["91919","Red.jpg"] ConsoleWrite($array[0]) <--- "91919" ConsoleWrite($array[1]) <--- "Red.jpg" Thanks, I'll try giving that a shot. my other thing I wanted to know about autoit, Can you ever put 2 things on 1 line? like an example with HTML: <h1>Thing1</h1><h1>thing2</h1> HTML can be used on 1 solid line, but is that possible with autoit? Like what you showed me, array 0 and 1, can that be 1 line? NVM!! I posted this when PsaltyDS didn't post yet! Edited January 25, 2008 by KillaX Link to comment Share on other sites More sharing options...
weaponx Posted January 25, 2008 Share Posted January 25, 2008 Not sure what you mean: Dim $array[2] = ["91919","Red.jpg"] ConsoleWrite($array[0] & "," & $array[1]) <--- "91919","Red.jpg" Link to comment Share on other sites More sharing options...
martin Posted January 25, 2008 Share Posted January 25, 2008 Thanks, I'll try giving that a shot. my other thing I wanted to know about autoit, Can you ever put 2 things on 1 line? like an example with HTML:<h1>Thing1</h1><h1>thing2</h1> HTML can be used on 1 solid line, but is that possible with autoit? Like what you showed me, array 0 and 1, can that be 1 line?NVM!! I posted this when PsaltyDS didn't post yet!If you mean can you put more than one statement on one line, like you can in C then no.Eg in C, C++ you can sayAb = 5; Ac = 6;but in AutoIt you must write$Ab = 5$Ac = 6 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 If you mean can you put more than one statement on one line, like you can in C then no.Eg in C, C++ you can sayAb = 5; Ac = 6;but in AutoIt you must write$Ab = 5$Ac = 6Can't you go $a = 1, $b = 2, $c = 3?? 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...
PsaltyDS Posted January 25, 2008 Share Posted January 25, 2008 Can't you go $a = 1, $b = 2, $c = 3??Yes, but only for variable declaration following the keywords DIM, LOCAL, or GLOBAL. 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...
martin Posted January 25, 2008 Share Posted January 25, 2008 (edited) Yes, but only for variable declaration following the keywords DIM, LOCAL, or GLOBAL. ..and Const, and Redim. Edited January 25, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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