How to focus on TextField2 when TextField1 is compeleted

Hi
I have four TextField for getting a serial number. When the scene is loaded TextField1 must be focused automatically and when TextField1 was completed with four digit, TextField2 must be focus automatically and similarly.

How can I do it?

        GUI.SetNextControlName("text1");
        stringToEdit1 = GUI.TextField (Rect (100, 100, 120f, 50f), stringToEdit1, 4 , myStyle1);
        GUI.FocusControl("text1");
        
        stringToEdit2 = GUI.TextField (Rect (300, 100, 120f, 50f), stringToEdit2, 4 , myStyle1);
        
        stringToEdit3 = GUI.TextField (Rect (500, 100, 120f, 50f), stringToEdit3, 4 , myStyle1);
        
        
        stringToEdit4 = GUI.TextField (Rect (700, 100, 120f, 50f), stringToEdit4, 4 , myStyle1);

Wouldn’t it be something like this:

         if (GUI.GetNameOfFocusedControl() == "text1") {
                  if (stringToEdit1.Length == 4) {
                           stringToEdit1 = "";
                  }
         }
         GUI.SetNextControlName("text1");
         stringToEdit1 = GUI.TextField (Rect (100, 100, 120f, 50f), stringToEdit1, 4 , myStyle1);
         GUI.FocusControl("text1");
         
         GUI.SetNextControlName("text2");
         stringToEdit2 = GUI.TextField (Rect (300, 100, 120f, 50f), stringToEdit2, 4 , myStyle1);

         //Add more here

         if (stringToEdit1.Length == 4) {
             GUI.FocusControl("text2")
         }