# The Most Typed Mel Sequence Ever

**URL:** https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187
**Category:** Maya
**Tags:** mel
**Created:** [January 30, 2009, 6:52pm UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187 "2009-01-30T18:52:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [January 30, 2009, 6:52pm UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/1 "2009-01-30T18:52:05Z")

</div>

When you first start using mel, you have to look this up every time. Then it becomes natural. Then it gets old. Now, I get a weird sense of enjoyment. It's one of the few things in mel where I don't have to use my brain. At all.

---

<div class="post-metadata">

### Author: ![gmask](https://forum.highend3d.com/user_avatar/forum.highend3d.com/gmask/32/192_2.png) [@gmask](https://forum.highend3d.com/u/gmask)
#### Post date: [January 30, 2009, 7:09pm UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/2 "2009-01-30T19:09:22Z")

</div>

i'd probably type it like this..

for($n in `selectedNodes`){

}

and call it a day

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 30, 2009, 7:42pm UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/3 "2009-01-30T19:42:14Z")

</div>

well i would do

for($item in `ls -sl -dep`){

}

that takes about 5-8 second ($ and `is a bit tedious on my keyboard as $ requires alt-gr and` is 2 key metasequance).

Anyay i have a proc in in tat resembes executeForEachObject for when i do this ad hoc

---

<div class="post-metadata">

### Author: ![gmask](https://forum.highend3d.com/user_avatar/forum.highend3d.com/gmask/32/192_2.png) [@gmask](https://forum.highend3d.com/u/gmask)
#### Post date: [January 30, 2009, 7:44pm UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/4 "2009-01-30T19:44:07Z")

</div>

or

for($n in `ls -sl`){}

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 30, 2009, 7:49pm UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/5 "2009-01-30T19:49:55Z")

</div>

I was kindof waiting for you to come to that conclusion ![]()

But yes when i code code i have a snippet in place for all the standard for loops because i program with visual studio so its actually very fast. So i dont actualy type them very often

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [January 31, 2009, 7:34am UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/6 "2009-01-31T07:34:29Z")

</div>

lol brevity is the essence of wit, they say. you guys rock. And I knew entering that poll that my chances of being owned were pretty high.   
 ![]()

I smell the passion for optimization of Amiga coders... ![]()

Since we're into that, another question:  
this sucks:

string $schedulers[] = `listConnections -type clipScheduler $char1`;  
 string $scheduler = $schedulers[0];  
 clear $schedulers;

bc I know there will only be one scheduler, but I have to declare an array anyway bc of listConnections, and then trash it.  
Can this be made simpler?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 31, 2009, 11:13am UTC](https://forum.highend3d.com/t/the-most-typed-mel-sequence-ever/1187/7 "2009-01-31T11:13:43Z")

</div>

yes make a proc that looks like this.

CODE  
proc string getStr0(string $str[]){  
&nbsp;&nbsp;return $str[0];  
}

then its just

CODE  
string $scheduler = getStr0(`listConnections -type clipScheduler $char1`);
