I made a small program in java
is like a rss checker but when find something I launch this,
java.awt.Desktop.getDesktop().browse(URI.create(relHref));
But now I have a problem,
every time this event trigger i lose focus on the page/program. I wanna open the page without loosing it. Is this possible?
For instance: If I'm watching a movie and the event start i get the focus on the page and I have to stop/restart the movie.
This is almost the same problem i have
Java open html in background but is without a solution :-(
Related
This is for an offline application. However, I would like the front end to be run in a web browser. What I want is, a simple gui design in HTML/CSS. I want to be able to execute java commands at a button's press. Furthermore, I would like to be able to display and read information from the browser. Is this feasible?
You could use JxBrowser. The knowledge base contains some pretty good example. Unfortunately, it is not free though.
I want to capture user activities happening during certain amount of time period.
I know it can be done using some native calls (JNI) but the requirement is that it
should be done using Image Processing only.
The tasks include,
1. Getting a screenshot of screen after every 15 seconds.
2. Find out which is currently active window and which are not using Image processing (Java).
3. Get the title of active window.
I am able to get the screenshots periodically and getting title of active
window can be achieved using JavaOCR.
But I am not sure how to proceed with the second task. Please let me know
if there's anyone who has done similar type of work.
Please suggest what should be my approach and do post some Image Processing libraries that I can use.
Thanks.
Im trying to accelerate the use of a web application using selenium Webdriver by creating hotkeys for it. I want certain webdriver click events to be associated with keyboard keys. For example, pressing "s" on the keyboard will click on the submit button.
I understand how to do the clicking and locating elements with webdriver but don't know how to go about listening to the keys from Java while Firefox is open (from a webdriver get call). My application has no GUI and since it's opening a firefox window it will lose focus so KeyListener is not an option.
I have come accross the JNI library that I'm looking into. Any other suggestions how I may do this?
In that case, it is almost always better idea to automate the whole process
Say, you need to daily update salary of the employees. It is better idea to invest your time to read XLS file (almost standard way how those data are delivered to the people destined to do the repetitive work) and read line by line and somehow enter it to the application.
I know I did not provide you the answer you were expecting, but try to think of automating the whole process. It might be little tricky, but doable - and at the end faster - than simple mapping of the keys
I've been pondering over this problem most the afternoon and haven't yet found the most ideal solution so thought I would see what others think..
There is a legacy Win16 application that has to be modified (with the least effort) in order to communicate with a web based application.
The idea is such that in the Win16 app, the user will want to look up a specific code, so they'll click a button which will then launch the browser and allow them to navigate a specific set of pages until they find the result they desire, then they have the option of either pressing Select or Cancel.
Pressing Select should pass back a small string back to the app (around 10 characters) and close the browser. Cancel will likewise send a Cancel message back to the app and again close the browser window.
I can't see many choices available in implementation as the Win16 app is not able to call webservices, so I'm looking at using the clipboard, however that is not without problems.
I hope there's some other alternative I haven't thought of,
As always - all advice appreciated.
Thanks,
i am developing mobile web app using spring(spring mvc). I need to devlope a form which enables the user to upload file(resume) and on submit it will be stored in database.
I am not getting the idea how to finish that!
In the form when i use input type as file, it's working in diffrent manner on diffrent browser. If any one have did it ,please tell me the steps or some working demo at any site.
yes i don't want to use some third party tool.
thanx.
Sorry dude, your kinda SOL on this one. The file input type is a different beast than most. Each browser implements it in their own way, so it will never look the same on multiple browsers. Also, for security reasons, you can't trigger the file inputs with JavaScript, so you can't make an invisible file input that you would interact with through other standard inputs. Many before you have tried, all have failed. I spent days researching possible alternatives when I had nothing better to do, and they all came up against the security issue. Jquery provides the closest thing but still required a browser switch for one of the major browsers (can't remember which one off the top of my head).
So now that the bad news is out of the way, here's what you can do. Put a button on the screen and style it how you like. Put a file input on the screen and using absolute positioning and a higher z-index put it right over the top of your button. Now make it transparent (not display none, but using opacity and filter:alpha styles), now the user thinks they are interacting with your standard button, but the invisible file input above it intercepts the click. Will be the closes you can get to a file input that behaves and looks the same in all browsers.