Deye Posted May 17, 2021 Share Posted May 17, 2021 I want to somehow string out the command that will add cols from 0 to 2 with SRER (im gussing) which will run with "execute" Thanks #include <Array.au3> Local $array[0][4], $b = "," _ArrayAdd($array, "soda,pop,cola", 0, $b) ; the usual way i'd do it _ArrayAdd($array, $array[0][0] & $b & $array[0][1] & $b & $array[0][2] & $b & "Added", 0, $b) _ArrayDisplay($array) ;One liner $AddToCols = "0-2" ;~ .. Link to comment Share on other sites More sharing options...
Gianni Posted May 17, 2021 Share Posted May 17, 2021 ?? #include <Array.au3> Local $array[0][4], $b = "," _ArrayAdd($array, "soda,pop,cola", 0, $b) ; the usual way i'd do it _ArrayAdd($array, $array[0][0] & $b & $array[0][1] & $b & $array[0][2] & $b & "Added", 0, $b) _ArrayDisplay($array) ;One liner $AddToCols = "0-2" ;~ .. ; ?? Local $iPeekRow = 0 _ArrayAdd($array, _ArrayToString($array, $b, $iPeekRow, $iPeekRow, '', 0, 2) & $b & "Added2", 0, $b) _ArrayDisplay($array) Deye 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Deye Posted May 18, 2021 Author Share Posted May 18, 2021 I was hasty to think that i could somehow cause SRER to loop and create a string like if using _StringRepeat, Even if it was possible, it could not be an elegant one liner ,So on the same notion i will dismiss this idea for now Thanks JockoDundee 1 Link to comment Share on other sites More sharing options...
JockoDundee Posted May 18, 2021 Share Posted May 18, 2021 When I first saw this post I thought “eh, seems tough, maybe later”. but then the pot was sweetened with: 5 hours ago, Deye said: Even if it was possible, it could not be an elegant one liner... Well played, sir! Code hard, but don’t hard code... 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