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

查看:29
本文介绍了使用 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:WINDOWSsystem32cmd.exe")
WinWaitActive("C:WINDOWSsystem32cmd.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天全站免登陆