tobyelliott Posted March 23, 2012 Report Share Posted March 23, 2012 Hello. I am new to this forum and I really need help with this macro on macro express. Im trying to create a macro which finds a specific word on a web page. If the word is found I want it to open another macro which I have made. However, what I have done doesnt work as such. Here's what I have: Activate Window. "Windows Internet Explorer" Then I want to click edit at the top of the web page. Select All Clipboard Copy Variable Set String %T1% from Clipboard If Variable %T1% contains "word" Macro Run: The "word" was found End If I cant get the macro to find a word on a web page and then open another macro which I have. Should I use If Control %C1% ( %C1% being word, for example. ) Visible or If Variable %T1% contains "word" Cheers. Quote Link to comment Share on other sites More sharing options...
Cory Posted March 23, 2012 Report Share Posted March 23, 2012 It sounds like you're on the right track, where is it failing? I don't understand your last comment about using controls. BTW you can and should used named variables and divorce yourself from the old ME# variables. Quote Link to comment Share on other sites More sharing options...
tobyelliott Posted March 23, 2012 Author Report Share Posted March 23, 2012 I managed to complete this macro without having to use a variable. In the end, I decided to use If Clipboard rather than If Variable or If Control. < ACTIVATE2:word - Windows Internet Explorer><WAITWIN2:000010:000000:word - Windows Internet Explorer><SPEED:00001><MMS2:57,69><LDN><LUP><MSD:1295><MMS2:69,142><LDN><LUP><CLIPC><IFOTH2:16:1:word.><MACRUN2:word.><ENDIF> Simple. Oh and thank you very much for your interest Cory. Have a great day! Quote Link to comment Share on other sites More sharing options...
Look_Up Posted March 24, 2012 Report Share Posted March 24, 2012 To start the macro you can select from "Activations" looking for "window title" [Picture] To optimize your code use the key Strg.+A to select all text from webside without mouse click. Here is the optimized code: <WAIT FOR WINDOW TITLE Title="word - Windows Internet Explorer" Partial="TRUE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="10" Seconds="0"/> <DELAY Flags="\x02" Time="300"/> <COMMENT Value="Select all text at the window"/> <TEXT TYPE Action="0" Text="<CONTROL>a"/> <DELAY Flags="\x02" Time="300"/> <COMMENT Value="Copy and check the text"/> <CLIPBOARD COPY/> <DELAY Flags="\x01" Time="1"/> <IF CLIPBOARD Option="\x01" Text="word." CaseSensitive="TRUE"/> <MACRO RUN Use_ID="FALSE" Name="word." ID="-1" Wait="TRUE"/> <END IF/> Why do you want to start another macro if you can do everything in one? Look_Up 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.