I have an app which supplies a lot of commands, the user can enter in a textbox.
For example:
The user enters 'Mute sound', which is a valid command
The how do I run the appropriate code?
I don't want a Case statement sorting out the appropriate sub or code.
I heard something about CallByName but I couldn't get it working here.
Perhaps it is possible to put all these commands and there code in an external file and call them, sort like API calls.
Could that be done?
I have an app which supplies a lot of commands, the user can enter in a textbox.
For example:
The user enters 'Mute sound', which is a valid command
The how do I run the appropriate code?
I don't want a Case statement sorting out the appropriate sub or code.
I heard something about CallByName but I couldn't get it working here.
Perhaps it is possible to put all these commands and there code in an external file and call them, sort like API calls.
Could that be done?
Thanx in advance for your help and time!
I am making a chat program that uses command for just about everything the program can do. Are you saying you can't get your program to carry out the cammand you type in the textbox?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu. https://get.cryptobrowser.site/30/4111672
Of course I can execute them, I had a case statement.
But if I have say over 50 commands that case gets a bit large.
So I wondered if there's an other way to handle that.
you know, the users of you program may not want to memorize 50 text commands. you may want to give them a big dropdown menu / list or something. that way you can just use click events or whatever to execute the command code.
if you do stick with the text thing, callbyname is the way to go, but it might take some time to play with...