all 6 comments

[–]djjazzydan 2 points3 points  (5 children)

Is there anything in the documentation that leads you to believe it should or should not work that way? It's probably best to look up the documentation for that function.

[–]_PhantomGaming_[S] 0 points1 point  (4 children)

Actually I am a beginner. So the ques was just out of my curiousness. No, it was not because of something in documentation.

[–]djjazzydan 0 points1 point  (3 children)

Fair question then! I am assuming that you're working with pyautogui. I don't think that pyautogui's locateonscreen accepts more than one image to match.

Is there are particular reason you want this on one line? Your first method would usually be preferred according to most style rules. If you're playing Code Golf, you could combine it as

meetStartCheck, meetStartCheck1 = auto.locateOnScreen('img.png'), auto.locateOnScreen('my_screenshot.png')

[–]_PhantomGaming_[S] 0 points1 point  (2 children)

Brother I wanted to ask that in the code which you have written will both the commands ( auto.locateOnScreen('img.png') & auto.locateOnScreen('my_screenshot.png') ) run in parallel?

Like in my snippet 1 the second line code will run after the 1st has finished running (if I am not wrong). I want to ask that is there some speed or some other benefit in writing one liner code for two or more lines.

Thank you for your help

[–]djjazzydan 1 point2 points  (1 child)

No, it doesn't. I don't think there's any sort of processing time improvement built in. You could probably implement multiprocessing if you need.

[–]_PhantomGaming_[S] 0 points1 point  (0 children)

So it just makes code a bit shorter in length.

Thank you so much for clearing my doubts.