Jump to content

Wingethandle doesn't work when unattended


Recommended Posts

If you MUST use send or controlsend, then you MUST always run on a desktop with an active user session (as related to using the windows menu)

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

That could be, does the spy tool see it as something else?  there are other functions to interact with diff control types acting as menus.  or you aren't calling the function with the proper variables. ..but that's a guess because you won't provide your attempt at it.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

There we go, half way there.  you can add in another string for the menu sub item you want to exercise.   go back and checkout my notepad example how i opened the file menu's open item.  just an fyi, the function won't actually open the menu, but will do the same thing as the user clicking the menu option

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

By the way psexec is just a way too remotely start your compiled script, this issue will still need to be resolved

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

You won't see the menu open/expand.   what is the string of the menu item you are attempting to 'click'

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Please answer the question...what is the FULL string of the menu item related when you send q!

 

Example of opening the 'Open' window in notepad...you can send alt + f, then o...but you can also do this:

Winmenuselectitem ($h,"","&File","&Open...")

which works in ALL scenarios.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

good, try this:

 

Winmenuselectitem ($h,"","&File","Material Re&quirements Planning...")

the q is underlined, yes?

 

Edit, I had an additional space at the end of the string...remove that.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Yes, the q is underlined and yes that is exactly what I had.  It doesn't work.  Another window should open when I do that and that window is not open.  Nor is it active anywhere.  I checked in task manager to see if it was just open and I couldn't see it.

Edited by LCote
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...