#๐Ÿ”’ How do I have my automated chrome window stop stealing priority & using my main desktop screen?

28 messages ยท Page 1 of 1 (latest)

marsh hull
#

I am trying to use my PC while running a script and it has to keep closing and opening a Automated Chrome window... which keeps pulling priority over & over. Also covers my documents.

The script is looping every 25 seconds or so - so you can see how it's inconvenient.

Thanks in advance.

river wolfBOT
#

@marsh hull

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

soft gorge
#

I don't have an answer, but some leads you can try to follow. Since you wrote PC, I assume you're on Windows.

If your script does not require the window to be visible, you can try to start it minimized.

#

How exactly you configure this will depend on how you're starting the Chrome process.

marsh hull
#

"start it minimized"
Is this in regards to all chrome windows? or my script?

soft gorge
#

It's regarding the Chrome windows that your script creates.

#

The win32 API has ways to start a process as minimized.

marsh hull
#

where can I alter this setting?

soft gorge
#

Well, how are you launching Chrome from your script? As I said, it depends.

marsh hull
#

I run the .exe in my folder

#

and it runs the script

soft gorge
#

Right. And what does the script do to start Chrome. Can you share the relevant code for that?

#

Like, are you doing subprocess.run("chrome.exe") or what?

marsh hull
#

DevTools listening on ws://127.0.0.1:53829/devtools/browser/6e4fe4b7-d54a-4a4f-84f9-44aabc58a90c
cookies loaded of artm.vereshchagin.85_mail.ru.txt

#

this is what my cmd looks like

#

sorry, I am new to coding

soft gorge
#

Hmm that's not particularly helpful

#

That's just the console output. But what is the code?

marsh hull
#

i was never given the source

#

I had this sent to me

#

sorry - should have clarified that

soft gorge
#

I see. I can't definitely say whether it's possible given those circumstances, since I don't have the full picture of what this program is doing. But without the source code, I have doubts you will be able to do anything about this unless you reverse engineer the program.

#

If you just need this script to run, and don't care where it runs, consider running it in a virtual machine.

#

Or even better, a server if you have the means to obtain one.

marsh hull
#

thank you @soft gorge

stray meadow
#

Yes, this is not a coding question. Someone sent you a program with no source. You can either run it on a different computer or ask the person who sent it to you.

river wolfBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.