【发布时间】:2018-01-11 10:49:38
【问题描述】:
我想创建一个宏:
- 允许用户在图像上进行多个矩形选择
- 将所有矩形的坐标保存在文本文件中。
我可以这样做,但只能使用一个对话框,用户必须单击“确定”才能继续他的选择。但我希望它很快,所以没有对话框。
while (flags&rightButton==0){
makeRectangle(424, 333, 194, 151);
waitForUser("Adjust your rectangle");
getBoundingRect(x, y, width, height);
wait(1000);
getCursorLoc(x, y, z, flags);
print(x,y,width,height);
}
感谢您的帮助!
巴斯蒂安
【问题讨论】:
-
您能否展示用于实现当前结果的代码?
-
这是我当前的代码。但确实效率不高! while (flags&rightButton==0){ makeRectangle(424, 333, 194, 151); waitForUser("调整你的矩形"); getBoundingRect(x, y, width, height);等待(1000); getCursorLoc(x, y, z, 标志);打印(x,y,宽度,高度); }
-
介意将其格式化为edit 来回答问题吗?