Cormin Posted January 25, 2017 Share Posted January 25, 2017 I want a variable to select another variable. $queue & $queuenumber = $send So that if $queuenumber = 0 then $queue0 will = $send Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 25, 2017 Moderators Share Posted January 25, 2017 Cormin, Your pseudo-code is pretty close: If $queuenumber = 0 Then $queue0 = $send M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Cormin Posted January 25, 2017 Author Share Posted January 25, 2017 (edited) 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 January 25, 2017 by Cormin Link to comment Share on other sites More sharing options...
zone97 Posted January 25, 2017 Share Posted January 25, 2017 (edited) 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 January 25, 2017 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 More sharing options...
iamtheky Posted January 25, 2017 Share Posted January 25, 2017 with assign? $queue0 = "TEST_FAIL" $send = "TEST_SUCCESS" $queuenumber = 0 Assign("queue" & $queuenumber , $send) msgbox(0, '' , $queue0) Cormin 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Cormin Posted January 25, 2017 Author Share Posted January 25, 2017 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 More sharing options...
iamtheky Posted January 26, 2017 Share Posted January 26, 2017 (edited) 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 January 26, 2017 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) 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