Jump to content

Explorer Context Menu - Check and Selection


tiny
 Share

Recommended Posts

Hi,

I'm trying to write an AutoIt Script which should use an Explorer Context Menu entry.

For example:

File.xyz --> Shift+F10 --> Context Menu appears

--------Entries -------

Open

Explore

Search

...

Test

Now I wanne check if Test exists at target computer. And if it is useable it sould be selected and started.

Can anybody help me? Thanks.

Link to comment
Share on other sites

Hi,

I'm trying to write an AutoIt Script which should use an Explorer Context Menu entry.

For example:

File.xyz --> Shift+F10 --> Context Menu appears

--------Entries -------

Open

Explore

Search

...

Test

Now I wanne check if Test exists at target computer. And if it is useable it sould be selected and started.

Can anybody help me? Thanks.

Check out the demos in Auto3Lib regarding the handling of popup menus. If you get stuck, post a small example of what you're trying to do in the Auto3Lib thread (Examples forum) and I'll try to help you out.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

@Tiny

Maybe this can help you get going.

$objShell = ObjCreate("Shell.Application")
$objFolder = $objShell.Namespace("C:\_\Apps\AutoIT3")
$objFolderItem = $objFolder.ParseName("Test.au3")


$colVerbs = $objFolderItem.Verbs

For $objVerb in $colVerbs
   MsgBox(0,"",$objVerb())
Next

Enjoy !!

ptrex

Link to comment
Share on other sites

@ptrex

Cool, that's working great. But I have two additional Problems.

First the entry is inside the context menu, but it is greyed out. Can I check if the item is valid?

And second question. Is there an Option to select and run the item if it's valid?

Thanks for your help.

Link to comment
Share on other sites

Link to comment
Share on other sites

@Tiny

This is the command to activate it.

$objFolderItem.InvokeVerb("YourNameHere") ;Activates command from the context menu

If it is grayed out it will not run.

regards

ptrex

Thank you again, that works.

I had build a loop whitch tries to start the extension tree times. If the option is greyed out I stop the execution.

Link to comment
Share on other sites

  • 1 year later...

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...