gpt4 book ai didi

java - 如何使用 Sikuli Java Standalone jar 键入特殊键?

转载 作者:行者123 更新时间:2023-11-30 09:23:53 25 4
gpt4 key购买 nike

Sikuli X我可以使用类似

type("x", KEY_CTRL)

我怎样才能在 Sikuli API 中做同样的事情? ?

最佳答案

我在我的项目中是这样使用的:

Screen screen = new Screen();

screen.click(<your texbox>); // click into textbox to have a cursor there

screen.type("a", KeyModifier.CTRL); // this sends Ctrl+"a" to select all text <- this is what you asked for !
screen.type(Key.BACKSPACE); // this sends Backspace key pressed, i.e. here deletes all selected text

请注意,我同时使用了 KeyModifier 和 Key。这样就成功了。

关于java - 如何使用 Sikuli Java Standalone jar 键入特殊键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15870829/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com