Skitty Posted July 7, 2012 Posted July 7, 2012 Hi guys, This is soooooooo cool that I got it working that I figured I might as well push my luck a little! Trying to make it work with a text file now: $s_Src = BinaryToString ShellExecute("notepad.exe", @ScriptDir & "text.txt", "", "OPEN") If StringInStr($s_Src, "this is text") Then ; Good to go MsgBox(0, "Is text there?", "yes text is there") Else ; Houston we have a problem. MsgBox(0, "Is text there?", "no, text isn't there") EndIf Of course I'm doing something wrong as usual....! Oh goodness, my eyes... Anyway, look at both examples, notice the webpage URL. The working one has "http" in the string, the faulty one does not. As for the text file, you can do it like this I guess. If StringInStr(FileRead(@ScriptDir & "text.txt"), "this is text") Then ; Good to go MsgBox(0, "Is text there?", "yes text is there") Else ; Houston we have a problem. MsgBox(0, "Is text there?", "no, text isn't there") EndIf
xuzo Posted July 7, 2012 Author Posted July 7, 2012 (edited) Thank you works perfect! You guys are rocket scientists and I'm...well...a moron I guess! I also checked what "scheme name" means: "In the field of computer networking, a URI scheme is the top level of the uniform resource identifier (URI) naming structure. All URIs and absolute URI references are formed with a scheme name, followed by a colon character (":"), and the remainder of the URI called (in the outdated RFCs 1738 and 2396, but not the current STD 66/RFC 3986) the scheme-specific part. The syntax and semantics of the scheme-specific part are left largely to the specifications governing individual schemes, subject to certain constraints such as reserved characters and how to "escape" them. URI schemes are frequently and incorrectly referred to as "protocols", or specifically as URI protocols or URL protocols, since most were originally designed to be used with a particular protocol, and often have the same name. The http scheme, for instance, is generally used for interacting with Web resources using HyperText Transfer Protocol. Today, URIs with that scheme are also used for other purposes, such as RDF resource identifiers and XML namespaces, that are not related to the protocol. Furthermore, some URI schemes are not associated with any specific protocol (e.g. "file") and many others do not use the name of a protocol as their prefix (e.g. "news")." AutoIT rocks, fantastic support and community, even better than Joomla!, and that's pretty hard to beat! Edited July 7, 2012 by xuzo
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