Jump to content

Determining when a file is right-clicked


Recommended Posts

:lmao:

Just wondering if anybody has figured out how to tell when a File or folder is selected, and Right-clicked.......Trying to disable the Right-click menu just for a particular file or folder, showing a "Unauthorized!!" msgbox if they try to do anything with the file or folder.

any help would be appreciated o:)

Edited by quaizywabbit
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

Attempting to find if an item(s) is selected in the left hand tree box...

not completely worked this out, but if you have the staus bar switched on and parse the text of the first field of that (look at it with the info tool)....

There are enough changes from the standard "[0-9][0-9]* objects" text when things are clicked on (enabled) or group selected to determine if things are actually "highlighted"

use stringinstr or the regexp functions to parse the text

disabling the right click menu is trickier....

registry may not do all of it

is it possible to disable the mouse button itself at that point?

_IsPressed doesnt help here...

Link to comment
Share on other sites

keep in mind that the right-click-menu is not the only way to do sth. with files,

moving, deleting, renaming, show properties, etc. can also be done via hotkeys and explorer-menu, DOS is also fine for handling files.

You should should limit the user-rights to certain folders, 'program files' is tabu etc.

Link to comment
Share on other sites

Thanks for the advice......I know there's a lot more to securing a file/folder than I asked about..., Just looking for reasonably effective ways to keep the average user from altering a file, or folder contents.

#NoTrayIcon
While 1
WinWaitActive("Myapp")
WinClose("MyApp")
MsgBox(4096, "UnAuthorized!!!!", "No access allowed to this folder!!", 3)
WEnd

Simple as the above is, it wont let you open the folder, nor will Right-click "Properties"

so being able to determine when the folder is selected(highlighted) and executing a command to interupt before the Right click menu appears would finish the job more than well enough for my purposes..

[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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