SOHH

send ("{APPSKEY}") not getting all memu items from "Component Services" window

7 posts in this topic

send ("{APPSKEY}") not getting all memu items from "Component Services" window?

If you press APPSKEY from the keaboard or right click on an item you should get (Export, Start...Properties, Help) but, when you use send ("{APPSKEY}")  you don't get "Properties" which I need to work on.

I've also tried, Send("{SHIFTDOWN}{F10}{SHIFTUP}") and  Send("{LSHIFT}+{F10}") but, no luck!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Show your not working script. So we can dig in.

 

Edit:  And welcome to the Forum. :D

Edited by Exit

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

Following is the portion of the function from my script.   I'm working on Windows Server 2008 R2 Standard Service Pack 1 with AutoIt v3.3.12.0

-----------------------------

Func _COMPONENT_SERVICE($ENV_C)
   Run("dcomcnfg.exe")
   Sleep(2000)
   WinWaitActive("Component Services")
   Sleep(1000)
   Send("{HOME}")
   Sleep(1000)
   Send("{DOWN}")
   WinWaitActive("Component Services","Component Services")
   Sleep(3000)
   Send("{RIGHT}")
   Send("{DOWN}")
   WinWaitActive("Component Services","\Computers")
   Sleep(2000)
   Send("{RIGHT}")
   Send("{DOWN}")
   WinWaitActive("Component Services","\My Computer")
   Sleep(2000)
   Send("{RIGHT}")
   Send("{DOWN}")
   WinWaitActive("Component Services","\COM+ Applications")
   Sleep(2000)
   Send("{RIGHT}")
   Sleep(2000)
   Send("REPORTS" & $ENV_C)
   WinActive("Component Services","\REPORTS" & $ENV_C)
   Send("{RIGHT}")
   Send("{LSHIFT}+{F10}")  ; This is where I need "Properties",
   ; If you manually press "APPSKEY" or right click from "COM+ Application", you get the "Properties" items in the sub menu.
   ;

Share this post


Link to post
Share on other sites

To make litle clear... you don't get "Delete" and "Properties" on the context menu.    I even tried it with adding the line "#requireadmin"... still no luck!

Share this post


Link to post
Share on other sites

I got it working by accidently!!!  :)

I added a IsAdmin() function to check if the script is running with administrator privileges. This function verified that my script was running with administrator privileges and also it must triggered to run with administrator privileges.  When I removed  IsAdmin() function then, it was not working again.  So, it does not make sense but IsAdmin() function enabled the administrator privileges.:blink:  This has to be a bug!
 

Thanks "Exit" for looking into my problem!  You have a nice day!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Just a circumvention for the requireadmin problem. Run those two lines to call the program:

$iPid = Run(@ComSpec & " /c " & 'Start dcomcnfg.exe ', "", @SW_HIDE)
    $handle = (WinWait("[Class:MMCMainFrame]", "", 0) ? (WinActivate("[LAST]") ? WinWaitActive("[LAST]") : 0) : SetError(1, 0, 0))

BTW

Send("{LSHIFT}+{F10}")  ; This is where I need "Properties",

does not work. You should use

Send("+{F10}")  ; This will show "Properties",

"+" means SHIFT

Edited by Exit

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

Hi EXIT,

I did tried all kinds of way (what pepople from "web/ Internet" said this might work...), including the right way, Send("+{F10}"to show the the property but nothing worked.  This is when I postedthe problem to this Forum. :) 

Anyway, no commands / functions will show properties if you don't put/ use "IsAdmin()" just before using Send("+{F10}").

I know this does not make any sense but, it works.  Like I said I found this by accidently and I'm pretty sure this is a bug!

Thanks.

Share this post


Link to post
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