koden Posted April 6, 2006 Report Share Posted April 6, 2006 I have to copy a field that can be 6 or 7 digits/letters The progam I copy from is a mainframe system. Therefore I do it this way: I go to the start of the field and copy the first 6 marks into T2. (T2 will always contain 6 numbers or letters). Then I go back to start of field and copy 7 digits into T3. (T3 will sometimes contain 7 numbers/letters and other times 6 and a space). later in my macro I have to paste T2 or T3 out in another program. But how do I made the right IF statement?? There is one where I can compare value or variable. But how do I tell the "IF" that if T3 contains 7 marks than paste T3 and if T3 contains 6 marks and a blank, then paste T2. Explanation: The mainframe system is stupid.... So I have to go to the start of the field and hold shift and press arrow right 6 or seven times. Then i make ctrl+c. If the 7 mark is blank, and I then paste it out in my other program, the other program sees it as a mark. So therefore I have made this T2 and T3 solution :-)) Quote Link to comment Share on other sites More sharing options...
cyberchief Posted April 6, 2006 Report Share Posted April 6, 2006 Why not just Copy 7 characters... and do a Trim to get rid of the space? Text Type: <SHIFTD><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT>... Clipboard Copy Variable Set String %T2% from Clipboard Variable Modify String: Trim %T2% Quote Link to comment Share on other sites More sharing options...
koden Posted April 7, 2006 Author Report Share Posted April 7, 2006 Okay... think I got it.. Copy seven characters. make a trim that remove any spaces in front and rear of the characters. Then I always will have the right numbers in my variable... Thanks..I will try. 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.