AndroidZero Posted March 8, 2019 Share Posted March 8, 2019 Hello, how i can add new entry into windows conext menu, for example when right clicking a file? I want add my own entry with its own function. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 8, 2019 Moderators Share Posted March 8, 2019 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
rm4453 Posted March 8, 2019 Share Posted March 8, 2019 http://bfy.tw/MeYw AndroidZero 1 Link to comment Share on other sites More sharing options...
AndroidZero Posted March 11, 2019 Author Share Posted March 11, 2019 Bump Link to comment Share on other sites More sharing options...
Skeletor Posted March 11, 2019 Share Posted March 11, 2019 Windows 10? I assume? Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
Skeletor Posted March 11, 2019 Share Posted March 11, 2019 Go to :C:\Users\Dieser\AppData\Roaming\Microsoft\Windows\SendTo Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
nacerbaaziz Posted March 11, 2019 Share Posted March 11, 2019 hi dear you can do Such as the following first choose your ext that you want to add the entry on it if you want to add it to all exts then use *, or you can use .text for examples then select your name and icon and your script / program path #RequireAdmin $ext = ".txt" $name = "open with notepad" $icon = "c:\test.ico" $path = "c:\Windows\system32\notepad.exe" & " %1" if not ($ext = "*") then $read = RegRead("HKEY_CLASSES_ROOT\" & $ext, "") if @error then $ext = StringReplace($ext, ".", "") & "File" else $ext = $Read endIf else $ext = "*" endIf $HKCR = "HKCR" if @OSArch = "x64" then $HKCR = "HKCR64" RegWrite($HKCR & "\" & $ext & "\shell\" & $name, "", "reg_sz", $name) RegWrite($HKCR & "\" & $ext & "\shell\" & $name, "Icon", "reg_sz", $icon) RegWrite($HKCR & "\" & $ext & "\shell\" & $name & "\command", "", "reg_sz", $path) exit i hope this can help you Link to comment Share on other sites More sharing options...
AndroidZero Posted March 11, 2019 Author Share Posted March 11, 2019 @Skeletor Thank you for this nice idea it's really out of the box never thought about this. Well it wasn't exactly what I wanted but this helps me in another project !! very cool @nacerbaaziz Awww thanks thats what I was searching for !!! You made my day love this community ! nacerbaaziz 1 Link to comment Share on other sites More sharing options...
AndroidZero Posted March 11, 2019 Author Share Posted March 11, 2019 Oh ok I stuck again, I can't figure out how to create a Contextmenu with Subitems. Where I have to add a new key in the Registry ? Here is an example how it looks now I want those blue icons in 1 Menu Entry nacerbaaziz 1 Link to comment Share on other sites More sharing options...
nacerbaaziz Posted March 11, 2019 Share Posted March 11, 2019 here is an example about what you want brother expandcollapse popup#RequireAdmin $ext = ".txt" $mainName = "custtome menu" $mainIcon = "c:\test.ico" $mainPosition = "Top" ;avalable options (Top and middle or Bottom) $name1 = "open with notepad" $icon1 = "c:\test1.ico" $path1 = "c:\Windows\system32\notepad.exe %1" $name2 = "Delete file" $icon2 = "c:\test2.ico" $path2 = 'c:\Windows\System32\cmd.exe /c Del "%1" & exit' If Not ($ext = "*") Then $read = RegRead("HKEY_CLASSES_ROOT\" & $ext, "") If @error Then $ext = StringReplace($ext, ".", "") & "File" Else $ext = $read EndIf Else $ext = "*" EndIf $HKCR = "HKCR" If @OSArch = "x64" Then $HKCR = "HKCR64" ;writing the main menu RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName, "MUIVerb", "REG_SZ", $mainName) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName, "Icon", "REG_SZ", $mainIcon) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName, "ExtendedSubCommandsKey", "REG_SZ", $ext & "\shell\" & $mainName & "\Options") RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName, "Position", "REG_SZ", $mainPosition) ;writing the sub menu RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName & "\Options\shell\" & $name1, "MUIVerb", "reg_sz", $name1) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName & "\Options\shell\" & $name1, "Icon", "reg_sz", $icon1) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName & "\Options\shell\" & $name1 & "\command", "", "reg_sz", $path1) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName & "\Options\shell\" & $name2, "MUIVerb", "reg_sz", $name2) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName & "\Options\shell\" & $name2, "Icon", "reg_sz", $icon2) RegWrite($HKCR & "\" & $ext & "\shell\" & $mainName & "\Options\shell\" & $name2 & "\command", "", "reg_sz", $path2) Exit AndroidZero 1 Link to comment Share on other sites More sharing options...
AndroidZero Posted March 13, 2019 Author Share Posted March 13, 2019 Thanks alot ! I started reading mircosoft dev docs. Here is a link for anyone who is interested in modifying windows shell.https://docs.microsoft.com/en-us/windows/desktop/shell/creating-static-cascading-menus Link to comment Share on other sites More sharing options...
nacerbaaziz Posted March 13, 2019 Share Posted March 13, 2019 your welcome sir thank you for the link that you gave us 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