Jump to content

Recommended Posts

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 post
Share on other sites

??

#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)

 

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to post
Share on other sites

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

Link to post
Share on other sites

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

    No registered users viewing this page.

×
×
  • Create New...