Press a button on arduino to open a file?

this is the current code i have. it sends the string to gobetwino when i press the button.but i get this error "The string recieved : 12345 is not a well formed command string" How would i fix that? also because i am using the delay at the end of the loop if i leave the toggle switch on it will send the string again after the delay. i am very sorry i am new to this im sure these are pretty easy questions for you guys. is there a good site i can go to to learn how to program better?
thanks
demir

/*
 * Emergency Party Button
 * Sends serial commands to the program gobetwino through serial port
 */
 
int inputPin1 = 5;               // sets the input pins
int inputPin2 = 6;
int inputPin3 = 7;
int inputPin4 = 8;
int val = 0;                    // variable for reading the pin status

void setup() {
  Serial.begin(9600); 
  pinMode(inputPin1, INPUT);     // declares pushbuttons as input
  pinMode(inputPin2, INPUT);
  pinMode(inputPin3, INPUT);
  pinMode(inputPin4, INPUT);
}

void loop(){
  val = digitalRead(inputPin3);  // read input value
  if (val == HIGH) {            // check if the input is HIGH
    Serial.println("12345");  // send command by serial port
  delay(1000);
  } 
}