Sign in to follow this  
Followers 0
Unc3nZureD

Question realted to arrays

11 posts in this topic

#1 ·  Posted (edited)

Hi guys,

So, currently I've got an array, exactly this one:

$Dlls[$Count][1]

Now I just want to replace it's contect without changing the 'name' of it. I mean to let me able to call it as $Dlls[$Count][1], not something different.

Could somebody explain me which way can I do it?

(Tried simply $Dlls[$Count][1] = "xy", but it doesn't work. maybe I failed something?)

Edited by Unc3nZureD

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

By the looks of it, you're in a loop? If you could share MOAR code that would be great. What you did should work if this is the case.

Edited by mechaflash213

Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

If you use $Dlls[$Count][1] = "xy", depending upon what values $count is at the time, then the contents of the array $dlls in element $Count and subelement 1 will contain xy. What is it you're trying to change exactly?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

okay, I'm here again. so:

for example

$Count = 1

msgbox(0,"",$Dlls[$Count][1]) returns "apple.dll"

Now I just want the following thing:

$Count = 0
While 1
    $Count = $Count + 1
    If $Dlls[$Count][1] = "apple.dll" Then $Dlls[$Count][1] = "grapefruit.dll"
    msgbox(0,"",$Dlls[$Count][1])
    If $Count = $Dlls[0][0] Then ExitLoop
WEnd
Edited by Unc3nZureD

Share this post


Link to post
Share on other sites

By the looks of it, you're in a loop? If you could share MOAR code that would be great. What you did should work if this is the case.

Ok, here's you bite.

Why do you keep writing the word "moar" in your posts and emphasising it?

Do you think it's cool or something?

1 person likes this

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Try this and tell me what it gives you as the final msgbox text?

Global $dlls[12][2]
$dlls[0][0] = 11
For $I = 1 To 10
     $dlls[$I][1] = "avocado.dll"
Next
$dlls[11][1] = "apple.dll"

$Count = 1
While 1
     $Count = $Count + 1
     If $dlls[$Count][1] = "apple.dll" Then $dlls[$Count][1] = "grapefruit.dll"
     MsgBox(0, "", $dlls[$Count][1])
     If $Count = $dlls[0][0] Then ExitLoop
WEnd

It should return grapefruit.dll as the last message box you see.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Ok, here's you bite.

Why do you keep writing the word "moar" in your posts and emphasising it?

Do you think it's cool or something?

Sorry, but I don't really know what "moar" is. I tried a translator, but nothing :D Could u tell it a different way?

---------------

BrewManNH:

Quite strange. In this enviroment it works simply. But if I insert into my code it does nothing. Okay let me check my source If I failed something

Edited by Unc3nZureD

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

http://knowyourmeme.com/memes/moar

1. A combination of “more” and “roar”. 2. An order bellowed to a forum to remedy the bellower’s insufficient pr0n collection.

*definition 2 is funnier than any usage of the word itself, imho.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

I think some kids like to spell things stupidly intentionally and the word was meant to be "more"

just a meme lol. And it's true, I do have an insufficient pr0n collection. But this is by choice :D


Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0