Click on random images in specific folder

Hello all.

I want the bot to randomly select an image from a folder.
How to achieve this? Please help

@Johnar
Welcome to the forum

Get all FilePaths from the folder e.g. Directory.GetFiles(“YourDirPath”,“*.jpg”) - retrurns a string Array with FullFilePaths - arrMyPics

then select randomly by

myPicPath = arrMyPics(New Random().Next() Mod arrMyPics.Length)