Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qm ie handler
#1
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
Code:
Copy      Help
<script language="VBScript">
    Set topWin = external.menuArguments.top
    topWin.focus
    Set obj = CreateObject("SWFDecompiler.InternetExplorer")
    obj.GetSWFFile topWin.document
</script>

Idea
pi
#2
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?
#3
just investigating ...

Launch a VB Program from the IE Context Menu
http://www.freevbcode.com/ShowCode.asp?ID=4553
#4
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:
Code:
Copy      Help
<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)
Code:
Copy      Help
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
Code:
Copy      Help
function [$text]
if text = 0
    mes "huhu"
else
    mes text
pi
#5
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
.qml   qm_ie_proxy.qml (Size: 778 bytes / Downloads: 559)
pi
#6
nice trick:

let your qm_ie_proxy name begin with a dot and
it appears on top of the menu.
pi
#7
i really miss a qm dialog for regex ...

what is the findx syntax for getting the filename of an url ?



Code:
Copy      Help
http://www.quickmacros.com/forum/templates/subSilver/images/logo_phpBB.gif

Code:
Copy      Help
logo_phpBB.gif
pi
#8
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.
#9
i mean a qm regex builder dialog :oops:

yes, focus is on regex,
but i learn faster with examples.

i tried
Code:
Copy      Help
/?[.]/$
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 ?
Confusedhock:

should be a button in qm_regex :
http://www.regexlib.com/

ooh and that :
http://www.regexlib.com/webservices.asmx
pi
#10
Code:
Copy      Help
[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)
#11
Gintaras Wrote:
Code:
Copy      Help
[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 :
Code:
Copy      Help
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
pi
#12
how would i run an exe from a right click menu item ??? or a macro
#13
JOHN_ Wrote:how would i run an exe from a right click menu item ??? or a macro
Confusedhock:
take a look on my example.
qm ie handler

you may also read this:
The Old New Thing : Extending the Internet Explorer context menu
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)