Need to find how to pass url to a program?

General questions about scripts and buttons should be asked here. Development scripts and buttons may also be posted for feedback.

Moderators: Support Staff², Support Staff, AvantGuard, Developer

Post Reply
Ozcan
Newbie
Newbie
Posts: 4
Joined: Wed Aug 27, 2008 7:48 am
Windows Version: XP Pro SP3
Avant Version: 11.6 b20
IE Version: 7.05730

Need to find how to pass url to a program?

Post by Ozcan » Fri Aug 29, 2008 7:44 pm

I'm trying to pass the current url to a windows program?

What i'm trying to do exactly is to open another browser with the current url.

For development purposes?

Can this be done?

Thanks!

abfan123
Avantus Maximus
Avantus Maximus
Posts: 5624
Joined: Wed Jan 26, 2005 4:24 pm
Windows Version: Vista Ultimate x64 SP2
Avant Version: 11.7 build 43
IE Version: 8
Contact:

Re: Need to find how to pass url to a program?

Post by abfan123 » Fri Aug 29, 2008 8:18 pm

Hello,
What browser are you trying to open?
IE8(Pro), Microsoft Security Essentials
Main PC:
Image
Secondary PC same as primary but with Windows 7 x64 Ultimate as the OS.

Ozcan
Newbie
Newbie
Posts: 4
Joined: Wed Aug 27, 2008 7:48 am
Windows Version: XP Pro SP3
Avant Version: 11.6 b20
IE Version: 7.05730

Re: Need to find how to pass url to a program?

Post by Ozcan » Fri Aug 29, 2008 8:52 pm

I'm trying to Send the Current URL from Avant to Firefox and Maxthon Browsers.

There are some Plugins in Maxthon2 that don't work with Avant (Blog This - not IE8, I'm using IE7).
Sometimes I am viewing a page on the net and I tend to index these on my local server for reference, so I used Blog this page script in Maxthon2 to paste it directly into the local wordpress blog.

And I use Firefox for viewing pages that I've designed to see if they work correctly.

It would be great if all browsers had this so tha we can send the same URL quickly to other browsers for testing purposes.

I can spawn MAxthon through a button

set url=window.location
"C:\Program Files\Maxthon2\maxthon.exe" %url%

windows.location is a javascript - so it doesn't work.

Any ideas?
Thanks!

User avatar
sulpherdragon
Contributor
Contributor
Posts: 222
Joined: Sat Dec 15, 2007 9:51 pm
Windows Version: Windows 7
Avant Version: 2013 Build 23
Default engine: Firefox
IE Version:
Skin:
Contact:

Re: Need to find how to pass url to a program?

Post by sulpherdragon » Fri Aug 29, 2008 9:24 pm

Hi, try this plugin.

You need to enable unsigned activeX and some other stuff to get it to work. I suggest you set it to prompt.

Code: Select all

    var urlX=window.location
    ApplicationX = new ActiveXObject("Shell.Application");
    browserX = "C:\\Program Files\\Maxthon2\\maxthon.exe";
    ApplicationX.ShellExecute(browserX, urlX, "", "open", "1");
Should do what you want, if theres any problems let me know
Attachments
URL2MX2.aba
(2.15 KiB) Downloaded 495 times
Image

Ozcan
Newbie
Newbie
Posts: 4
Joined: Wed Aug 27, 2008 7:48 am
Windows Version: XP Pro SP3
Avant Version: 11.6 b20
IE Version: 7.05730

Re: Need to find how to pass url to a program?

Post by Ozcan » Sat Aug 30, 2008 5:52 am

Wonderful!

However, I had to remove some security settings for this to work.

Many Thanks for this!

Ozcan
Newbie
Newbie
Posts: 4
Joined: Wed Aug 27, 2008 7:48 am
Windows Version: XP Pro SP3
Avant Version: 11.6 b20
IE Version: 7.05730

Re: Need to find how to pass url to a program?

Post by Ozcan » Sat Aug 30, 2008 8:23 am

The control that lets this work is:

Initialize and Script ActiveX NOT SAFE FOR scripting

has to be set to ENABLE.

I also found that you should set

Download Unsigned ActiveX Controls to DISABLE.

You have to set these twice - one in the Internet Security and the other the Intranet Security settings.

In both cases these are high risk settings.

The default for both are DISABLE.

abfan123
Avantus Maximus
Avantus Maximus
Posts: 5624
Joined: Wed Jan 26, 2005 4:24 pm
Windows Version: Vista Ultimate x64 SP2
Avant Version: 11.7 build 43
IE Version: 8
Contact:

Re: Need to find how to pass url to a program?

Post by abfan123 » Sat Aug 30, 2008 10:49 am

Quite weird, Since it didn't work for me. It've just opened Maxthon but didn't opened the current URL.
Here's what worked:

Code: Select all

//Sulpher Dragon

    var urlX="" + window.location + ""

    ApplicationX = new ActiveXObject("Shell.Application");
    browserX = "C:\\Users\\Mike\\AppData\\Roaming\\Maxthon2\\maxthon.exe";
    ApplicationX.ShellExecute(browserX, urlX , "", "open", "1");

(I've just modified the first line to include the quotation marks)


It'd be nice if Avant had some kind of "Script+Command buttons" or it's own commands to know the current URL so that we won't have to lower our security settings.

Also, It didn't worked when I've set the setting to prompt.
I'm not sure whether that's an IE bug or an Avant's bug.
IE8(Pro), Microsoft Security Essentials
Main PC:
Image
Secondary PC same as primary but with Windows 7 x64 Ultimate as the OS.

User avatar
sulpherdragon
Contributor
Contributor
Posts: 222
Joined: Sat Dec 15, 2007 9:51 pm
Windows Version: Windows 7
Avant Version: 2013 Build 23
Default engine: Firefox
IE Version:
Skin:
Contact:

Re: Need to find how to pass url to a program?

Post by sulpherdragon » Sat Aug 30, 2008 3:31 pm

Well java applications (like mozilla addons) would be great. Infact im sure its possible to do it with the current addons and injecting a java/flash applet into an invisible iframe. I just never tried.

Perhaps when orca supports them Avant will will be integrated. As far as i remember, orca was supposed to do both rendering engines and let the user choose which one he wanted to use. (theres a mozilla plugin that allows mozilla to do that and i might check that out to see if it works with orca.)
Image

Post Reply