Change Profile Script???

I want to create script which would change user profile after user reach byte limit,
eg. when user reach 20GB of download, change his profile to another profile that in my user profiles. I think it is the easiest way to do it on user login. Could someone help me?

One of the scripts in this thread are close to what you want to do, but they would need some changes. http://forum.mikrotik.com/t/dynamic-user-profile-change-using-script/64920/1

Probably the simplest would be a script like this. Paste it in Hotspot > User Profiles > Open user’s current profile > Scripts tab. You could probably put it in either the On Login or On Logout box. I don’t think it would matter (unless queues are generated before the On Login script is run. In that case, it would be better in the On Logout script).

Change “slowProfile” to match the name of the profile you want to change to.

:local maxBytes 21474836480;
:local newProfile "slowProfile";

:local userStr [:tostr $user];
 
:local bytes [/ip hotspot user get [find name="$userStr"] bytes-out];
:local profile [/ip hotspot user get [find name="$userStr"] profile];

:if ($bytes > $maxBytes) do={
  :if ($profile != $newProfile) do={
      /log info "[DOWNLOAD LIMIT] - $userStr has exceeded $maxBytes bytes downloaded, changing profile";
      /ip hotspot user set [find name="$userStr"] profile="$newProfile"
   }
}

i need script change profile on 1M to netcat
i need all active find and change to (name of profile ) in system script ok ?