SOHH Posted July 20, 2015 Share Posted July 20, 2015 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! Link to comment Share on other sites More sharing options...
Exit Posted July 20, 2015 Share Posted July 20, 2015 (edited) Show your not working script. So we can dig in. Edit: And welcome to the Forum. Edited July 20, 2015 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
SOHH Posted July 20, 2015 Author Share Posted July 20, 2015 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. ; Link to comment Share on other sites More sharing options...
SOHH Posted July 20, 2015 Author Share Posted July 20, 2015 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! Link to comment Share on other sites More sharing options...
SOHH Posted July 20, 2015 Author Share Posted July 20, 2015 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. This has to be a bug! Thanks "Exit" for looking into my problem! You have a nice day! Link to comment Share on other sites More sharing options...
Exit Posted July 20, 2015 Share Posted July 20, 2015 (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))BTWSend("{LSHIFT}+{F10}") ; This is where I need "Properties",does not work. You should useSend("+{F10}") ; This will show "Properties","+" means SHIFT Edited July 20, 2015 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
SOHH Posted July 21, 2015 Author Share Posted July 21, 2015 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now