Jump to content

Recommended Posts

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
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
  Reveal hidden contents

 

Posted

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!

  Reveal hidden contents

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

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
Posted

  On 6/27/2012 at 2:58 PM, 'mechaflash213 said:

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?

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

Monkey's are, like, natures humans.

Posted

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!

  Reveal hidden contents

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

Posted (edited)

  On 6/27/2012 at 5:42 PM, 'JohnOne said:

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
Posted (edited)

http://knowyourmeme.com/memes/moar

  Quote

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

  Reveal hidden contents

Posted

  On 6/27/2012 at 5:59 PM, 'JohnOne said:

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

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...