• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

get selected/highlighted text from url

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I would like to know if ti is possible to build an app that can "do things" with a selected string from a url. Most preferably callable through windows context menu such as google search (see attachment). If possible any directives for starters?

Thanks!
Untitled.jpg
[Thumbnail for Untitled.jpg]
selected text app
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, clearly it is possible because you have posted a screenshot from an app which does exactly that. But perhaps you could clarify: do you just want to write a browser which has this feature? Did you perhaps want to write an application which could look into windows of other Windows applications? A clearer description of your goals would be very helpful.
 
Miltos Deligiannis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Well, clearly it is possible because you have posted a screenshot from an app which does exactly that. But perhaps you could clarify: do you just want to write a browser which has this feature? Did you perhaps want to write an application which could look into windows of other Windows applications? A clearer description of your goals would be very helpful.



Well i don't know if this feature of google has been implemented in java.... i need a program that right click manipulate the selected string in the browser. I don't want to write a browser.. I'm thinking of an app that runs with the selected text as argument...
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay... let's try a little more clarification. This program would be a separate program from the browser, but it would modify how the browser works? Or it would just extract text from the browser's display and do something with it?

Or would it be code which runs in the browser? If you're focusing on Java, then that would be an applet.
 
Miltos Deligiannis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Okay... let's try a little more clarification. This program would be a separate program from the browser, but it would modify how the browser works? Or it would just extract text from the browser's display and do something with it?

Or would it be code which runs in the browser? If you're focusing on Java, then that would be an applet.



it should be just that: "a separate program from the browser and it would just extract text from the browser's display and do something with it."
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's not a thing that you would naturally use Java for. To steal information from another application you would at least have to use low-level system calls for whatever operating system you were interested in. And then since such a program could be used to steal information from the user, there would likely be security features which prevented you from doing that.

I don't mean to say that's impossible, I'm sure that writers of spyware have already done it, I'm just saying that Java isn't the right choice of language for it.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to do this specifically inside a browser, then a browser extension might be the way to do it. For example, in Firefox you can get pretty far using XUL - basically JavaScript using some Firefox-specific APIs. See https://developer.mozilla.org/en/docs/Building_an_Extension and http://kb.mozillazine.org/Getting_started_with_extension_development to get started.
 
Miltos Deligiannis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:If you want to do this specifically inside a browser, then a browser extension might be the way to do it. For example, in Firefox you can get pretty far using XUL - basically JavaScript using some Firefox-specific APIs. See https://developer.mozilla.org/en/docs/Building_an_Extension and http://kb.mozillazine.org/Getting_started_with_extension_development to get started.



That was my first thought and i think that i'll finally go with it... Thanks
 
Miltos Deligiannis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Java isn't the right choice of language for it.



Yeah i suppose so... Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic