johnboy691 Posted July 3, 2007 Report Share Posted July 3, 2007 Is there any way to prevent entry of more than say 12 characters into a Variable Set String prompt? I have a Variable Set String prompt ask for a from and to date. The processor enters the date as follows... 010107010507. When it then prints this result in the program it prints 010107 in the first field and then 010507 in the second field. (Because, once a date fills up all available positions in a field the program automatically moves to the next field.) What happens is some processors key so fast they start typing the next prompts data into this from to date prompt. example 01010701050755.00 If they do this it throws the entry off once it goes to the other program. So, can I restrict the number of characters that can print in a Variable Set String prompt? Thanks, John Quote Link to comment Share on other sites More sharing options...
kevin Posted July 3, 2007 Report Share Posted July 3, 2007 Is there any way to prevent entry of more than say 12 characters into a Variable Set String prompt?Not ahead of time. You can, however, limit it after the fact. Something like this:Variable Set String %T1% from Prompt Variable Set Integer %N1% from Length of Variable %T1% If Variable %N1% > 12 Sound Wave File: error.wav Text Box Display: Error: Too many characters Else // Do normal macro stuff here End If You could put this inside a repeat loop so the macro automatically asks for the information again. Quote Link to comment Share on other sites More sharing options...
johnboy691 Posted July 3, 2007 Author Report Share Posted July 3, 2007 Kevin: Thank you SO much. This will help tremendously!!! John 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.