Motor StepCount adjustment via user inputData

Robin2:
Having looked at your program I don't understand your question. Your program seems to receive several different messages and then calls different functions. What do you want to do that is different?

Sorry about the confusion,my code has this as an example, the number 25 is my step count, I want to change this as an inputdata coming from users (from 1~200). Do i define this in arduino IDE as an int coming from serial input or can i cast a whole complete method from visual studio(which i'm not familiar with). my codes does work with defined methods only but with users input I'm not able to get the correct code structure.

// Spin motor two rotations quickly 45 deg
  for(int x = 0; x < (M1_STEPS_PER_REV * 25); x++) {
    digitalWrite(M1_stepPin,HIGH);
    delayMicroseconds(1000);
    digitalWrite(M1_stepPin,LOW);
    delayMicroseconds(1000);
  }

Robin2:
As a separate comment I notice that all your messages begin with "stm1" and the only difference between messages is the final letter. There is no useful information conveyed by the "stm1" part so just leave it out and only send the relevant letter 'A', 'B' , 'C' etc.

I just put stm1 as an identification for me since my experiments consist of 2 stepper motor and 1 dc motor controlled by uno I just removed the other motor codes but i can change for improvement and thanks for the capital info, i will take note of that on my revise code.

this is my gui sample