camarosource Posted January 13, 2008 Report Share Posted January 13, 2008 If it possible and if so, HOW? so to make a program execute commands only if specific text on a webpage is found. IE. In basic terms.. IF "Click here" exists on a webpage then go to a section of the script that executes a series of commands. IF NOT, then exit, or go to a different part of the script to execute something else in the script. Basically I know how to look for a series of text on a webpage but I'd like to do something else if the text does NOT exist.. Thanks Quote Link to comment Share on other sites More sharing options...
jason Posted January 14, 2008 Report Share Posted January 14, 2008 Try copying the contents of the page to the clipboard, and then use the If Clipboard Contains command. You may also have some luck in programming the macro to use the Find command within your browser. You would need to set the macro up to press Cntrl+F to activate the Find window followed by a Text Type command to enter the search criteria and pressing the Enter key to begin the search. From here, the browser programs act differently. If you are using Internet Explorer, a window will appear to tell you that the text could not be found. If you are using Firefox, than the color in the search box changes. You will need to set your macro up to detect the change that is correct for your browser. Quote Link to comment Share on other sites More sharing options...
camarosource Posted January 15, 2008 Author Report Share Posted January 15, 2008 Try copying the contents of the page to the clipboard, and then use the If Clipboard Contains command. You may also have some luck in programming the macro to use the Find command within your browser. You would need to set the macro up to press Cntrl+F to activate the Find window followed by a Text Type command to enter the search criteria and pressing the Enter key to begin the search. From here, the browser programs act differently. If you are using Internet Explorer, a window will appear to tell you that the text could not be found. If you are using Firefox, than the color in the search box changes. You will need to set your macro up to detect the change that is correct for your browser. Hmm.. Interesting.. How would I copy a page to the clipboard tho? Also, if I used a "IF CLIPBOARD CONTAINS".. what next? What's the action? how to program an ELSE go to action type command? If = Question.. But how do you set the action to do IF the IF statement is true? How would I also check if the clipboard contains a PARAGRAPH? Seems "if clipboard contains" has a single lined field.. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 5, 2008 Report Share Posted February 5, 2008 CTRL+A to highlight the web page and Clipboard Copy command. The use of conditional statements should be obvious, just mess with them. If you have a paragraph first set a string to that text like by using the Set String from File and use that in the field. 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.