# Loop function

**URL:** <https://forum.kirupa.com/t/loop-function/123900>\
**Category:** Uncategorized\
**Created:** [September 28, 2004, 10:51am UTC](https://forum.kirupa.com/t/loop-function/123900 "2004-09-28T10:51:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitja2](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@mitja2](https://forum.kirupa.com/u/mitja2)\
**Post date:** [September 28, 2004, 10:51am UTC](https://forum.kirupa.com/t/loop-function/123900/1 "2004-09-28T10:51:11Z")

</div>

Is there any way to do this code with less lines - with usage of WHILE or FOR or some other LOOP function.

progBar1.\_xscale=0;  
progBar2.\_xscale=0;  
progBar3.\_xscale=0;  
progBar4.\_xscale=0;  
progBar5.\_xscale=0;  
progBar6.\_xscale=0;  
progBar7.\_xscale=0;  
progBar8.\_xscale=0;  
progBar9.\_xscale=0;  
progBar10.\_xscale=0;

All there is changing is progbar number in name.  
Any ideas?
