使用AutoIT将消息回显到命令提示符? [英] Echo Message to Command Prompt using AutoIT?

查看:229
本文介绍了使用AutoIT将消息回显到命令提示符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用AutoIT将变量的内容回显到命令提示符?我要做的就是在命令提示符下显示一条消息.

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}")

推荐答案

您需要将变量放在引号之前,然后对其求值:

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

send($message & "{ENTER}")

这篇关于使用AutoIT将消息回显到命令提示符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆