I need some help kicking my brain into gear!
I have an application that I have put a winsock control on so that I can telnet to it and issue commands. All commands are in the format <action> <object> <qualifier>, so for example 'change ip-address 127.0.0.1'.
I want to implement something where I can only partially enter the keywords and have the application automatically fill in the rest. So I could issue 'cha ip-a 127.0.0.1' and that would be equivalent to the above.
Now, some of the commands begin with the same first few letters, for example we have 'change ip-address' and 'change ip-phone-config' and so on. So, yes, the user would need to enter the minimum amount of letters that are required to eliminate ambiguity. I have tried to achieve this by checking for the Left$() of what I know is the minimum command that is not ambiguous. However, this isn't quite right because I could enter something like 'cha ip-a-boo! 127.0.0.1' and it would pick it up as 'chang ip-address 127.0.0.1'.
Can someone think of a better way to implement what I'm trying to do? I'm stumped!
Thanks
Nick
I have an application that I have put a winsock control on so that I can telnet to it and issue commands. All commands are in the format <action> <object> <qualifier>, so for example 'change ip-address 127.0.0.1'.
I want to implement something where I can only partially enter the keywords and have the application automatically fill in the rest. So I could issue 'cha ip-a 127.0.0.1' and that would be equivalent to the above.
Now, some of the commands begin with the same first few letters, for example we have 'change ip-address' and 'change ip-phone-config' and so on. So, yes, the user would need to enter the minimum amount of letters that are required to eliminate ambiguity. I have tried to achieve this by checking for the Left$() of what I know is the minimum command that is not ambiguous. However, this isn't quite right because I could enter something like 'cha ip-a-boo! 127.0.0.1' and it would pick it up as 'chang ip-address 127.0.0.1'.
Can someone think of a better way to implement what I'm trying to do? I'm stumped!
Thanks
Nick