File menu

How would I programmatically use the file menus at the top of a program? The menus like File, Edit, View, etc. I need to open the File menu.

Comments

  • : How would I programmatically use the file menus at the top of a program? The menus like File, Edit, View, etc. I need to open the File menu.

    Do you mean you want a python script to control another program by selecting it's menus? Look up "pywinauto" in Google.

    Or do you mean you have a GUI program written in Python (TKinter, wxPython, etc) and you want to make the menu display automatically?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : How would I programmatically use the file menus at the top of a program? The menus like File, Edit, View, etc. I need to open the File menu.
    :
    : Do you mean you want a python script to control another program by selecting it's menus? Look up "pywinauto" in Google.
    :
    : Or do you mean you have a GUI program written in Python (TKinter, wxPython, etc) and you want to make the menu display automatically?
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    ok, sorry for the dumb question you already answered in my other posting. I can get to there, but I don't know what the program is called by Python so I can do the app.'program'.MenuSelect, do you know a way to find the name? I've already tried all the obvious ones.

  • : ok, sorry for the dumb question you already answered in my other posting. I can get to there, but I don't know what the program is called by Python so I can do the app.'program'.MenuSelect, do you know a way to find the name? I've already tried all the obvious ones.

    I haven't used it much, but don't you use the caption in the title bar of the application as the name?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : ok, sorry for the dumb question you already answered in my other posting. I can get to there, but I don't know what the program is called by Python so I can do the app.'program'.MenuSelect, do you know a way to find the name? I've already tried all the obvious ones.
    :
    : I haven't used it much, but don't you use the caption in the title bar of the application as the name?
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    No, None of the names on the Title Bar are recognized by Python.
  • : No, None of the names on the Title Bar are recognized by Python.

    Can you post some code so I can see what you're trying to do?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : No, None of the names on the Title Bar are recognized by Python.
    :
    : Can you post some code so I can see what you're trying to do?
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    here it is.

    import pywinauto.application
    app = pywinauto.application.Application()
    app.start_('C:Program FilesAspenTechAspen Plus 2004GUIXeqTapwn.exe')
    app.AspenPlusStartup.RadioButton1.Click()
    app.AspenPlusStartup.OK.Click()
    This is the line where I would use the menubar that is along the top of the program to run the model I loaded above.
  • : import pywinauto.application
    : app = pywinauto.application.Application()
    : app.start_('C:Program FilesAspenTechAspen Plus 2004GUIXeqTapwn.exe')
    : app.AspenPlusStartup.RadioButton1.Click()
    : app.AspenPlusStartup.OK.Click()

    And this all works ok?

    : This is the line where I would use the menubar that is along the top of the program to run the model I loaded above.

    Ok, so what is the exact text of the application's title bar?


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : import pywinauto.application
    : : app = pywinauto.application.Application()
    : : app.start_('C:Program FilesAspenTechAspen Plus 2004GUIXeqTapwn.exe')
    : : app.AspenPlusStartup.RadioButton1.Click()
    : : app.AspenPlusStartup.OK.Click()
    :
    : And this all works ok?
    :
    : : This is the line where I would use the menubar that is along the top of the program to run the model I loaded above.
    :
    : Ok, so what is the exact text of the application's title bar?
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    yes, it all works.
    The exact text is:

    Simulation 1 - Aspen Plus 2004 - aspenONE - [Process Flowsheet Window]
  • : The exact text is:
    :
    : Simulation 1 - Aspen Plus 2004 - aspenONE - [Process Flowsheet Window]

    I found this FAQ, maybe it will help: http://pywinauto.pbwiki.com/FAQ

    Looks like you could maybe do something like:

    app['Simulation 1'].MenuSelect('whatever')

    Or:

    app.top_window_().MenuSelect('whatever')

    For the first option, I don't know if you have to have the entire titlebar text or if 'Simulation 1' would be sufficient. Give these a try and see if you get any further.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • : : The exact text is:
    : :
    : : Simulation 1 - Aspen Plus 2004 - aspenONE - [Process Flowsheet Window]
    :
    : I found this FAQ, maybe it will help: http://pywinauto.pbwiki.com/FAQ
    :
    : Looks like you could maybe do something like:
    :
    : app['Simulation 1'].MenuSelect('whatever')
    :
    : Or:
    :
    : app.top_window_().MenuSelect('whatever')
    :
    : For the first option, I don't know if you have to have the entire titlebar text or if 'Simulation 1' would be sufficient. Give these a try and see if you get any further.
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    Thank you so much for the help. The app.top_window_().MenuSelect() worked. Thanks again.
  • I need Aspen Plus 2004 where can I download this software and crack please help me
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories