Hi,
is it possible to create a general application rule that triggers SENDKEY(F4) when double clicking on an input field?
Cheers,
Joerg
Application: combining double mouse click with function key
Moderator: jeanmichel
-
Joerg Hamacher
- Posts: 40
- Joined: 09 Mar 2016, 00:29
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Application: combining double mouse click with function key
Hi Joerg,
Copy the following code into onArrive or push button's onClick. It looks like it is working in house.
This sample adds double click events to <input type='text'> and <textarea> in div#terminalContent.
Note: It contains an internal function AXES.Terminal.postAIDKey().
Sorry most comment lines are Japanese.
Hope this helps.
Best Regards,
Hidekazu Tanaka
Copy the following code into onArrive or push button's onClick. It looks like it is working in house.
This sample adds double click events to <input type='text'> and <textarea> in div#terminalContent.
Note: It contains an internal function AXES.Terminal.postAIDKey().
Code: Select all
// terminalContent(アプリケーションウィンドウ)内のエレメントを取得
var elms = document.getElementById("terminalContent").childNodes;
/*
* 取得した全エレメントを評価
*/
for( var i=0; i < elms.length; i++ ){
if ( elms[i].childNodes[0] ){
var el = elms[i].childNodes[0];
console.log("el="+el);
// <input>タグで絞り込み
if ( el.tagName.toLowerCase() === "input" ){
// text属性(type=text)で絞り込み
if ( el.type ){
if ( el.type.toLowerCase() === "text" ){
/*
* Add doubleClick event
*/
el.setAttribute(
"onDblClick",
"AXES.Terminal.postAIDKey('F4');"
);
}
}
}
// <textarea>タグで絞り込み
if ( el.tagName.toLowerCase() === "textarea" ){
/*
* Add doubleClick event
*/
el.setAttribute(
"onDblClick",
"AXES.Terminal.postAIDKey('F4');"
);
}
}
}
Hope this helps.
Best Regards,
Hidekazu Tanaka