JohnnyDepth Posted July 7, 2015 Share Posted July 7, 2015 (edited) Hi!I am trying to write a script that copies all text from a website and if it the clipboard contains a certain word, a message box will appear with that word. Let's just use the word "Hello" as an example:Snippet:MouseClick("left",2115,238) Sleep(500) Send("^a") Sleep(200) Send("^c") Sleep(200) MouseClick("left",2115,238) ;the part i am needing help with is finding the word "Hello" in the clipboard ;Logic would be: ;if clipboard contains "hello" then ; MsgBox($MB_OK,"Attention","Hello exists!") ;else ; MsgBox($MB_OK,"Attention","Hello does not exist :(") ;endifIf anyone can help me with the "clipboard contains "hello" line, that would be awesome! Edited July 7, 2015 by JohnnyDepth Link to comment Share on other sites More sharing options...
JohnnyDepth Posted July 7, 2015 Author Share Posted July 7, 2015 Not sure why it has everything under the first mouseclick tabbed over, but it shouldn't be like that. Also, I added the same mouseclick at the end of that snippet so the website would not be blue(when you ctrl-a to select everything) Link to comment Share on other sites More sharing options...
Danyfirex Posted July 7, 2015 Share Posted July 7, 2015 You're not looking into the help file. if StringInStr(ClipGet(),'hello') then MsgBox(0,'','Hello world found') Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
JohnnyDepth Posted July 7, 2015 Author Share Posted July 7, 2015 Thank you very much! Link to comment Share on other sites More sharing options...
iamtheky Posted July 7, 2015 Share Posted July 7, 2015 maybe also look at _INetGetSource rather than using send, as send is super unreliable. If that captures the desired text then you could probably use dany's same syntax and do something likeif StringInStr(_INetGetSource('URL'),'hello') then MsgBox(0,'','Hello world found') Alexxander 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now