Jump to content

Variable names


Cormin
 Share

Recommended Posts

  • Moderators

Cormin,

Your pseudo-code is pretty close:

If $queuenumber = 0 Then $queue0 = $send

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

22 minutes ago, Melba23 said:

Cormin,

Your pseudo-code is pretty close:

If $queuenumber = 0 Then $queue0 = $send

M23

But I want my queuenumber to be expandable to like 100 at least. So I wanted it to be able to just append the number onto the base $queue variable. Which would make it $queue1, $queue2, $queue3, etc... Is that not possible?

 

Thought I solved it at first but didnt.

Edited by Cormin
Link to comment
Share on other sites

Id use array variables..  $queue[0], $queue[1] .... $queue[100] etc.

That way you can call them like this.

$x = 0

do

.. my compare

$queue[$x] = something

$x=$x+1

Until $x = 100

like that .

Edited by zone97

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

Link to comment
Share on other sites

with assign?

$queue0 = "TEST_FAIL"
 
$send = "TEST_SUCCESS"
$queuenumber = 0
Assign("queue" & $queuenumber , $send)

msgbox(0, '' , $queue0)

 

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

Link to comment
Share on other sites

10 minutes ago, iamtheky said:

with assign?

$queue0 = "TEST_FAIL"
 
$send = "TEST_SUCCESS"
$queuenumber = 0
Assign("queue" & $queuenumber , $send)

msgbox(0, '' , $queue0)

 

Oh this is nice! Okay then now I need to move strings along the queue. I dont think this would work with assign? Lets say queue0 is complete and needs to be replaced with queue1. Then move everything else up.

Sort of like $queue & $queuenumber-1 = $queue and $queuenumber

Link to comment
Share on other sites

that is a different task.  once you get the strings assigned store them in an array.  You could then run item $array[0] and delete it (or look at pop/push depending on what you are trying to do).  Changing the variable name at that point seems tedious.

Edited by iamtheky

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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