Jump to content
Macro Express Forums

IF clipboard contains condition separator

Recommended Posts



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


If clipboard contains 2


If clipboard contains 3



With many of these in a single macro, code is very difficult to read.




Link to comment
Share on other sites

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


If T1 Contains 2


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...