Echo Message to Command Prompt using AutoIT?

不羁的心 提交于 2019-12-12 15:13:46

问题


How do I echo the contents of a variable, to the command prompt, using AutoIT? All I want to do is display a message in the command prompt.

Run("C:\WINDOWS\system32\cmd.exe")
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
$message = 'Type: "edit file_name.ext" to create or edit a file'
send("$message {ENTER}")

回答1:


You need to put the variable before the quote, then it gets evaluated:

send($message & "{ENTER}")


来源:https://stackoverflow.com/questions/14790266/echo-message-to-command-prompt-using-autoit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!