azimzores Posted August 29, 2005 Report Share Posted August 29, 2005 OK his is my first post. so far i must say that macro express is awsome. My problem now for a macro i am developing at work when i have the prompt for value pop up i need to have like a 10 character limit or.. OR if there is a way i can have the macro take the first 10 characters of the variable and tet type them into which ever application i need it posted in. Any help would be appreciated.. thanks in advanced Quote Link to comment Share on other sites More sharing options...
randallc Posted August 29, 2005 Report Share Posted August 29, 2005 Hi, Here's what you want, I think; <TVAR2:01:02:FFirst 10 characters will be taken from your inputFFCenter:Center><TMVAR2:10:01:01:001:010:><TBOX4:T:1:CenterCenter000278000200:000:Here it is, ready to paste by "Text Type T1"T1=%T1%> Variable Set String %T1% from PromptVariable Modify String: Copy Part of %T1% to %T1% Text Box Display: Here it is, ready to paste by "Text Type T1" Best, Randall Quote Link to comment Share on other sites More sharing options...
azimzores Posted August 29, 2005 Author Report Share Posted August 29, 2005 update. basicly i figured one way to do it is to use the prompt variable string and then use the varable string modifier to delete text after 10 characters and stop delet at 50 characters. ... Justr was woundering if their was a way to force the prompt to have a character limitation to it or way to limit the characters/symbols used Quote Link to comment Share on other sites More sharing options...
cyberchief Posted August 29, 2005 Report Share Posted August 29, 2005 How about this? Variable Set String %T1% from Prompt Repeat Until %T1% <> %T1% Variable Set Integer %N1% from Length of Variable %T1% If Variable %N1% < 10 Break Else Variable Set String %T1% from Prompt End If <TVAR2:01:02:FEnter Value HereFFCenter:Center><REP3:08:000002:000001:0001:1:01:T1><IVAR2:01:12:1><IFVAR2:2:01:3:10><BREAK><ELSE><TVAR2:01:02:FCharacters Exceed 10 Count; Please Re-EnterFFCenter:Center><ENDIF> Quote Link to comment Share on other sites More sharing options...
cyberchief Posted August 29, 2005 Report Share Posted August 29, 2005 Here is an addition to the code I posted to check for symbols... you can modify as needed... this is only an example. Variable Set String %T1% from Prompt // Here is where the macro checks the length and prompts if too long Repeat Until %T1% <> %T1% Variable Set Integer %N1% from Length of Variable %T1% If Variable %N1% < 10 Break Else Variable Set String %T1% from Prompt End If // Here is where the macro checks for characters/Symbols Variable Set String %T3% "!~@~#~$~%^~&~*~(~)~*~{~}~|~:~"~<~>~?~[~]~\~;~'~,~.~/~-~+~`" Repeat Start (Repeat 10 times) Variable Modify String: Copy Part of %T1% to %T2% If Variable %T3% contains variable %T2% Variable Set String %T1% from Prompt Break End If <TVAR2:01:02:FEnter Value HereFFCenter:Center><REM2:><REM2:Here is where the macro checks the length and prompts if too long><REP3:08:000002:000001:0001:1:01:T1><IVAR2:01:12:1><IFVAR2:2:01:3:10><BREAK><ELSE><TVAR2:01:02:FCharacters Exceed 10 Count; Please Re-EnterFFCenter:Center><ENDIF><REM2:><REM2:Here is where the macro checks for characters/Symbols><TVAR2:03:01:!~@~#~$~%^~&~*~(~)~*~{~}~|~:~"~<~>~?~[~]~\~;~'~,~.~/~-~+~`><REP3:01:000001:000001:00010:0:01:><TMVAR2:10:02:01:001:001:><IFVAR2:4:03:7:T2><TVAR2:01:02:FPlease enter 10 digits excluding special charactersFFCenter:Center><BREAK><ENDIF> 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.