(NEED HELP) Script for change Max Limit in Simple Queue

Hi,

I am using Simple Queue.
Please help me to make script for this purpose:

  • If queue1 TX Rate > 512k … change queue2 Max Limit to 1M/1M
  • If queue1 TX Rate < 512k … change queue2 Max Limit to 2M/2M

Thanks in advance, and sorry for my bad English.