2016-04-03 30 views
2

Yazdığım bu hibrid [Toplu/VBScript] (inspired by this code) daktilo gibi bir şey simüle etmek amacıylaAynı satırda daktilo gibi nasıl yazılır?

!

Ama aynı satırda bir daktilo gibi nasıl yazabileceğimizi anlayamıyorum?

@echo off 
Set Message=Hi ! StackOverFlow ! 
@cScript.EXE //noLogo "%~f0?.WSF" "%Message%" //job:info %~nx0%* 
pause 
<job id="info"> 
<script language="VBScript"> 
strText=wscript.arguments(0) 
intTextLen = Len(strText) 
intPause = 100 
For x = 1 to intTextLen 
    strTempText = Mid(strText,x,1) 
    wscript.echo strTempText 
    WScript.Sleep intPause 
    If intPause <= 500 Then 
     intPause = intPause + 100 
    Else 
     intPause = 100 
    End If 
Next 
</script> 
</job> 
+0

Şaşırtıcı buluyorum ki, verdiğiniz cevaplarla [bu] bunu sormanız gerekecektir. – Lankymart

cevap

4

StdOut akışına yazmalısınız.

str = "hello world!" 
For i = 1 To Len(str) 
    WScript.StdOut.Write Mid(str, i, 1) 
    WScript.Sleep 50 
Next 
+0

Çok teşekkürler! beklediğim gibi çalışıyor! – Hackoo

İlgili konular