Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

How to ping long URL not just the root path


  • Please log in to reply
22 replies to this topic

#21 CaptainClucks

CaptainClucks

    Unum Cavillator Spuria

  • Active Members
  • PipPipPipPipPipPip
  • 1,222 posts

Posted 07 July 2012 - 06:44 PM

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

Spoiler
Warning: Posts by this user are subject to change or may disappear without notice.







#22 xuzo

xuzo

    Adventurer

  • Active Members
  • PipPip
  • 137 posts

Posted 07 July 2012 - 06:53 PM

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! :ILA:

Edited by xuzo, 07 July 2012 - 06:54 PM.

Vincent Moving Company1222 Melville Street, Vancouver, BC V6E 2Y1(778) 300-6592vincentmoving.com

#23 xuzo

xuzo

    Adventurer

  • Active Members
  • PipPip
  • 137 posts

Posted 07 July 2012 - 08:16 PM

[Solved]
Vincent Moving Company1222 Melville Street, Vancouver, BC V6E 2Y1(778) 300-6592vincentmoving.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users