C
C#Ruttie

❔ Better user experience inputting commands

How would I get input from a user, the fancy way? What I mean is that for example when a user types 'could you run {appname}?' that it runs the application. I want a project of mine to be like talking to the program instead of executing commands
T
Thinker415d ago
How advanced do you want this? It's easy to make a few pre-programmed patterns, but if you want something like ChatGPT then you're on a completely separate magnitude of complexity.
R
Ruttie415d ago
I think a few pre-programmed patterns would be fine
T
Thinker415d ago
string input = Console.ReadLine() ?? "";

if (input.StartsWith("could you start ", StringComparison.InvariantCultureIgnoreCase))
{
string appName = input[16..];
// etc.
}
string input = Console.ReadLine() ?? "";

if (input.StartsWith("could you start ", StringComparison.InvariantCultureIgnoreCase))
{
string appName = input[16..];
// etc.
}
this is of course very crude, but it could probably work
A
Accord414d ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ Return in the middle of a methodIs it ok? I think that it improves readability and performance, but a professor I know argues that i❔ Can't build a MSIX Package for a WPF app❔ Should photo urls be sent paginated to the frontend?So, any given property has a collection of photos in a photo album... they are saved as urls in the ❔ c# wpf textbox access violationHello does anyone know how can i edit the TextBox1.Text within the Task.run so i don't have an acces❔ Help with choosing between ArrayList and other types of collectionsI was challenged to make a pokémon styled game without using classes and I wanted to know better way❔ How can you create a string that creates random characters?Title ^ (Console application)❔ ✅ abstract-Parent and Child static overrides?How do I redeclare an objects element which needs be from a static context in a child class? I have❔ Asking if someone wants to be part of my project (Valorant Discord Rich Presence)Heyheyhey Does some people here play Valorant and want to help me create a Discord Rich Presence usi❔ asp.net web app debug in vscodelI am trying to find out what the database is returning for a specific variable on one of my view pa❔ <AuthorizeView> not workingI am currently making a Blazor Server App with a Custom Authentication. I can give my current user r❔ ✅ Update Dropdown options in Unity without loosing selected optionI have written a StatSelector class. The purpose is to let the user assign generated values to his c❔ How can I store history of each tree node in memory without any leaks?```cpp public class TreeNode { protected TreeNode(string part) : this(part, -1, null) {}