Home > Back-end >  About the human-computer interaction (chat, instruction), request to approach...
About the human-computer interaction (chat, instruction), request to approach...

Time:10-01

Like QQ chat interface, and then according to the chat dialogue, to determine the content of the existence of instructions, and perform the corresponding operation,

Now my way is to put a memo (chat), an edit (user input), now take stupid method, when the edit after input the content, and press enter to trigger edit onkey events, and then determine the edit. If there is a command in the content of the text (" shutdown "and" open notepad "... ) if there is, then create a thread to execute, after completion of execution, again through the chat dialog output,

Question 1: I this method if there are other more advanced method can replace? Such as hook?

Question 2: cratethread, can only take procedure? Article that whether each function need to write the procedure, then each echo results will also have a global variable to save? If a thread is created, and then execute a command, can judge the current thread is executing, stop input, will release the thread? And accept the new orders?

To solve! 'Thank X

CodePudding user response:

A hook or something or don't want disorderly use,

CodePudding user response:

A procedure is command, match what do what function
  • Related