Variable aus zwei anderen Variablen

Post Reply
MPI.EVA
Posts: 170
Joined: 19. Jun 2008, 15:40
Contact:

Variable aus zwei anderen Variablen

Post by MPI.EVA » 19. Aug 2013, 16:08

Hallo,

ich wuerde gern den Inhalt der Variablen V_1, V_2 und V_3 mit der Hilfe eines Counters ausgeben lassen.
Ich habe schon etliche kombinationen mit %%, %%% usw probiert. Leider habe ich es nicht geschafft die Variable V_* durch den Counter ausgeben zu lassen.

Hat jmd eine Idee?

Code: Select all

[Product]
;#FileCheckMachine, MACHINE
;#FileCheckClient, CLIENT
;ReplaceEnv <Variable>

#Set:Printer
#Set:Product

[Set:Printer]
Set V_1 = printer_office
Set V_2 = printer_guest
Set V_3 = printer_open

[Set:Product]
For Count,1,3,,Set:Output

[Set:Output]
Echo %V_%%Count%%

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 8094
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Variable aus zwei anderen Variablen

Post by Hendrik_Ambrosius » 19. Aug 2013, 16:29

So geht es:

[Set:Output]
set ausgabe=%%V_%Count%%%
ReplaceEnv ausgabe
echo %ausgabe%
Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 5 guests