Sign in to follow this  
Followers 0
Dubler

2 Questions - array and "image update"

7 posts in this topic

#1 ·  Posted (edited)

Hi,

my first question is:

How get pools from 1 line to var? for example:

[0]|xxxx|2c|qw|xc|sz|

[1]|yyyy|ra|qz|zx|cx|

[2]|zzzz|12|as|zc|cv|

[3]|sada|za|zx|vz|xz|

i wan't to count all lines in array and after click a button, select first line to var:

$x = "xxxx" 
$1 = "2c" 
$2 = "qw"
$3 = "xc"
$4 = "sz"

then some code... and after next click again but with selected second line

part of code:

Local $avArray[10][6]

$avArray[0][0] = "W jakiej gałęzi chemii prekursorką była Maria Skłodowska-Curie?"
$avArray[0][1] = "chemia organiczna"
$avArray[0][2] = "radiochemia"
$avArray[0][3] = "chemia analityczna"
$avArray[0][4] = "chemia fizyczna"
$avArray[0][5] = "2"
.........

$string = _ArrayToString($avArray[0][0]) wan't work

Second Question is:

How to update image .bmp in Gui?

i want something like CtrlDataSet($image1, "img/Image1.bmp"

Edited by Dubler

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

UBound() for 'count all lines in array'

'How to update image .bmp in Gui?'

GUICtrlSetImage

For the 'and after next click again but with selected second line'

Can you explain one more time what are you trying?

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

i want create a quiz game (for better marks in school)

@up

then some code... and after click "Next Question button" i want to change my questions and radios again but with vars from second line etc.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You edited, to get the data from second row of a array you only need to use its array name and index number

for example msgbox(0,"",$avArray[0][4])

If you know the array number of rows or anything you can simply loop till the end and add data to some var

eg.

you have 4 rows in array (you know that using UBound())

dim $tempwar

for $x = 0 to 3;or for $x = 0 to UBound()
$tempwar = $tempwar&$avArray[0][$x]
next
msgbox(0,"",$tempwar)

but i still think i dont understand the end result you need

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Ok so you dim array

every time someone click button set some temp var to go +1

eg.

dim $count

on click of a button

$count += 1

this will set that war to +1 every time you click button

to pull the data, for example

msgbox(0,"",$avArray[0][$count])

or

msgbox(0,"",$avArray[$someotherwar][$count])

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

thx, it works! plz close this topic.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

No need to close it, change only the topic title in the first post, and add to it [solved] and thats it :)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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