請問Darkranger 提供該程式的名稱、開發單位、它的安裝方式、以及檔案套件內容,這跟我要問的問題有什麼關聯?安裝方式不清楚,因為買機台時該程式已經安裝好了,所以並不知道檔案套件內容,只有如何操作機台的手冊,最核心的部份當然廠商不會公開,這是他們的 Knowhow 不可能給別人,要不然機台廠商要賺什麼?
不過還是很感謝Darkranger 您的回應,謝謝!
QMouseEvent *me = new QMouseEvent(QEvent::MouseButtonPress, p, Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
if (QCoreApplication::sendEvent(QApplication::desktop(), me))
{
}
Synthetic Events
Qt applications can generate their own events, either of predefined types or of custom types. This is done by creating an instance of QEvent (or a subclass) and calling QApplication::postEvent() or QApplication::sendEvent().
Both functions take a QObject * and a QEvent * as arguments. If you call postEvent(), you must create the event object using new and Qt will automatically delete it after it is processed. If you call sendEvent(), you must create the event on the stack. Here's an example of posting an event:
QApplication::postEvent(mainWin, new QKeyEvent(QEvent::KeyPress, Key_X, 'X', 0));
Here's an example of sending an event:
QKeyEvent event(QEvent::KeyPress, Key_X, 'X', 0);
QApplication::sendEvent(mainWin, &event);
Qt applications rarely need to call postEvent() or sendEvent() directly because most events are generated automatically by Qt or by the window system when necessary. In most of the cases where you want to send an event, Qt includes a high-level function that does it for you (for example, update() and repaint()).
QCursor::setPos(x,y);
yrlin 寫:我們有客戶也有此需求
即在不可修改機台IPC軟體下
擷取螢幕資訊&操作IPC
我們的作法是
擷取螢幕畫面(當成是影像來源)
影像辨識
以自製的滑鼠/鍵盤模擬器產生硬體滑鼠/鍵盤訊號來操控機台IPC
正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客