So this is for my MySQL and XML class. Here's what I want this script to do/goals for the script:
1. Run in the background while still recording movements of goal 3.
2. Run in a browser...probably inserted with HTML.
3. Record mouse movement.
4. Every second create a square on the X and Y axis of wherever the mouse is.
5. Every minute create a circle in the same on xy axis.
6. when the circle is created, skip step 4.
7 Every hour create an ellipse on the xy axis of wherever the mouse is at that second/hour.
8. when ellipse is created skip steps 4 and 5.
9. move from background to foreground after closing the browser as a pop up.
10. have the option to save step 9 pop up result.
11. this whole thing to be as large as the browser window (but still in the background. this should probably be step 3...).
If you know an answer to any of the above (excluding steps 3, 4,5, and 7) please respond. I'm not expecting one person to answer all of those...although that'd be way cool :).
Ok. Here are the scripts I have. The first one is for steps 3,4,5, and 7. The other scripts don't work. and I need to add steps 6, and 8 into the (3457) script.
boolean debug = true; //Provide feedback
int boxSize = 20;
int circleSize = 40;
int ellipseSize = 80;
int sketchWidth = 800;
int sketchHeight = 800;
int boxStart, circleStart, ellipseStart, colorStart, colorStartB, skipStart, skipRect; //Timing variables
//I don't think I need any of these. Just in case.
//Generate circle every 60 seconds. Need to find a way to cancel the rectangle.
if((millis() - circleStart) >=60000) {
ellipse(mouseX, mouseY, 70, 70);
if(debug) {
println("circle");
}
circleStart = millis();
}
//generate one elipse every hour.
if((millis()- ellipseStart) >= 3600000) {
ellipse(mouseX, mouseY, 90, 30);
if(debug) {
println("ellipse");
}
ellipseStart = millis();
}
}
Ok. Next script. This one is meant to record the mouse xy even if the mouse cursor is off the screen/browser. This is a directly copied example that returns the error: "Cannot find class or type named "Point"". If I insert an empty class named Point I get the error:" cannot convert from point to sketch____.Point.
println( "mX is " + mX + " and mY is " + mouseY );
}
void draw(){
setMouseXY();
background(0);
stroke(255);
line(mX, 0, mX, height);
line(0, mY, width, mY);
println( "mX is " + mX + " and mY is " + mouseY );
}
Here's a script I've tried to just record the mouse xy (another way I was going to try that on a webpage^ was to record the info, upload it to a database and then run the rect/circle/ellipse script there...and then return the result.
Point mouse;
void setup() {
size(100,100);
}
void draw(){
mouse = MouseInfo.getPointerInfo().getLocation();
println( "mX is " + mouse.x + " and mY is " + mouse.y );
}
This next one attempts to insert the .jar file into an html page. It's one of the simpler ways I've tried to insert it. It returns a blank page with the date. I don't know how to include the clockfail2.jar file with this script...or how to tell the html document where the app is. So that may be the problem...
And Just to test from square one here's my script trying to that.
public class Robot();
And here's the error I get:
"line 1:19: unexpected token: (
File /var/folders/69/69JcF82LEa8YZply920b0U+++TI/-Tmp-/build4356636896593188972.tmp/.java is missing"
(I'm using Mac OSX 10.5.8.)
I've spent probably about 40>= hours trying to do this whole project...if not more. I'm new to processing, so I consider struggling a way of learning...but at this point I'm really sick of looking at this, and I need answers.
Post-script (pun lulz) If anyone has a home remedy for headache/eye ache from staring at a computer screen...feel free to include it. :D