Richard_4641 Posted May 2, 2012 Report Share Posted May 2, 2012 Hi, I'm trying to figure out the easiest way to test the clipboard for a singe integer to make code more readable. If clipboard contains 1234567890 didn't work (the example I found in "Explained" was AaBbCcDdEe). There are no instruction in help for condition separators i.e. ,(comma) ;(semi-colon) (space) etc. my current solution is: If clipboard contains 1 or If clipboard contains 2 or If clipboard contains 3 etc. With many of these in a single macro, code is very difficult to read. Thanks, Richard Quote Link to comment Share on other sites More sharing options...
acantor Posted May 4, 2012 Report Share Posted May 4, 2012 Your code is clear and readable. Macro Express is not a full-featured programming language, so lacks ways to do many tasks that are handled more easily and elegantly by other tools. There may be clever ways to accomplish what you are trying to achieve using MEP, but there is nothing wrong with how you are doing it. The script may run a little faster if you test a variable instead of the clipboard: T1 = Clipboard If T1 Contains 1 or If T1 Contains 2 etc. Quote Link to comment Share on other sites More sharing options...
acantor Posted May 4, 2012 Report Share Posted May 4, 2012 This question got me thinking... so I experimented a little (with Macro Express Pro)... The script runs significantly faster when testing the content of a variable instead of the clipboard. To shorten the code, you could write a separate macro to perform the test, and insert it as a "Macro Run" statement as often as needed in the main script. Quote Link to comment Share on other sites More sharing options...
Richard_4641 Posted May 4, 2012 Author Report Share Posted May 4, 2012 Thanks for the replies, Actually for what I'm doing I think I have to convert to ASCII variables (if I can get that to work). I'm not sure if ME is powerful enough to do everything I want it to do. I'm using the demo right now, I think it's limited in the number of "run macro" commands it can perform before shutting off and losing the variables, that would be my approach (I'm a "goto" kind of guy!) if I could do it. I'd hate to pay for the program and find out that it's not a crippled demo. They really should work on improving the programming language, ME has the same limitations (and iterface) it had a decade ago when I tried it. I'm just a home user trying to do a one time task and maybe use a couple of lighter duty macros, $40 is steep with the limitations it still has. the Pro demo ran much slower than 3.9 and I didn't like the interface. EDIT: ( the Pro demo ran much slower than 3.9 and I didn't like the interface.) at least with the If clipboard statements. and I didn't like the multi-window interface. Quote Link to comment Share on other sites More sharing options...
Richard_4641 Posted May 4, 2012 Author Report Share Posted May 4, 2012 I'm going to try AutoHotkey, I love the ME interface (I hate typing!) and will have to learn the language but, it's free and looks powerful. 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.