Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ GoToURL and Hyperlinks

GoToURL and Hyperlinks

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Xevira   (11 posts)  Bio
Date Tue 03 Aug 2004 12:53 AM (UTC)
Message
Here's the scenario. On Aetolia, we get voting reminders to vote for it on a regular basis. We are given a url to goto for voting. I have it where a hyperlink is displayed below it that you can click. However, I find it annoying to have to move my fingers to use the mouse and click on the link. It disrupts what I was doing, especially when it flies by before I can click on it. I'm looking for a way to bypass the need to click a link to open a brower to a given url when I don't want to.

Ok, I've seen the GoToURL command. However, the only time I've ever seen it available is when I have a url selected. I want to know if there is a way to supply a url for that command such that: 1) You don't need to click a hyperlink, 2) select any url text in the output window, 3) allow you to make an alias automatically go to the url. The very fact I enter a command indicates I want to do something.

Possible Ideas:
1) Add a new Send To type "URL" or "Browser" that sends the contents of the Send text (after the %-substitution's) to the default browser. That way, it can be used in triggers, timers and aliases, with the ability to parameterize the url.

2) Make a script function FOR "GoToURL" that accepts a url string and opens the browers to it.

Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #1 on Tue 03 Aug 2004 01:26 PM (UTC)
Message
According to the script reference, you can use Run to open an external program, but the WScript object doesn't exist in MUclient... Does anyone know of another way to do it?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Shadowfyr   USA  (1,790 posts)  Bio
Date Reply #2 on Tue 03 Aug 2004 07:33 PM (UTC)
Message
Well.. You can use WScript, but you have to create an instance of it, just like you do with other external applications. You can also use something like:

URL = wildcard(1) 'Or whatever the URL is returned in.
set browser = createobject("InternetExplorer.Application")
browser.visible = 1
browser.navigate URL

This ends up being pretty close to the same result as using a WScript object, except that the WScript object 'should' probably run your default browser if it isn't IE.

Unfortunately, the last option is useless, since most browsers only support limited and that function is not available in VBScript. Even if it was, most browsers only support a navigate function, where IE allows DDE to return things like 'has this page finished loading?' and others. But in your case, this wouldn't be a big deal, if you could use it as all, which you can't.

I really wish the other browsers where not so anti-ActiveX and anti-DDE that they don't even provide basic integration options for other applications though. :( I hate having to rely on MS Infernal Exploder to run vote scripts or display URLs from mud text, especially given the sometimes questionable places my fellow mudders post a "Heh, get a load of this..." message about. lol
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #3 on Tue 03 Aug 2004 11:11 PM (UTC)
Message
Set WshShell = WScript.CreateObject("WScript.Shell")

Error number: -2146827864
Event: Execution of line 1 column 1
Description: Object required: 'WScript'
Line in error:

Called by: Immediate execution

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Xevira   (11 posts)  Bio
Date Reply #4 on Wed 04 Aug 2004 12:17 AM (UTC)
Message
Great, wonderful... but that's not available to everyone and... the code that makes the default browser navigate to the specific url already exists in mushclient. Whenever you click on a HyperLink or do the Go To URL command, mushclient will launch the default browser. As I said, great, wonderful.

However, doing it in scripting would be a pain, especially if you don't have the right engines or even permissions to have your scripts do something the client already has the power to do if hooks for users to grab onto were added. Sure there's hyperlink, but to make it where you have to do ANOTHER step to go to the URL when you do an alias is cumbersome. The Go To URL looks even worse. Sure, it's handy when that's all you need (ie, someone sent you a link and you GOTTA go there).

Now... that being said, I think it is just better if there are multiple avenues to travel to do any particular task. People think differently. And, each situation is different. Sometimes Hyperlink is a good choice when it's done via a trigger, since the client is just presenting you with a link that you can click, one step. Go To URL is ok when you don't have the HyperLink() and it's there in the output window. However, when you want to use an alias to open a browser, you shouldn't have to make complex scripting to do already existing stuff. No need to reinvent the wheel here. :) The fact you did the alias should be enough, no need for extra clicking.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #5 on Wed 04 Aug 2004 05:11 AM (UTC)
Message
What happens when someone codes something that makes you go to a site with viruses, or whatnot? Allowing you to go to a completely random site without direct user participation poses a reasonably moderate risk.
Now Im not saying there arent other inherit risks, but most of the other ones have a semi-complicated script behind them. So, now that weve been through that...

That being said... DoCommand will work, If you can find a way to select text in the output. Perhaps nick could change the "GoToURL" routine to allow you to go to a URL in the command box. Because then you can select it (via scripting), and then go to it.

That would only require the extension of the GoToURL command (and its a bit of a logical extension) and then you'd be able to work with it and get it to do what you need.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,622 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.