polishmafia Posted September 18, 2006 Report Share Posted September 18, 2006 Hi everyone. I just joined this forum today, and have been using MacroExpress for a few months off and on. I tried searching for my answer, but I'm not exactly sure what I should be searching for The macro I am currently working on asks the user for a variety of string inputs, all via the Set String via Prompt. One variable the macro asks for is the person's name. Is there a way I can limit the input box to 15 characters max? I thought of trimming the string starting at position 1, and trimming everything else past 15 characters. I would prefer to have MacroExpress not let the user type in more than 15 characters. Any ideas? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
kevin Posted September 18, 2006 Report Share Posted September 18, 2006 There is not a way to limit the number of characters that the user enters using the Variable Set String from Prompt command. But, as you have pointed out, you can trim the length after the fact. You could include the maximum number of allowed characters in the input prompt and then trim it after the user clicks the OK button. For example: 'Enter name (15 chars max)' You may also be able to use the .hta forms to input the name. But I do not know if a field in a .hta form allows you to limit the number of characters that are entered. An example macro that uses a .hta form can be found here: http://pgmacros.com/community/index.php?showtopic=248 Quote Link to comment Share on other sites More sharing options...
polishmafia Posted September 20, 2006 Author Report Share Posted September 20, 2006 Thanks for the info, Kevin. I'm glad I found this forum, too. Lots of GREAT information! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.