repetitive operation

Ask general questions here.
OPT-Liuxm
Posts: 30
Joined: Sat Jan 11, 2020 3:58 am

repetitive operation

Post by OPT-Liuxm » Sat Jun 13, 2020 7:45 am

Hi,

For example,Within an hour,I perform an action every five minutes, can I do it in a code loop?

As shown in the figure, You can see that I copied and pasted the same thing, which is a little inconvenient.In case it takes too long to set up, it's too complicated to copy and paste.

Thank you all. :D
Attachments
Ranorex01.jpg
Ranorex01.jpg (17.22 KiB) Viewed 117 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6181
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: repetitive operation

Post by odklizec » Mon Jun 15, 2020 6:43 am

Hi,

Of course, you can do that, for example with "For" loop.

Code: Select all

for (int i = 0; i < 11; i++) // loop 12 times (12x5m = 1h)
{
    GetMessage();
    Delay.Seconds(300);
}
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

OPT-Liuxm
Posts: 30
Joined: Sat Jan 11, 2020 3:58 am

Re: repetitive operation

Post by OPT-Liuxm » Tue Jun 16, 2020 6:48 am

Yes, very good.
The For loop is done. :D