Clipboard does not contain a string

I am using an Arduino Uno and the Experimenter's Guide for Arduino purchased from Radio Shack. This little book is put out by the seeeed studio. It directs me to go to a website. It is: CODE-12 (Seeed Studios) Redirect

It then says to copy the text of the code on the webpage that pops up, and paste it into the sketch.

When I do that, I get the error, "Clipboard does not contain a string" and the code DOES NOT paste into my sketch.

Can anyone shine some light on this for me. What do I do to fix this issue?

I am using Windows 7 and Arduino sketch software ver 1.0.2

Works for me on Win 7 and 1.0.3.
Are you highlighting and copying only the code?

Pete

That is correct.

paste it into a notepad document or something and then recopy it.

Already tried that too, with no success.

Using IE as my browser, I just highlited the code, copied, pasted into the IDE, and the code compiled.

Works for me too.

What browser are you using ?
IE ?
Chrome ?
Other ?

How are you selecting the text ?
Mouse - left click and hold ?
Keyboard - shift and cursor keys ?
Keyboard - Ctrl A ?

How are you copying the text ?
Right click/Copy ?
Ctrl C ?
Menu, Edit, Copy ?

I am currently using Firefox. Latest version, I remember because windows just prompted me for the update today. I tried using ie right after the other person posted the reply about using ie, but no luck there either.

I select the text by putting the cursed upper left, holding down mouse button,dragging to end of code and then right click, copy, then click into my empty sketch, right click and paste. After that I get a windows ding and the error that is the reason for this thread.

No problem here.
Firefox, Win7, 1.0 IDE.
Cursor to top left, ctrl-a, ctrl-c.

/*     ---------------------------------------------------------
 *     |  Experimentation Kit for Arduino Example Code         |
 *     |  CIRC-RGB .: Colourful Light :. (RGB LED)             |
 *     ---------------------------------------------------------
 * 
 * We've blinked an LED and controlled eight in sequence now it's time to 
 * control colour. Using an RGB LED (actual 3 LEDs in a single housing)  
 * we can generate any colour our heart desires.
 *
 * (we'll also use a few programming shortcuts to make the code 
 * more portable/readable)
 */


//RGB LED pins
int ledDigitalOne[] = {9, 10, 11}; //the three digital pins of the digital LED 
                                   //9 = redPin, 10 = greenPin, 11 = bluePin

const boolean ON = LOW;     //Define on as LOW (this is because we use a common 
                            //Anode RGB LED (common pin is connected to +5 volts)
const boolean OFF = HIGH;   //Define off as HIGH

//Predefined Colors
const boolean RED[] = {ON, OFF, OFF};    
const boolean GREEN[] = {OFF, ON, OFF}; 
const boolean BLUE[] = {OFF, OFF, ON}; 
const boolean YELLOW[] = {ON, ON, OFF}; 
const boolean CYAN[] = {OFF, ON, ON}; 
const boolean MAGENTA[] = {ON, OFF, ON}; 
const boolean WHITE[] = {ON, ON, ON}; 
const boolean BLACK[] = {OFF, OFF, OFF}; 

//An Array that stores the predefined colors (allows us to later randomly display a color)
const boolean* COLORS[] = {RED, GREEN, BLUE, YELLOW, CYAN, MAGENTA, WHITE, BLACK};

void setup(){
  for(int i = 0; i < 3; i++){
   pinMode(ledDigitalOne[i], OUTPUT);   //Set the three LED pins as outputs
  }
}

void loop(){

/* Example - 1 Set a color
   Set the three LEDs to any predefined color
*/
   setColor(ledDigitalOne, CYAN);    //Set the color of LED one

/* Example - 2 Go through Random Colors
  Set the LEDs to a random color
*/
   //randomColor();

}

void randomColor(){
  int rand = random(0, sizeof(COLORS) / 2);  //get a random number within the range of colors
  setColor(ledDigitalOne, COLORS[rand]);  //Set the color of led one to a random color
  delay(1000);
}

/* Sets an led to any color
   led - a three element array defining the three color pins (led[0] = redPin, led[1] = greenPin, led[2] = bluePin)
   color - a three element boolean array (color[0] = red value (LOW = on, HIGH = off), color[1] = green value, color[2] =blue value)
*/
void setColor(int* led, boolean* color){
 for(int i = 0; i < 3; i++){
   digitalWrite(led[i], color[i]);
 }
}

/* A version of setColor that allows for using const boolean colors
*/
void setColor(int* led, const boolean* color){
  boolean tempColor[] = {color[0], color[1], color[2]};
  setColor(led, tempColor);
}

Should I perhaps try downloading fresh copy of the IDE and see if that solves the problem?

If you can't paste the code into Notepad then re-installing the IDE won't help.

Can you copy and paste from other sites, this one for example ?
Try another browser. If that works then re-install Firefox (or stop using it)

kd7sjt:
Already tried that too, with no success.

Which part failed?

If you can't copy text from a web page in your browser and paste into Notepad then you have a problem with your browser or your PC. Either way, that part isn't an Arduino problem.

kd7sjt:
I am using an Arduino Uno and the Experimenter's Guide for Arduino purchased from Radio Shack. This little book is put out by the seeeed studio. It directs me to go to a website. It is: CODE-12 (Seeed Studios) Redirect

It then says to copy the text of the code on the webpage that pops up, and paste it into the sketch.

When I do that, I get the error, "Clipboard does not contain a string" and the code DOES NOT paste into my sketch.

Can anyone shine some light on this for me. What do I do to fix this issue?

I am using Windows 7 and Arduino sketch software ver 1.0.2

(1) Go to the site
(2) RIGHT click and choose "Select All" (text should be highlighted blue)
(3) RIGHT click again and select "Copy"
(4) Go to the Arduino IDE and RIGHT click, select "Paste"

Should work.

I have successfully fixed this problem by deleting the old software from my computer and installing the newest version. thank you all for your help and input.

What software did you delete and re-install ?
Presumably it was Firefox.

I completely deleted the arduino IDE and downloaded the newest version. I was using 1.0.2 of the IDE, and am now using version 1.0.3 without any trouble.

kd7sjt:
I completely deleted the arduino IDE and downloaded the newest version. I was using 1.0.2 of the IDE, and am now using version 1.0.3 without any trouble.

I go with the below.

If you can’t paste the code into Notepad then re-installing the IDE won’t help.

It's not clear to me what your point is in the last quote. The fact still remains that when I was using version 1.0.2, the IDE was NOT working correctly and when I completely deleted it, and installed version 1.0.3, the IDE IS working now. So I can reasonably conclude that uninstalling and loading the newest version DID infact solve the problem.

I do thank all of you for your help and support through this little tribulation that I have experienced. I hope at some point in the future that I can pay it forward and help someone out like I have been helped here. Take care,

Earl