Hi Team,
I want to pick the any one image randomly from the local storage.
how i achieve this in PAD.
Thanks in advance!!!

Hi Team,
I want to pick the any one image randomly from the local storage.
how i achieve this in PAD.
Thanks in advance!!!
Hi @Sanket1
I would propose the below flow for the same:
1. Initially, retrieve image files from the designated folder.
2. Determine the total number of files, then employ a random number generation step with a range specified from zero to the total file count.
3. Utilize the randomly generated number as an index to select an image from the folder.
Code:
Folder.GetFiles Folder: $'''C:\\Users\\azureadmin\\Pictures\\Screenshots''' FileFilter: $'''*png''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
Variables.GenerateRandomNumber.RandomNumber MinimumValue: 0 MaximumValue: Files.Count RandomNumber=> RandomNumber
Display.ShowMessageDialog.ShowMessage Title: $'''Info''' Message: $'''Random Image: %Files[RandomNumber]%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀