利用IE浏览器 [英] Utilizing IE

查看:76
本文介绍了利用IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我知道这个新闻组并不是100%相关,但也许有人

知道答案或知道在哪里指向正确的方向。


我正在进行我的应用程序在工具栏和菜单中添加一个项目

Internet Explorer。我想要发生的是当您按下项目或

按钮以启动我的应用程序并通过命令行在

浏览器中传递当前URL。我完全启动了应用程序,

但我不确定如何获取并传递当前URL。


有两种可能的方法,我能想到,


1. IE可能会使用一个变量传递给应用程序。

因此注册表项Exec指定处理项目时可执行文件的位置

可以包含URL变量,即


c:\ myapplication.exe%currenturl


2.启动脚本而不是可执行文件,并使用脚本

获取当前URL并从那里启动应用程序。但是我没有使用Java脚本来获得这样的经验,只需要查看其他脚本

我的工作非常相似,我认为我可以做到。有没有人

知道这是否可能?


基本上我确定必须可以做这个简单的任务,但是

还没有在任何地方找到一个有效的例子。如果有人有任何指示我将会非常感激。再次感谢。


尼克。


-

/ \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

无论如何。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

解决方案

我想我会使用JavaScript。你需要的位置对象


在这个例子中你可以在一个新窗口中启动,但你可以修改它


s = new String (state.value)

var loc = location.protocol +& quot; //& quot; + location.hostname +

& quot; /gensurv.nsf/HINT_SURVEY_HEADER_& quot; + s +& quot;?openPage& quot ;;


var ops =

& quot; height = 300,width = 400,screenX = 100,screenY = 500,toolbar = no,scrollbars = yes

,alwaysRaised = yes,locationbar = no& quot ;;

window.open(loc,& quot ; Survey_Header_Help& quot;,ops);

干杯


-

问候 - 一个手持人


作者:Fish .NET&保持.NET

======================================= ==

此帖子按原样提供。没有保证,

并且不授予任何权利。

Nak < a@a.com>在消息中写道

新闻:例如************** @ TK2MSFTNGP09.phx.gbl ...

你好,

我知道这个新闻组并不是100%相关,但也许有人知道答案或者知道在哪里指出正确的方向。

我我正在进行我的应用程序添加一个项目到工具栏和Internet Explorer中的菜单
。我想要发生的是当你按下我的应用程序的项目或
按钮启动并通过命令行在
浏览器中传递当前URL。我完全启动了应用程序,
但我不确定如何获取并传递当前的URL。

我可以想到两种可能的方式,

1. IE可能会使用一个变量传递给应用程序。
因此注册表项Exec指定处理项目时要启动的可执行文件
的位置可以包含URL变量,即

c:\ myapplication.exe%currenturl

2.启动脚本而不是可执行文件,让脚本获取当前URL并从那里启动应用程序。但我有
没有经验的Java脚本来做这件事,只是从查看其他脚本
工作非常相似,我认为我可以做到。有没有人知道这是否可能?

基本上我确定必须可以完成这个简单的任务,
但是还没有在任何地方找到一个有效的例子。如果有人有任何指示我会非常感激。再次感谢。

尼克。

-

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \\ \\ / \\ \\ \\ \\无论如何。无论结果如何,你都会被改变。

Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \


Nick。

Url在java脚本中document.url

一些可能有用的提示你:


我从来不确定这个但是试试看,所以如果有些小东西

错了就不要责怪我。

有mshtml.htmldocument,您可以使用它来使用html文档模型。

您必须参考Microsoft.mshtml

D'' nt导入,因为你的文件所在的代码将会变得很糟糕因为其中包含的对象并冻结了你的IDE

eve ry声明。

只是用它作为....作为mshtml.htmldocument

如果你到目前为止还没有这个信息,我想你可以去很多

进一步

Cor


尼克,

现在我看到来自的邮件OHM我发的邮件是关于当前位于浏览器首页的

文件中的网址

打开文件是正常的window.open( Url)像OHM一样提供了

(他添加了更多内容,但我并没有真正看到它)

也许我确实理解错误而不是抱歉。

Cor


Hi there,

I know this isn''t 100% relevant in this newsgroup, but maybe someone
knows the answer or knows where to point me in the right direction.

I am making my appliction add an item to the toolbar and to the menu in
Internet Explorer. What I want to happen is when you press the item or
button for my application to launch and to be passed the current URL in the
browser via the command line. I have the application launching perfectly,
but am unsure how to get and pass the current URL.

There were 2 possible ways that I can think of,

1. There may be a variable that IE uses to pass to the application.
So the registry key "Exec" that specifies the location of the executable to
launch when the item is processed could contain the URL variable, i.e.

c:\myapplication.exe %currenturl

2. Launch a script instead of an executable and have the script
obtain the current url and launch the application from there. But I have no
experience of Java script to do this, Just from looking at other scripts
that work very similarly I presume I would be possible to do. Does anyone
know if this is possible?

Basically I''m sure that it must be possible to do this simple task, but
have yet to find a working example anywhere. If anyone has any pointers I
would be most appreciative. Thanks again.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

解决方案

I think I would use JavaScript. The location object is what you need

in this example you can launch in a new window, but u can mod it

s= new String( state.value )
var loc = location.protocol + &quot;//&quot; + location.hostname +
&quot;/gensurv.nsf/HINT_SURVEY_HEADER_&quot; + s + &quot;?openPage&quot;;

var ops =
&quot;height=300,width=400,screenX=100,screenY=500 ,toolbar=no,scrollbars=yes
,alwaysRaised=yes,locationbar=no&quot;;
window.open( loc ,&quot;Survey_Header_Help&quot;, ops);
Cheers

--
Regards - One Handed Man

Author : Fish .NET & Keep .NET
=========================================
This posting is provided "AS IS" with no warranties,
and confers no rights.
"Nak" <a@a.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...

Hi there,

I know this isn''t 100% relevant in this newsgroup, but maybe someone
knows the answer or knows where to point me in the right direction.

I am making my appliction add an item to the toolbar and to the menu in Internet Explorer. What I want to happen is when you press the item or
button for my application to launch and to be passed the current URL in the browser via the command line. I have the application launching perfectly,
but am unsure how to get and pass the current URL.

There were 2 possible ways that I can think of,

1. There may be a variable that IE uses to pass to the application.
So the registry key "Exec" that specifies the location of the executable to launch when the item is processed could contain the URL variable, i.e.

c:\myapplication.exe %currenturl

2. Launch a script instead of an executable and have the script
obtain the current url and launch the application from there. But I have no experience of Java script to do this, Just from looking at other scripts
that work very similarly I presume I would be possible to do. Does anyone
know if this is possible?

Basically I''m sure that it must be possible to do this simple task, but have yet to find a working example anywhere. If anyone has any pointers I
would be most appreciative. Thanks again.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ "No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\



Nick.
The Url is in java Script "document.url"
Some tips that maybe can help you:

I am never sure from this but try it, so dont blame me if some little things
are wrong.

There is mshtml.htmldocument with which you can use the html documentmodel.
There for you have to make a reference to Microsoft.mshtml
D''nt import that, because your code from the file where it is on will become
terrible slow because of the objects that are in it and freezes your IDE at
every declaration.
Just use it as .... as mshtml.htmldocument
If you didn''t had this information till now, I think that you can go a lot
further
Cor


Nick,
Now I see the mail from OHM what I did mail, is about the Url that is in the
document currently in the top page from the browser
To open a document is the normal window.open(Url) like OHM provided
(He added something more, but I did not real look at that)
Maybe I did understand it wrong than sorry for that.
Cor


这篇关于利用IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆