Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.net console app with hyperlinks?

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 !!

like image 571
Kumar Avatar asked Aug 03 '26 14:08

Kumar


2 Answers

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("https://stackoverflow.com");
Process p = new Process(psi);
p.Start();

VB syntax:

// this will launch the default browser
Dim psi = New ProcessStartInfo("https://stackoverflow.com")
Dim p As Process = Process.Start(psi)
like image 98
Austin Salonen Avatar answered Aug 06 '26 02:08

Austin Salonen


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.

like image 28
Andrew Hare Avatar answered Aug 06 '26 03:08

Andrew Hare