Thunder-man Posted December 21, 2006 Share Posted December 21, 2006 Hello, I use the script "The Modded Calculator" It´s cool I would like to have gladly only the Menuitem (No popup) It work, but the MsgBox comes 2 times. (MsgBox(0,"","You found me!",3) Where is the error? ; Gather information... $iThreadIdTarget = _GetWindowThreadProcessId($hWndTarget) $hInstTarget = DllCall("user32.dll","long","GetWindowLong","hwnd",$hWndTarget,"int",$GWL_HINSTANCE) $hInstTarget = $hInstTarget[0] ; Get Handle to Program $hMenuTarget = DllCall("user32.dll", "hwnd", "GetMenu", "hwnd", $hWndTarget) $hMenuTarget = $hMenuTarget[0] ; Add our menuitem $MENUID = 380;Unique ControlID to be created DllCall("user32.dll","int","AppendMenu","hwnd",$hMenuTarget,"int",$MFT_STRING,"hwnd",$MENUID,"str","Test") DllCall("user32.dll","int","DrawMenuBar","hwnd",$hWndTarget); Redraw Menu How do I get an empty place to the old menu? e.g. File Edit View..............MyMenu THX Frank Link to comment Share on other sites More sharing options...
Thunder-man Posted December 21, 2006 Share Posted December 21, 2006 sorry, has to say forgotten. I use not Calc, but another program Link to comment Share on other sites More sharing options...
hqprog Posted March 15, 2007 Share Posted March 15, 2007 (edited) The Modded Calculator Added Button and menu The Modded Calculator is a _very_ nice way to add a menu item. Could someone tell me if adding a menu item also possible with ANYGUI.au3 or does that add controls just to the window application area below the title and menubar? Thank you. Edited March 15, 2007 by hqprog Link to comment Share on other sites More sharing options...
XxXFaNtA Posted March 15, 2007 Share Posted March 15, 2007 Really like it Would be nice to see it somehow in a GUI (if possible) so I could add stuff more easily...Tried to change some stuff for other programs, but the only thing that worked was the Button (the Menu didn't appear ) Greert, FaNtA /[center][/center] Link to comment Share on other sites More sharing options...
hqprog Posted March 16, 2007 Share Posted March 16, 2007 see last postHi Piccaso,The hook.dll approach is very nice and I might use it - but it would be nice to use BYPOSITION to create menuitem anywhere rather than just append at end It appear the dll may support other functions besides "AppendMenu" such as "Insert Menu" and possibly others (?)Is there some documentation of the dll available? Thanks. Link to comment Share on other sites More sharing options...
hqprog Posted March 16, 2007 Share Posted March 16, 2007 (edited) Hi Piccaso, The hook.dll approach is very nice and I might use it - but it would be nice to use BYPOSITION to create menuitem anywhere rather than just append at end To be more specific, I'm trying to modify the code of ModCalc.au3 as shown below I changed the DllCall to use the InsertMenu command with $MF_BYPOSITION Is the DllCall for InsertMenu configured properly? (it appears to work ok) However I cannot get the submenus to popup - so am not sure the submenu handle is correctly configured Should the InsertMenu command also be used for DllCall for submenus? Or something more I am missing in the MSDN documentation on menus Any suggestions would be much appreciated Cheers! ; ORIGINAL from ModCalc.au3 ; Add new PopupMenu $hSubMenuTarget = DllCall("user32.dll","hwnd","CreatePopupMenu") $hSubMenuTarget = $hSubMenuTarget[0] DllCall("user32.dll","int","AppendMenu","hwnd",$hMenuTarget,"int",$MFT_POPUP,"hwnd",$hSubMenuTarget,"str","&NewMenu") ; Add our menuitem $MENUID = 380 ;Unique ControlID to be created DllCall("user32.dll","int","AppendMenu","hwnd",$hSubMenuTarget,"int",$MFT_STRING,"int",$MENUID,"str","New&Item") ; Add a Separator DllCall("user32.dll","int","AppendMenu","hwnd",$hSubMenuTarget,"int",$MFT_SEPARATOR,"int",1,"str","") $MENUID_REMOVE = 382 ;Unique ControlID to be created DllCall("user32.dll","int","AppendMenu","hwnd",$hSubMenuTarget,"int",$MFT_STRING,"int",$MENUID_REMOVE,"str","Remove &Modification") DllCall("user32.dll","int","DrawMenuBar","hwnd",$hWndTarget) ; Redraw Menu ; MODIFIED ; Add new PopupMenu $hSubMenuTarget = DllCall("user32.dll","hwnd","CreatePopupMenu") $hSubMenuTarget = $hSubMenuTarget[0] DllCall("user32.dll","int","InsertMenu","hwnd",$hMenuTarget,"int",2,"int",$MF_BYPOSITION,"int",$MFT_POPUP,"str","&NewMenu") ; CHANGED to InsertMenu BYPOSITION ; Add our menuitem $MENUID = 380 ;Unique ControlID to be created DllCall("user32.dll","int","AppendMenu","hwnd",$hSubMenuTarget,"int",$MFT_STRING,"int",$MENUID,"str","New&Item") ; Add a Separator DllCall("user32.dll","int","AppendMenu","hwnd",$hSubMenuTarget,"int",$MFT_SEPARATOR,"int",1,"str","") $MENUID_REMOVE = 382 ;Unique ControlID to be created DllCall("user32.dll","int","AppendMenu","hwnd",$hSubMenuTarget,"int",$MFT_STRING,"int",$MENUID_REMOVE,"str","Remove &Modification") DllCall("user32.dll","int","DrawMenuBar","hwnd",$hWndTarget) ; Redraw Menu Edited March 16, 2007 by hqprog Link to comment Share on other sites More sharing options...
Biatu Posted March 13, 2014 Share Posted March 13, 2014 Two things... 1.Can we use hook.dll to create context menu entries on the right click menu of explorer? 2. Can hook.dll be updated so that it can be used with the MemoryDll UDF? Thanks What is what? What is what. Link to comment Share on other sites More sharing options...
jchd Posted March 14, 2014 Share Posted March 14, 2014 Do you realize the distance that light travelled since the last post in this thread? You're lost somewhere between Luhman 16 and Wolf 359. Bert and FlashpointBlack 2 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Bert Posted March 14, 2014 Share Posted March 14, 2014 I'm thinking of a round trip to Proxima Centauri and being most of the way back to Sol..... The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now