Dego Posted December 26, 2018 Report Share Posted December 26, 2018 Hi I started out loving Macro Express 4 but now I am getting a bit frustrated. I have this bit of code (see below) that runs but the copy file/files does copy the file. So what I did to test it is change %T1% to the value in clipboard which is C:\Users\desmo\Desktop\Holder\05. Dancewitme.mp3 which works fine and copied the file. So my question is why does it not work when using the variable %T1%, but works when replace %T1% with the value of the clipboard. I added a Message box (see below) to check the value of %T1% and it is C:\Users\desmo\Desktop\Holder\05. Dancewitme.mp3 And help would much appreciated Regards Desmond Quote Link to comment Share on other sites More sharing options...
rberq Posted December 27, 2018 Report Share Posted December 27, 2018 Looks like it should work. This is a shot in the dark, but try using Variable Modify String [Trim] on variable %T1% before the Copy File line. If there are any "invisible" characters on one end or the other of the clipboard contents, this probably will get rid of them. Another way to find out if there are non-display characters in a text string is, instead of displaying %T1% in a text box, display ***%T1%***. If there are no invisible characters, what you will see in the text box will be ***ABC***,, with no empty space between the asterisks and the variable contents. With invisible characters in the text, the text box might appear as *** ABC *** (non-display bytes both before and after the text you expect to see). Quote Link to comment Share on other sites More sharing options...
Dego Posted December 27, 2018 Author Report Share Posted December 27, 2018 Thanks rberq Will give it a go Regards Desmond Quote Link to comment Share on other sites More sharing options...
Cory Posted January 8, 2019 Report Share Posted January 8, 2019 Check for leading or trailing non-printing characters. In some programs like Excel it will add a newline set. Open it in a hex editor and see if there is any extra characters. Or see how long it is in MEP. If it's length is 2 longer than what is visible, you probably have a newline set at the end. Or just try a trim command after copying the clipboard contents. 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.