Jump to content

Recommended Posts

Posted (edited)

Hello

Possible or not

1) Disable click on stroke "Always on Top"

or

2) Delete stroke "Always on Top"

Thank You!

2024-03-16_0000.png

Edited by SharkyEXE
  • SharkyEXE changed the title to Disable click on stroke "Always on Top" or delete stroke "Always on Top"
  • Developers
Posted (edited)

... and again you are cross posting your questions in multiple topics & wrong Forums.   I have removed the other post!

Last warning, after which your posting will be put on mod preview and anything wrong will be removed.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

I guess you want to control tray menu of another program (not yours).  Yes, you can disable the item.  But next time user clicks on the icon, the menu will be shown normally (enabled) because it is controlled by the other program.   So what you would need to do is constantly monitor the appearance of the menu and disable the option every time.

Here a simplistic version of how to disable "Son" option (french OS here) of the speaker tray icon :

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

HotKeySet("{ESC}", Terminate)

Local $hWnd, $hMenu, $iItem
While Sleep(50)
  $hWnd = WinGetHandle("[CLASS:#32768]")
  If Not $hWnd Then ContinueLoop
  $hMenu = _SendMessage($hWnd, $MN_GETHMENU, 0, 0)
  If _GUICtrlMenu_IsMenu($hMenu) Then
    $iItem = _GUICtrlMenu_FindItem($hMenu, "Son")
    If $iItem >= 0 Then _GUICtrlMenu_SetItemState($hMenu, $iItem, $MFS_DISABLED, True)
  EndIf
WEnd

Func Terminate()
  Exit
EndFunc

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...