Html ගොනුවල රයිට්ක්ලික් මෙනුවක් අයිතමයක් හදන්නේ කොහොමද?

visula kavinda

Well-known member
  • Jun 18, 2021
    665
    456
    63
    මට Html ෆයිල් එකක් රයිට් ක්ලික් කලාම එන මෙනුවට “අමතර..“ නමින් මෙනු අයිතමයක් හදල
    එය තුල උප අයිතම දෙකක් හදාගන්න අවශ්‍යයි ඒක කරන්නේ කොහොමද?
     

    visula kavinda

    Well-known member
  • Jun 18, 2021
    665
    456
    63
    javascript ona wei, google "javascript custom context menu"
    නෑ බං වින්ඩෝස් රෙජිස්ට්‍රිය සැකසීමෙන් කලයුතු දෙයක් ගැන මම කියන්නේ.

    A/l වලට සිංහලෙන් it කරන එකෙක් වගේ
    මම දැන් කොහොමද ඕක කියන්න ඕනේ
    ------ Post added on Sep 4, 2023 at 10:58 PM
     
    • Haha
    Reactions: lilman

    Amew

    Well-known member
  • Jan 21, 2023
    2,730
    3,623
    113
    හරියට අහපන් අහන උත්තක්. File icon එක right click කලාමද අහන්නේ, නැතනම් browser එකේ open කරලා browser එකේ right click කලාමද?
     
    • Like
    Reactions: vishwadt

    ThisaraMalintha

    Well-known member
  • Nov 16, 2015
    8,612
    7,331
    113
    ගෙදර
    නෑ බං වින්ඩෝස් රෙජිස්ට්‍රිය සැකසීමෙන් කලයුතු දෙයක් ගැන මම කියන්නේ.


    මම දැන් කොහොමද ඕක කියන්න ඕනේ
    ------ Post added on Sep 4, 2023 at 10:58 PM
    :baffled:
    stack overflow eke balapan nattan superuser forum eke
     

    Psiko

    Well-known member
  • Mar 10, 2023
    13,995
    13,906
    113
    🤍
    sinhala tern na bn mataaaaa
    Internet Nerd GIF by MINI Italia
     

    visula kavinda

    Well-known member
  • Jun 18, 2021
    665
    456
    63
    හරියට අහපන් අහන උත්තක්. File icon එක right click කලාමද අහන්නේ, නැතනම් browser එකේ open කරලා browser එකේ right click කලාමද?
    අයිකන්එක රයිට් ක්ලික් කලාම. එන මෙනුවට අයිටම් එකක් එකතු කරලා ඒකට සබ් අයිටම් දෙකක් එකතු කරලා ඒවා හරහා මම හදපු ප්‍රෝග්‍රෑම් 2ක් හරහා පිටුව විවෘත කරගන්න අවශ්‍යයි.

    :baffled:
    stack overflow eke balapan nattan superuser forum eke
    උඹට බෑ නේද?
    ------ Post added on Sep 4, 2023 at 11:05 PM
     

    CorD SaC

    Well-known member
  • Feb 4, 2015
    15,793
    28,163
    113
    මම දැන් කොහොමද ඕක කියන්න ඕනේ
    අයිකන්එක රයිට් ක්ලික් කලාම. එන මෙනුවට අයිටම් එකක් එකතු කරලා ඒකට සබ් අයිටම් දෙකක් එකතු කරලා ඒවා හරහා මම හදපු ප්‍රෝග්‍රෑම් 2ක් හරහා පිටුව විවෘත කරගන්න අවශ්‍යයි.

    Program හදන්න තේරෙනවා. ප්‍රශ්නයක් පැහැදිලිව අහන්න තේරෙන්නේ නෑ. දෙයක් serach කරන්න තේරෙන්නෙ නෑ. බබා වරෙන් වැඩේ ඉවර කරන් තනේ දෙන්න.

    මේවා අපිට පුකේ අමාරුවට search කරන දේවල්

    https://stackoverflow.com/questions...ndows-context-menu-only-for-specific-filetype


    https://stackoverflow.com/questions...ndows-context-menu-only-for-specific-filetype
     

    visula kavinda

    Well-known member
  • Jun 18, 2021
    665
    456
    63
    Program හදන්න තේරෙනවා. ප්‍රශ්නයක් පැහැදිලිව අහන්න තේරෙන්නේ නෑ. දෙයක් serach කරන්න තේරෙන්නෙ නෑ. බබා වරෙන් වැඩේ ඉවර කරන් තනේ දෙන්න.

    මේවා අපිට පුකේ අමාරුවට search කරන දේවල්

    https://stackoverflow.com/questions...ndows-context-menu-only-for-specific-filetype


    https://stackoverflow.com/questions...ndows-context-menu-only-for-specific-filetype
    ඔය ක්‍රෙම්ට උපමෙනු හදන්න බෑනේ
     

    vishwadt

    Well-known member
  • Aug 6, 2010
    367
    605
    93

    https://bard.google.com/ කියපු විස්තර

    How to add a context menu for the specific file types in windows file explorer​


    Sure, you can add a context menu for a specific file type in Windows File Explorer by editing the Windows Registry.

    Here are the steps:

    1. Open the Registry Editor by pressing Windows+R and typing regedit.
    2. Navigate to the following key:
    HKEY_CURRENT_USER\Software\Classes\<file extension>\shell

    Replace <file extension> with the file extension of the file type you want to add a context menu for. For example, to add a context menu for .txt files, you would replace <file extension> with .txt.

    1. Right-click on the shell key and select New > Key.
    2. Name the new key the name of the context menu item you want to add. For example, to add a context menu item called "Open with Notepad", you would name the new key open_with_notepad.
    3. Right-click on the new key and select New > String Value.
    4. Name the new string value command.
    5. Double-click on the command string value and enter the command that you want to run when the context menu item is clicked. For example, to open the file with Notepad, you would enter the following command:
    "C:\Program Files\Notepad++\notepad++.exe" "%1"

    Replace C:\Program Files\Notepad++\notepad++.exe with the path to the Notepad++ executable file on your computer. 8. Click the OK button.

    The new context menu item will now be added to the right-click menu for files with the specified file extension.

    Here are some additional things to keep in mind:

    • The command that you enter in the command string value must be the full path to the executable file.
    • You can also specify additional parameters for the command by adding them after the file path. For example, to open the file in read-only mode, you would add the /r parameter to the command.
    • You can also specify a hotkey for the context menu item by adding a Default value to the key. The value of the Default value should be the hotkey that you want to use.
    I hope this helps! Let me know if you have any other questions.


    How can I add multiple submenu items for that context menu?

    Yes, you can add multiple submenu items for a context menu in Windows File Explorer. To do this, you need to create a submenu key under the main context menu key.

    For example, to add a submenu called "My Submenu" to the "Open with" context menu, you would create a submenu key called open_with\my_submenu.

    You can then add context menu items to the submenu key in the same way that you added them to the main context menu key.

    Here are the steps to add a submenu item to a context menu in Windows File Explorer:

    1. Open the Registry Editor by pressing Windows+R and typing regedit.
    2. Navigate to the following key:
    HKEY_CURRENT_USER\Software\Classes\<file extension>\shell\<context menu item name>

    Replace <file extension> with the file extension of the file type you want to add a context menu for. Replace <context menu item name> with the name of the context menu item you want to add.

    1. Right-click on the shell key and select New > Key.
    2. Name the new key the name of the submenu item you want to add. For example, to add a submenu item called "My Submenu", you would name the new key my_submenu.
    3. Right-click on the new key and select New > String Value.
    4. Name the new string value command.
    5. Double-click on the command string value and enter the command that you want to run when the context menu item is clicked. For example, to open the file with Notepad, you would enter the following command:
    "C:\Program Files\Notepad++\notepad++.exe" "%1"

    Replace C:\Program Files\Notepad++\notepad++.exe with the path to the Notepad++ executable file on your computer. 8. Click the OK button.

    The new submenu item will now be added to the context menu.

    I hope this helps! Let me know if you have any other questions.
     

    visula kavinda

    Well-known member
  • Jun 18, 2021
    665
    456
    63

    https://bard.google.com/ කියපු විස්තර

    How to add a context menu for the specific file types in windows file explorer​


    Sure, you can add a context menu for a specific file type in Windows File Explorer by editing the Windows Registry.

    Here are the steps:

    1. Open the Registry Editor by pressing Windows+R and typing regedit.
    2. Navigate to the following key:
    HKEY_CURRENT_USER\Software\Classes\<file extension>\shell

    Replace <file extension> with the file extension of the file type you want to add a context menu for. For example, to add a context menu for .txt files, you would replace <file extension> with .txt.

    1. Right-click on the shell key and select New > Key.
    2. Name the new key the name of the context menu item you want to add. For example, to add a context menu item called "Open with Notepad", you would name the new key open_with_notepad.
    3. Right-click on the new key and select New > String Value.
    4. Name the new string value command.
    5. Double-click on the command string value and enter the command that you want to run when the context menu item is clicked. For example, to open the file with Notepad, you would enter the following command:
    "C:\Program Files\Notepad++\notepad++.exe" "%1"

    Replace C:\Program Files\Notepad++\notepad++.exe with the path to the Notepad++ executable file on your computer. 8. Click the OK button.

    The new context menu item will now be added to the right-click menu for files with the specified file extension.

    Here are some additional things to keep in mind:

    • The command that you enter in the command string value must be the full path to the executable file.
    • You can also specify additional parameters for the command by adding them after the file path. For example, to open the file in read-only mode, you would add the /r parameter to the command.
    • You can also specify a hotkey for the context menu item by adding a Default value to the key. The value of the Default value should be the hotkey that you want to use.
    I hope this helps! Let me know if you have any other questions.


    How can I add multiple submenu items for that context menu?

    Yes, you can add multiple submenu items for a context menu in Windows File Explorer. To do this, you need to create a submenu key under the main context menu key.

    For example, to add a submenu called "My Submenu" to the "Open with" context menu, you would create a submenu key called open_with\my_submenu.

    You can then add context menu items to the submenu key in the same way that you added them to the main context menu key.

    Here are the steps to add a submenu item to a context menu in Windows File Explorer:

    1. Open the Registry Editor by pressing Windows+R and typing regedit.
    2. Navigate to the following key:
    HKEY_CURRENT_USER\Software\Classes\<file extension>\shell\<context menu item name>

    Replace <file extension> with the file extension of the file type you want to add a context menu for. Replace <context menu item name> with the name of the context menu item you want to add.

    1. Right-click on the shell key and select New > Key.
    2. Name the new key the name of the submenu item you want to add. For example, to add a submenu item called "My Submenu", you would name the new key my_submenu.
    3. Right-click on the new key and select New > String Value.
    4. Name the new string value command.
    5. Double-click on the command string value and enter the command that you want to run when the context menu item is clicked. For example, to open the file with Notepad, you would enter the following command:
    "C:\Program Files\Notepad++\notepad++.exe" "%1"

    Replace C:\Program Files\Notepad++\notepad++.exe with the path to the Notepad++ executable file on your computer. 8. Click the OK button.

    The new submenu item will now be added to the context menu.

    I hope this helps! Let me know if you have any other questions.
    වැරදියි
     

    vishwadt

    Well-known member
  • Aug 6, 2010
    367
    605
    93
    වැරදියි
    ප්රෝග්‍රමර් කෙනෙක් හැමවෙලාවෙම තනියෙම තම ගැටලුව විසදන්න පුළුවන් විය යුතුයි. ඒ සඳහා යා යුතු පාර අඳුනා ගත යුතුයි. බොහෝ දෙනා පුරුදු වෙලා තියෙන්නේ stuckoverflow හෝ වෙනත් සයිට් සහ AI වලින් පිළිතුර සොයන්න. නමුත් සමහර ගැටළු වලට විසදුම් එතන නැහැ නමුත් යා යුතු පාර එතනින් පෙන්වනවා.

    මම bard එකෙන් පෙන්වූ පිළිතුර සහ මෙයට කලින් කෙනෙක් සර්ච් කරලා පෙන්වපු ලින්ක් වල ඔබට අවශ්‍ය විසදුම කෙලින්ම නැහැ එක ඇත්ත නමුත් එහි ඒ ගැන සොයන්න වැදගත් වචන තියෙනවා. මම පෙන්වුවේ ඔබට අවශ්‍ය දෙය සොයන ආකාරය සහ ඒ සඳහා අවශ්‍ය වචන. උදාහරණය ඔබට අවශ්‍ය context menu එකට යම් file type එකක් සඳහා sub menu items එකතු කිරීම.

    ඒ වචන හරහා සර්ච් කරාම පේනවා windows registry එකට entries දාන්න ඕන බව. ඒ නිසා windows file explorar එක සඳහා context menu දැමීමට අවශ්‍ය windows registry ගැන ඇති reference documents follow කරන්න. එතකොට ඔබට පෙනීවී ඔබට අවශ්‍ය දෙය කල හැකි නොහැකි බව හෝ කලයුතු ආකාරය.
     

    poopoo

    Well-known member
  • Nov 18, 2021
    5,766
    11,431
    113
    මට Html ෆයිල් එකක් රයිට් ක්ලික් කලාම එන මෙනුවට “අමතර..“ නමින් මෙනු අයිතමයක් හදල
    එය තුල උප අයිතම දෙකක් හදාගන්න අවශ්‍යයි ඒක කරන්නේ කොහොමද?
    like this?

    1693870726557.png