Forum Discussion
well I think `aqObject` cannot be extended, prototyped for a new function equivalent to `Keys()` so that I can replace existing `Keys()` with `CustomKeys()` where `CustomKeys()` can handle a delay when "[F10]" is used.
Neither we can override
Only dirty way is
// Custom function to simulate pressing keys with a delay after pressing F10
function Save (obj) {
let keySequence = "[F10]"
let cardPanel = object;
let d = cardPanel.FindChild("JavaClassName", "regexp:.*DataForm.*");
let dataForm = d.FindChild("JavaClassName", "regexp:.*JScrollPane.*").FindChild("JavaClassName", "regexp:.*JViewport.*")
dataForm.Keys(keySequence);
// Check if the key sequence contains "[F10]"
if (keySequence.indexOf("[F10]") !== -1) {
// Add a delay after pressing F10
aqUtils.Delay(1000,"saving form data"); // Adjust the delay time as needed
}
}
module.exports.Save = Save;
Related Content
- 8 years ago
- 3 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago