Python Forum
handling and focus in a window
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
handling and focus in a window
#1
Hi there.

I need to learn how to access window of other programs, to send data and manipulate.
below its what I need. I made the script with autohotkey:

if (chave = "1") {
WinActivate, pw3270 - 10.0.102.50 //pw is a program.

else if (chave = "2"){
Run, chrome.exe https://depositojudicial.caixa.gov.br/si...-estadual/
Sleep, 5000
Send, {enter}



I need make that in Python. I suppose that the language has some function or resource.
Reply
#2
Please elaborate
Reply
#3
two programs have their windows open in Windows 7, A and B.
I have a Python script, which calls user input.
what I want:
if the user types: "A", the open window of program A will receive the focus on the screen, and be in the foreground
if the user types: "B", the open window of program B will receive the focus on the screen, and be in the foreground
Reply
#4
I can't vouch for this blog, but here's the URL, may be applicable
perhaps lift and lower: https://riptutorial.com/tkinter/example/...ift-method-
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to call and focus any popup window outside of the main window app? Valjean 6 1,613 Oct-02-2023, 04:11 PM
Last Post: deanhystad
Star python exception handling handling .... with traceback mg24 3 1,219 Nov-09-2022, 07:29 PM
Last Post: Gribouillis
  Pyspark Window: perform sum over a window with specific conditions Shena76 0 1,132 Jun-13-2022, 08:59 AM
Last Post: Shena76
  Activate Winodw/ Set focus biprabu 0 1,616 Sep-07-2020, 04:05 AM
Last Post: biprabu
  how to set focus when running a script using subprocess Malt 0 3,075 Sep-26-2019, 08:07 AM
Last Post: Malt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020