![]() |
|
REG QUERY - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: REG QUERY (/Thread-REG-QUERY) |
RE: REG QUERY - ArkPhaze - 05-18-2013 Example of a pseudo batch script array: Code: @echo off & setlocal enabledelayedexpansion
set i=1
for /l %%? in (1,1,10) do (
set arr!i!=Value!i!
set /a i=!i!+1
)
:: YOU WOULD LOOP THESE VALUES
:: THIS IS JUST FOR PROOF
echo.
echo %arr1%
echo %arr2%
echo %arr3%
echo %arr4%
echo %arr5%
echo %arr6%
echo %arr7%
echo %arr8%
echo %arr9%
echo %arr10%
echo.
:: LOOPING EXAMPLE
for /l %%? in (1,1,10) do (
echo arr%%? = !arr%%?!
)
echo.
pauseThat's usually what I do... RE: REG QUERY - ArkPhaze - 05-18-2013 Example of a pseudo batch script array: Code: @echo off & setlocal enabledelayedexpansion
set i=1
for /l %%? in (1,1,10) do (
set arr!i!=Value!i!
set /a i=!i!+1
)
:: YOU WOULD LOOP THESE VALUES
:: THIS IS JUST FOR PROOF
echo.
echo %arr1%
echo %arr2%
echo %arr3%
echo %arr4%
echo %arr5%
echo %arr6%
echo %arr7%
echo %arr8%
echo %arr9%
echo %arr10%
echo.
:: LOOPING EXAMPLE
for /l %%? in (1,1,10) do (
echo arr%%? = !arr%%?!
)
echo.
pauseThat's usually what I do... RE: REG QUERY - noize - 05-18-2013 (05-18-2013, 09:51 AM)ArkPhaze Wrote: Example of a pseudo batch script array: Yeah, I'd use this for more than 9 args, using the SHIFT command, but might you tell me something about "%%?" ? I've never seen it. RE: REG QUERY - noize - 05-18-2013 (05-18-2013, 09:51 AM)ArkPhaze Wrote: Example of a pseudo batch script array: Yeah, I'd use this for more than 9 args, using the SHIFT command, but might you tell me something about "%%?" ? I've never seen it. RE: REG QUERY - ArkPhaze - 05-18-2013 You've never seen people using %%? before? What about %%#? You could even use %%$, but I probably wouldn't recommend that lol. RE: REG QUERY - ArkPhaze - 05-18-2013 You've never seen people using %%? before? What about %%#? You could even use %%$, but I probably wouldn't recommend that lol. RE: REG QUERY - noize - 05-18-2013 (05-18-2013, 10:37 AM)ArkPhaze Wrote: You've never seen people using %%? before? What about %%#? Is it just another parameter like %%j could be? Quote:You could even use %%$, but I probably wouldn't recommend that lol. Lol, I think I don't get why. RE: REG QUERY - noize - 05-18-2013 (05-18-2013, 10:37 AM)ArkPhaze Wrote: You've never seen people using %%? before? What about %%#? Is it just another parameter like %%j could be? Quote:You could even use %%$, but I probably wouldn't recommend that lol. Lol, I think I don't get why. RE: REG QUERY - ArkPhaze - 05-18-2013 Think about tokens.
RE: REG QUERY - ArkPhaze - 05-18-2013 Think about tokens.
|