|
Post by Johnc on Aug 14, 2019 16:26:05 GMT
Would be nice if a single keystroke input can be accepted by MMM without needing to hit the "RETURN" key. Something like "y" or "n" or a number e.g. "3" etc... And store the input in %STRINGXX% for example. The input can be skipped with a default value if no key is pressed within a predefined time. This is a very desirable convenience feature. Thanks!
|
|
|
Post by zeak on Aug 14, 2019 23:52:47 GMT
1 | RUN ACTION | INPUT BOX | Yes or No::Yes or No::PROMPT_YES_NO::STRING This accepts the single keystroke Y or N, or are you looking for something different?
|
|
|
Post by zeak on Aug 14, 2019 23:58:28 GMT
Would you be looking for something like this.
1 | RUN ACTION | INPUT BOX | Number::Number::PROMPT_INTEGER::INTEGER
This would Prompt for a number and not require the enter key.
|
|
|
Post by Johnc on Aug 15, 2019 16:11:32 GMT
Hey Zeak, Thank you so much! This is really cool and it is working! Still don't understand how it works lol! When I typed "n", %STRING% got "NO"!!! I would have expected "n". Trying to change the constants to Nooo or NOOO, still gave me "NO"! lol! This script is so magical!
It has saved me lots of time now and it would be nice if the single-stroke prompt can be timed out in 3 seconds, such that I don't really need to type anything and it will default to "YES". Cheers!
|
|
|
Post by zeak on Aug 15, 2019 20:08:15 GMT
it would be nice if the single-stroke prompt can be timed out in 3 seconds, such that I don't really need to type anything and it will default to "YES". Or if you could set the default, say you want it to be "NO".
|
|
|
Post by Johnc on Aug 19, 2019 21:16:04 GMT
Unfortunately sometimes the input box does not pop up as it was not in focus/behind other windows. This has defeated the purpose of a single-stroke input. Steve, I know you have a workaround in another threat but it would be great if MMM can do it by default without needing an extra MMM instant running. Thanks!
|
|
|
Post by zeak on Sept 16, 2019 14:05:03 GMT
Unfortunately sometimes the input box does not pop up as it was not in focus/behind other windows. This has defeated the purpose of a single-stroke input. Steve, I know you have a workaround in another threat but it would be great if MMM can do it by default without needing an extra MMM instant running. Thanks! Think I might have solved your problem. 2 | RUN ACTION | INPUT BOX | Continue: Yes or No::Continue?::PROMPT_YES_NO::STRING | ELSE | 2 | RUN ACTION | RUN ACTION | SELECT WINDOW BY NAME | Continue? Use an ELSE after your INPUT BOX action with SELECT WINDOW BY NAME with the name of your INPUT BOX. I'm not exactly sure why this works, maybe something to do with ELSE looking for an IF statement and not getting one so it evaluates as false letting both work. The only time I've found this fails is if you are switching windows at the same time or just after it tries to select window.
|
|
|
Post by Johnc on Oct 8, 2019 15:50:06 GMT
This is cool Zeak! I will give that a try! Thanks for your help!
|
|