Posts: 1,271
Threads: 399
Joined: Mar 2003
i want to add qm to my internet explorer context menu.
please give me an vb example for passing arguments to qm.
function macro name will be qm_ie_proxy.
one entry (swfdecompiler) is calling from registry a html file with content
<script language="VBScript">
Set topWin = external.menuArguments.top
topWin.focus
Set obj = CreateObject("SWFDecompiler.InternetExplorer")
obj.GetSWFFile topWin.document
</script>
Posts: 12,072
Threads: 140
Joined: Dec 2002
There is an example in QM help, "Triggers: command line" topic. It is for Visual Basic. Does VBScript has Shell() or other function to launch files?
Posts: 1,271
Threads: 399
Joined: Mar 2003
ok, needs some additional code, but it works on links.
i made a subfolder in qm dir ->context, in it there is a file with name
qm.html.
content:
<script language="VBScript">
sURL = window.external.menuArguments.event.srcElement.href
createObject("WScript.Shell").run "qmcl.exe " + "M ""ie_context"" A " + sURL + ""
</script>
registry file to add qm to the ie context menu
(you will have to change the path to qm.htm)
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\qm_proxy]
@="C:\\Programme\\Quick Macros 2\\context\\qm.htm"
"contexts"=dword:00000020
macro ie_context
function [$text]
if text = 0
mes "huhu"
else
mes text
Posts: 1,271
Threads: 399
Joined: Mar 2003
first version of an installer script for qm_ie_proxy.
please run first qm_ie_installer and restart internet explorer (or maxthon, myie, avant,etc).
you will now have a new entry on right click a link.
(how to i create a new macro by script ?)
Attached Files
qm_ie_proxy.qml (Size: 778 bytes / Downloads: 559)
Posts: 1,271
Threads: 399
Joined: Mar 2003
nice trick:
let your qm_ie_proxy name begin with a dot and
it appears on top of the menu.
Posts: 1,271
Threads: 399
Joined: Mar 2003
i really miss a qm dialog for regex ...
what is the findx syntax for getting the filename of an url ?
http://www.quickmacros.com/forum/templates/subSilver/images/logo_phpBB.gif
Posts: 12,072
Threads: 140
Joined: Dec 2002
Yes it works (in Avant).
___________________
Quote: i really miss a qm dialog for regex
Floating toolbar -> More Tools -> reg. expr. menu.
If you are manipulating strings in QM, php or other language, knowing regular expressions can make your life much easier. It's really worth to learn.
One example for url is in QM help, findrx. It is not perfect.
Alternatively, you can use function InternetCrackUrl. Example is in IntPost function. More info:
http://msdn.microsoft.com/library/
____________________
Quote: how to i create a new macro by script?
Create a function that would create new macro (
newitem ), and call that function from a script.
Posts: 1,271
Threads: 399
Joined: Mar 2003
i mean a qm regex builder dialog :oops:
yes, focus is on regex,
but i learn faster with examples.
i tried
but i don't get the expected result ...
you see ?
i promise to learn that intensively in the next days.
so how do i get the rest of a string after the last delimiter ?
hock:
should be a button in qm_regex :
http://www.regexlib.com/
ooh and that :
http://www.regexlib.com/webservices.asmx
Posts: 12,072
Threads: 140
Joined: Dec 2002
[color=blue]lpstr [/color]url="http://www.quickmacros.com/forum/templates/subSilver/images/logo_phpBB.gif"
[color=blue]out str[/color]'s.getfilename(url 1)
Posts: 1,271
Threads: 399
Joined: Mar 2003
Gintaras Wrote: [color=blue]lpstr [/color]url="http://www.quickmacros.com/forum/templates/subSilver/images/logo_phpBB.gif"
[color=blue]out str[/color]'s.getfilename(url 1)
doh ! :oops:
ok, new code for qm_ie_proxy :
function $url
str fn.getfilename(url 1)
str s ss
if(IntGetUrl(url &s))
ss.searchpath("$Desktop$");
ss.format("$Desktop$\%s" fn)
s.setfile(ss)
run ss
Posts: 331
Threads: 60
Joined: May 2006
how would i run an exe from a right click menu item ??? or a macro
Posts: 1,271
Threads: 399
Joined: Mar 2003
JOHN_ Wrote: how would i run an exe from a right click menu item ??? or a macro hock:
take a look on my example.
qm ie handler
you may also read this:
The Old New Thing : Extending the Internet Explorer context menu