I got it to work but i had to put sleeps between each one, any suggestions on something to prevent the delay? @chompy its not really like that it has more than one param, the code i posted was just an example of what i meant.
edit: i'm retarded and had a typo ;[ works now.