🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #104603

Re: Jak to zrobić w VBS

#104603
From: Przemysław Rachwał
Date: Tue, 13 Apr 2010 19:45
33 lines
1902 bytes
W dniu 2010-04-13 21:22, slawek pisze:
> Chce uruchamiać skryptem program, skrypt jest mniej więcej taki -
> niestety nie jest tak prosto jak w bash, bo nie da się łatwo mieć
> tablicy/listy. Czy można ten skrypt poprawić, aby działał - tzn.
> nieznacznie zmienić, a nie np. rozpisać dane(1)="1.5": dane(2)="2.5" itd.?
>
> function Command(cmd) ' to działa, jest ok
> Dim process
> Set process = shell.Exec("%ComSpec% /c """ & cmd & """")
> Command = process.stdout.ReadAll ' synchroniczne czytanie
> end function
>
> dane = {"1.5","2.5","3.0","5.0","15.0"} '**** w tym miejscu nie działa,
> nie ta składnia, w VBS nie ma takich rzeczy?!
>
> for each d in dane '**** oczywiście i to nie wykona się, jeżeli nie ma
> tablicy dane
> output = "plik-" & d & ".txt"
> Command("echo " & parameters & " | a.exe > " & output)
> next
>
> Wscript.Quit
>
>
> TIA
> slawek
>
>

dane = array("1.5","2.5","3.0","5.0","15.0")

-- 
Przemek
Technical Details
Message-ID: <hq2hl9$8ia$3@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
References: <hq2gvc$da8$1@nemesis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!not-for-mail
From: Przemysław Rachwał <przemyslaw.rachwal@onet.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: Jak to zrobić w VBS
Date: Tue, 13 Apr 2010 21:45:46 +0200
Organization: http://onet.pl
Lines: 33
Message-ID: <hq2hl9$8ia$3@news.onet.pl>
References: <hq2gvc$da8$1@nemesis.news.neostrada.pl>
Reply-To: przemyslaw.rachwal@onet.pl
NNTP-Posting-Host: 91.123.160.178
Mime-Version: 1.0
X-Trace: news.onet.pl 1271187945 8778 91.123.160.178 (13 Apr 2010 19:45:45 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Tue, 13 Apr 2010 19:45:45 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
In-Reply-To: <hq2gvc$da8$1@nemesis.news.neostrada.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit