Hmm. Depends on what you mean by launch, but I created this bit of script to check on the status of the mud I play on by reading the html page:
sub TGetStatus (Tname)
if world.getvariable("Skip_It") = "True" then
exit sub
end if
world.setvariable "Skip_It", "True"
'world.resettimer "TGetStatus"
dim inet
set inet = createobject("InetCtls.Inet")
inet.Url = "http://www.topmudsites.com/"
inet.RequestTimeOut = 20
dim e, f, st, en, test
world.note "Retrieving... Standby"
on error resume next
e = inet.OpenUrl()
on error goto 0
dim RegEx, Match, Matches
set RegEx = New RegExp
RegEx.Pattern = "<.*agesofdespair.*>"
set Matches = RegEx.Execute(e)
for each Match in Matches
test = "<tr bgcolor=#e1e1fc>"
st = instrrev(e,test,int(Match.FirstIndex))
test = "</tr>"
en = instr(int(Match.FirstIndex),e,test)
f = mid(e, st, en - st + 5)
dim temp
temp = split(f,chr(10))
st = instr(temp(1),"<b>")
en = instr(temp(1),"</b>")
dim rank, votes
rank = mid(temp(1),st + 3,en - (st + 3))
st = instr(temp(6),"size=2>")
en = instr(temp(6),"</font>")
votes = mid(temp(6), st + 7, en - (st + 7))
world.send "to gossip"
world.send "Our current ranking is " & rank & " with " & votes & " votes. Vote AoD!"
'world.note "Our current ranking is " & rank & " with " & votes & " votes. Vote AoD!"
world.send "www.topmudsites.com/cgi-bin/topmuds/"
world.send " rankem.cgi?action=in&id=aod"
world.send "."
next
world.setvariable "Skip_It", "False"
end sub
The key here is these lines:
dim inet
set inet = createobject("InetCtls.Inet")
inet.Url = "http://www.topmudsites.com/"
inet.RequestTimeOut = 20
dim e
on error resume next
e = inet.OpenUrl()
on error goto 0
This will read an html page, if you need to do Post or some other thing, then this will likely not work. Though I believe that Post merely appends stuff to the line, like:
http://www.blah.com/somepage.html?Num=1&Letter=A
I don't know exactly what your URL looks like or what it actually does, but this should work in theory. A bit of a wrning though, if you use this for something 'other' than rebooting your router, since the script runs in the same thread as Mushclient, you will get some lag as it takes the time to download the page data. For me on a 56K modem, this is a delay of several seconds. :(
As an alternative you can also do:
dim ie
set ie = createobject("ie.application")
ie.browse "http://www.blah.com"
Or maybe
ie.URL = "http://www.blah.com"
ie.browse
I can't remember... |