自动化 MATLAB 和 LTspice

自动化 MATLAB 和 LTspice

我正在使用 MATLAB 和 LTspice。我必须编写一个脚本来自动化这两个软件,方式如下:1. 将 MATLAB 的输出文件输入到 LTspice。2. 将 LTspice 输出结果插入回 MATLAB 文件。

如何编写这些自动化脚本?

答案1

我这样理解对吗?LTspice 是一个只能在 wine 下运行且没有任何命令行界面的 Windows 程序。我对 MATLAB 和 LTspice 都不太了解,但我非常怀疑在这种情况下是否有任何方法可以编写应用程序脚本。如果我错了,我很乐意得到纠正!

编辑

我能想到的最好的办法是按键自动化,我用xdotool它来做这件事,例如

xdotool key --window 11 alt+r # sends ALT+R to window with id 11
xdotool type 'random text' # types "random text" in current window
xdotool mousemove 50 50 click 1 mousemove restore # moves mouse to 50 50, performs a left click and returns cursor to previous position 

更多信息请阅读xdotool 的手册页– “您还可以编写仅执行 xdotool 的脚本”!

相关内容