Jump to content
Macro Express Forums

How to? IF "Click Here" on page exists, go to specific section of script to execute..


camarosource
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

  • 3 weeks later...

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.

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...