views:

137

answers:

4

is it possible ? any samples/patterns or ideas on how to go about it ?

Update - this essentially becomes a text browser which displays various tables of information based on various commands on the prompt like typing the url in a browser

now instead of typing various commands like

prompt>command arg1 arg2 if only you could say "click" on the text in a certain "column"/"row" which would execute the command say

prompt>commandX arg1

it'd be somewhat faster/easier

Now, before someone mentions doing a typical browser/asp.net mvc/whatever app, i already have that running but have encountered some limitations esp. with accesing network files. etc. Now that's taken care of using a service-broker service which reads the file etc. but having added numerous extensions to it, it'd be somewhat easier if you could just run the app as a console prompt with a mvc pattern and add extensions to it etc. etc.

if only the text is clickable, it'd make it more friendly for use !!

+2  A: 

The window's shell doesn't support clickable hyperlinks, so no, this isn't possible.

What are you trying to do that warrants the need for hyperlinks in the command shell? Perhaps this application would be better built as a WinForms/WPF or ASP.NET application.

Andrew Hare
+1 for accuracy, although i wish the windows shell did support hyperlinks like it does in linux... it's useful sometimes
Max Schmeling
The "linux shell" doesn't support clickable hyperlinks. Your console smulator (Console, Terminal, KTerm, or whatever) does.
Tordek
see above for details
Kumar
+3  A: 

Assuming no mouse, I would just launch the URL as a new process based on some keyboard trigger.

//this will launch the default browser    
ProcessStartInfo psi = new ProcessStartInfo("http://stackoverflow.com");
Process p = new Process(psi);
p.Start();
Austin Salonen
looks like the Q was not clear....the goal is to have clickable text in the console app
Kumar
that's still an excellent work around. Good thinking.
keyle
A: 

I don't know what a "hyperlink" is for you, but in the context of a Console Application, you can have numbers or letters that you are expecting the user to press

(imagine a simple menu with 3 options)

Press one option

1 - Open ServerFault
2 - Open StackOverflow 
3 - Open SuperUser

and in the readline you have a switch that start the IExplorer process for example and opens the webpage.

Is that what you call regarding "hyperlinks in a console application"?

balexandre
I was hoping to somehow make certain text clikable/render with different color and then take different actions based on which text is clicked, akin to having a html table on a webpage and clicking on various column/rows executes different actions/url's etc.
Kumar
+1  A: 

For an idea of what it can look like, get your hands on a copy of links. It's a text-mode web browser that works just fine in several operating systems.

clintp
added more details above on why a browser is not sufficient here
Kumar