phenomenix Posted March 5, 2008 Report Share Posted March 5, 2008 I could really use a statement "If clipboard does not contain" but can't find it anywhere. Does anybody know a way to accomplish the same thing? Thank you, Roger Quote Link to comment Share on other sites More sharing options...
Cory Posted March 5, 2008 Report Share Posted March 5, 2008 Copy the clipboard to a text var and then use the If Variable wiht the Contains option. Quote Link to comment Share on other sites More sharing options...
kevin Posted March 5, 2008 Report Share Posted March 5, 2008 Try this: If Clipboard Contains "Special Stuff" Else // DO YOUR STUFF HERE End If Quote Link to comment Share on other sites More sharing options...
phenomenix Posted March 5, 2008 Author Report Share Posted March 5, 2008 Thank you for the suggestions. The first one will work. I had never thought of doing it with a variable, since the thing I'm putting on the clipboard is an entire Web page, but I tried it and it works. Who'd-a-thunk of naming an entire Web page with a variable? The second suggestion, with the else statement is a little trickier, since I can't predict what the web page will contain. In other words I have no "Special Stuff" to search on. If I did I would have just used the 'If Clipboard Contains" function to start with. I only wanted to know if it does NOT contain a specific string. But I have a solution. Thanks. I hope someday they will add an "If Not Clipboard Contains" statement to save the extra steps. It seems silly that it isn't there. Quote Link to comment Share on other sites More sharing options...
kevin Posted March 6, 2008 Report Share Posted March 6, 2008 The second suggestion, with the else statement is a little trickier, since I can't predict what the web page will contain. In other words I have no "Special Stuff" to search on. If I did I would have just used the 'If Clipboard Contains" function to start with. I only wanted to know if it does NOT contain a specific string.The second example is exactly what you need. Because of the Else command the section "DO YOUR STUFF HERE" will only execute if the clipboard does not contain a specific string. Just replace 'Special Stuff' with the string you do not want it to contain. I'm glad you have a method that works. Quote Link to comment Share on other sites More sharing options...
Cory Posted March 6, 2008 Report Share Posted March 6, 2008 Yeah, what Kevin said. His way is better. For some reason I forgot that there was a If Clipboard Contains. IMHO it's better because it saves the use of a variable. But if the var will be used for something else then it might have merit. Quote Link to comment Share on other sites More sharing options...
phenomenix Posted March 11, 2008 Author Report Share Posted March 11, 2008 Thank you both for the excellent help. You are correct. 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.