Jump to content

Recommended Posts

Posted

It is not an easy task...

This example add "Empty Recycle Bin" to the Desktop Context Menu:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Recycle Bin]
@="{645FF040-5081-101B-9F08-00AA002F954E}"

But...

1 - Needs an "CLSID"

2 - "InProcServer32" with corresponding DLL (The OS ONLY reads the entrance of an DLL...)

3 - You would need to create an situation similar to this...

Or...

You can HOOK this PopUp Menu

The maximmun that I got was that:

#include <GuiMenu.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>

Global $vAbout

$hSystemMenu = _GUICtrlMenu_GetSystemMenu(GUICreate("Hook System Menu"))
_GUICtrlMenu_GetItemCount($hSystemMenu)
_GUICtrlMenu_AppendMenu($hSystemMenu, $MF_SEPARATOR, 0, "")
_GUICtrlMenu_AppendMenu($hSystemMenu, $MF_STRING, $vAbout, "&About AutoIt")

GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND")

While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd

Func AboutAutoIt()
    MsgBox(4096, "About", "The AutoIt version is: " & @AutoItVersion)
EndFunc   ;==>AboutAutoIt

Func WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam)
    If BitAND($wParam, 0xFFFF) = $vAbout Then AboutAutoIt()
EndFunc   ;==>WM_SYSCOMMAND

I am also crazy for knowing how to do that :D

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

  • 2 weeks later...
Posted (edited)

Ok, today I so many info about this... (was interested in this)

And heard that IN WIN XP we can use ONLY Active X Functions LIKE JSCript wrote:

====

[HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Recycle Bin]

@="{645FF040-5081-101B-9F08-00AA002F954E}" <<<<<<<<<<<<<<<<

====

BUT in WIN VISTA here: HKEY_CLASSES_ROOT\Directory\Background\

exist key called "shell" and there we can create eny new item like i did on my picture... :)

p.s: was idea to create simple script and add few items like: Next Wallpaper Prev Wallpaper e.t.c

Edited by Enforcer
[RU] Zone

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...