You are not logged in.
Hi,
I recently discovered javauto as a potential replacement under Linux of AutoIt which is available for Windows only.
Despite AutoIt seems to run under Wine, I decided to try using javauto. Unluckily, things don't work well.
In the case some javauto users are present on this forum, here is a depersonalized example, with a list of problems at the end. Any help or advice would be appreciated.
// Try to copy the line "Logged in as ..." from Q4OS forum homepage
// and to display it in a message box.
exec ("firefox") ;
sleep (5000) ; // To be sure firefox is active.
String url = "https://www.q4os.org/forum/" ;
exec ("firefox -new-tab -url " + url) ;
sleep (5000) ; // To be sure the page is loaded.
// clipboardPut("") ; // Uncomment to clear the clipboard.
send ("/") ; // In Firefox, "/" is equivalent to Ctrl-F.
send ("Logged in as") ; // The text to search for.
send ("{ESC}") ; // To quit the search mode.
keyCombo (new String[] {"{SHIFT}", "{END}"}) ; // To extend the selection to the end of the line/cell.
keyCombo (new String[] {"{CTRL}", "c"}) ; // To copy the selection to the clipboard.
String clip = clipboardGet() ;
msgBox (clip, "Login") ;
// Problems:
// - the search tool doesn't open;
// - Firefox jumps unexpectedly to the end of the page.
Please note that, in this example, I could have used a bash script to wget the page and to grep the searched text, but in my real use the web page has plenty of javascripts to create its content dynamically, so that the searched text doesn't exist in a file I can wget.
Thanks,
Laurent
Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD
Offline