Jump to content
Sign in to follow this  
peter123

Make your own Program!

Recommended Posts

peter123

I have one question,

how can I do the code Echo?

I have this program made: programma_s.au3 (but it is in the Netherlands :) )

I need only the Echo tag :S :S

Share this post


Link to post
Share on other sites
jvanegmond

Echo :)

Each language has it's unique set of functions, and Echo is not among the list of AutoIt functions.

Instead, use MsgBox or ConsoleWrite when using SciTe.

Share this post


Link to post
Share on other sites
peter123

can you help me please, it doesn't work if i replace msgbox to consolewrite :s

Share this post


Link to post
Share on other sites
lordofthestrings

I hope this helps..

$var = "Press any key! "
runwait(@ComSpec & " /C echo " & $var & " &  pause>nul")

if FileExists(@ScriptDir & "\test.vbs") Then
    FileDelete(@ScriptDir & "\test.vbs")
EndIf

$TstFile = FileOpen(@ScriptDir & "\test.vbs", 1)
FileWriteLine($TstFile, 'wscript.echo "goodbye cruel world"')
FileWriteLine($TstFile, 'wscript.sleep 2000')
FileClose($TstFile)
runwait('wscript //NOLOGO ' & @ScriptDir & '\test.vbs')
runwait('cscript //NOLOGO ' & @ScriptDir & '\test.vbs')
Edited by lordofthestrings

Share this post


Link to post
Share on other sites
ssubirias3

@lordofthestrings - this seemed like an interesting topic and I was interested to see what your code did. A couple of points for what its worth.

#1 -- UNC paths are not supported. Defaulting to Windows directory. <== Guessing this could be corrected if I mapped a drive letter instead of using UNC paths.

#2 -- I get a Windows Script Host dialog box with the error text "There is no file extension in "<unc path>"."

Share this post


Link to post
Share on other sites
peter123

@lordofstrings, this was not just what i was asking for.

what i want is a program in an autoit3 program and not a vbscript.

Share this post


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
Sign in to follow this  

×