powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / имитировать нажатие клавиш юзером
8 сообщений из 8, страница 1 из 1
имитировать нажатие клавиш юзером
    #32652698
Всем Привет!
У меня вопрос:
Как можно имитировать нажатие клавиш юзером (под windows) в коде, так чтобы другая программа поймала и отреагировала, на пример на сочетание клавиш ctrl+enter или alt+s.

Я знаю что это возможно, но как не знаю.
Помогите пожалуйста кто может - очень важно для проекта.

Спасибо
...
Рейтинг: 0 / 0
Период между сообщениями больше года.
имитировать нажатие клавиш юзером
    #33270442
GlukOza
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Поднимаю тоже вопрос. А все же как?
...
Рейтинг: 0 / 0
имитировать нажатие клавиш юзером
    #33270464
GlukOza
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Или, другое, как обработать пункт меню программой ...
...
Рейтинг: 0 / 0
имитировать нажатие клавиш юзером
    #33270471
java.awt.Robot


/**
* This class is used to generate native system input events
* for the purposes of test automation, self-running demos, and
* other applications where control of the mouse and keyboard
* is needed. The primary purpose of Robot is to facilitate
* automated testing of Java platform implementations.
* <p>
* Using the class to generate input events differs from posting
* events to the AWT event queue or AWT components in that the
* events are generated in the platform's native input
* queue. For example, <code>Robot.mouseMove</code> will actually move
* the mouse cursor instead of just generating mouse move events.
* <p>
* Note that some platforms require special privileges or extensions
* to access low-level input control. If the current platform configuration
* does not allow input control, an <code>AWTException</code> will be thrown
* when trying to construct Robot objects. For example, X-Window systems
* will throw the exception if the XTEST 2.2 standard extension is not supported
* (or not enabled) by the X server.
* <p>
* Applications that use Robot for purposes other than self-testing should
* handle these error conditions gracefully.
*
* @version 1.27, 12/19/03
* @author Robi Khan
* @since 1.3
*/
...
Рейтинг: 0 / 0
имитировать нажатие клавиш юзером
    #33270481
GlukOzaИли, другое, как обработать пункт меню программой ...
программой...
...
Рейтинг: 0 / 0
имитировать нажатие клавиш юзером
    #33270530
GlukOza
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
гость из прошлого GlukOzaИли, другое, как обработать пункт меню программой ...
программой...

Вы не проснулись? Извините...
...
Рейтинг: 0 / 0
имитировать нажатие клавиш юзером
    #33270604
GlukOzaВы не проснулись? Извините...

Проснулся! Извинения принимаются!
...
Рейтинг: 0 / 0
имитировать нажатие клавиш юзером
    #33270668
GlukOza
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
выбирающий солнечное утроjava.awt.Robot


/**
* This class is used to generate native system input events
* for the purposes of test automation, self-running demos, and
* other applications where control of the mouse and keyboard
* is needed. The primary purpose of Robot is to facilitate
* automated testing of Java platform implementations.
* <p>
* Using the class to generate input events differs from posting
* events to the AWT event queue or AWT components in that the
* events are generated in the platform's native input
* queue. For example, <code>Robot.mouseMove</code> will actually move
* the mouse cursor instead of just generating mouse move events.
* <p>
* Note that some platforms require special privileges or extensions
* to access low-level input control. If the current platform configuration
* does not allow input control, an <code>AWTException</code> will be thrown
* when trying to construct Robot objects. For example, X-Window systems
* will throw the exception if the XTEST 2.2 standard extension is not supported
* (or not enabled) by the X server.
* <p>
* Applications that use Robot for purposes other than self-testing should
* handle these error conditions gracefully.
*
* @version 1.27, 12/19/03
* @author Robi Khan
* @since 1.3
*/


Спасибо за подсказку. Интересный пакет ~))
...
Рейтинг: 0 / 0
8 сообщений из 8, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / имитировать нажатие клавиш юзером
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]