import processing.core.*; 
import processing.data.*; 
import processing.event.*; 
import processing.opengl.*; 

import oscP5.*; 
import netP5.*; 

import java.util.HashMap; 
import java.util.ArrayList; 
import java.io.File; 
import java.io.BufferedReader; 
import java.io.PrintWriter; 
import java.io.InputStream; 
import java.io.OutputStream; 
import java.io.IOException; 

public class sketch_140313a_SendOSC_JG extends PApplet {




OscP5 oscP5;
NetAddress myRemoteLocation;

public void setup() 
{
  size(400,400);
 
  // start oscP5, telling it to listen for incoming messages at port 5001 */
  oscP5 = new OscP5(this,5001);
 
  // set the remote location to be the localhost on port 1234
  myRemoteLocation = new NetAddress("127.0.0.1",1234);
}
public void mousePressed() {  
  // create an osc message
  OscMessage myMessage = new OscMessage("/mousetest");
 
  myMessage.add(123); // add an int to the osc message
  myMessage.add(12.34f); // add a float to the osc message 
  myMessage.add("some text!"); // add a string to the osc message
 
  // send the message
  oscP5.send(myMessage, myRemoteLocation); 
}
 
public void draw()
{
 
}

  static public void main(String[] passedArgs) {
    String[] appletArgs = new String[] { "sketch_140313a_SendOSC_JG" };
    if (passedArgs != null) {
      PApplet.main(concat(appletArgs, passedArgs));
    } else {
      PApplet.main(appletArgs);
    }
  }
}
