1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655
  
     | 
    
      #usage "<b>Example: Dialogs</b>\n"
       "<p>"
       "<author>Author: support@cadsoft.de</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
string ulp_path ;
char bkslash = '/';
int pos = strrchr(argv[0], bkslash);
  if (pos >= 0) {
     ulp_path = strsub(argv[0], 0, pos + 1);
     }
string cmd = "";
int Value = 42;
int Wert = 7;
int Val = 0;
string st = "";
int Result = 0;
string msg = "";
string Colors[] = { "red"
                    , "green", "blue", "pink"
                    , "yellow", "cyan", "magenta"
                    , "brown", "white", "black"
                    , "gray", "orange"
                    };
int Selected = 2; // initially selects "blue"
string Text = "example text";
int Lines = 0;
// Checkboxes in Dialog
int mirror = 0;
int rotate = 1;
int flip   = 0;
int black  = 1;
int swap   = 1;
int solid  = 0;
int scaled = 0;
int align = 0;
//use dlgRadioButton only in dlgGroup!
Result = dlgDialog("EAGLE Version 4 / ULP Demonstration") {
  dlgHBoxLayout {
     dlgStretch(0);
     dlgGroup("Use RadioButton only in dlgGroup!") {
        dlgStretch(0);
        dlgGridLayout {
           dlgCell(1, 1)  dlgRadioButton("&Top", align);
           dlgCell(2, 0)  dlgRadioButton("&Left ", align);
           dlgCell(2, 1)  dlgRadioButton("&Center", align);
           dlgCell(2, 2)  dlgRadioButton("&Right ", align);
           dlgCell(3, 1)  dlgRadioButton("&Bottom", align);
           //                         30 pixels fixed distance
           dlgCell(1, 6) { dlgSpacing(30); dlgCheckBox("R&otate", rotate); };
           dlgCell(2, 6) { dlgSpacing(30); dlgCheckBox("&Mirror", mirror); };
           dlgCell(3, 6) { dlgSpacing(30); dlgCheckBox("&Flip", flip); };
           }
        }
     dlgStretch(0);
     dlgVBoxLayout {
        dlgHBoxLayout {
           dlgSpacing(20);
           dlgStretch(0);
           dlgPushButton("+OK") dlgAccept();
           dlgStretch(1);
           }
        dlgHBoxLayout {
           dlgSpacing(20);
           dlgStretch(0);
           dlgPushButton("-ESC") dlgReject();
           dlgStretch(1);
           }
        }
     dlgStretch(1);
     }
   dlgStretch(1);
  };
if (Result == 0) exit (0);
// a complex menu
// default is VBoxLayout
Text += "\nextend example text with Text+=...";
align = 0;
Result = dlgDialog("Version 4 - ULP test"){
   dlgStretch(0);                             // no dynamic distance on top
   dlgHBoxLayout {
      dlgStretch(0);                          // no dynamic distance on left border
      dlgLabel("<img src=" + ulp_path + "eagle.bmp>");        // display a BMP file
      dlgStretch(0);                          // no dynamic distance to next object
      dlgGroup("ULP-Test Edit") {             // start a group
         dlgHBoxLayout dlgSpacing(600);       // make 600 pixel spacing
         dlgHBoxLayout {                      // horizontal direction in horizontal direction
            dlgVBoxLayout dlgSpacing(300);    // a vertical Box 300 pixels high
            dlgTextEdit(Text);                // editor window 600 x 300 pixels
            }
         }
      dlgStretch(1);                          // dynamic distance to the right border
      }
   dlgHBoxLayout {
      dlgStretch(0);                          // no dynamic distance allowed
      dlgGroup("ULP-Test Radio") {            // start a frame for a group
         dlgHBoxLayout dlgSpacing(100);       // a horizontle box min. 100 pixels wide
                            // Minimum is 80 pixels (by Windows/Microsoft)
                            // is the displayed Text in Combobox larger than 80 pixels
                            // then the Box width is automatically extended
         dlgLabel("&Color");                  // the & character marks the ALT-Key
         dlgComboBox(Colors, Selected);
         dlgRadioButton("&Center", align);
         dlgRadioButton("&Bottom", align);
         }
      dlgSpacing(20);
      dlgStretch(0);
      dlgVBoxLayout {
         dlgStretch(1);
         dlgCheckBox("&Mirror", mirror);
         dlgStretch(0);
         dlgCheckBox("&Rotate", rotate);
         dlgStretch(1);
         }
      dlgSpacing(10);
      dlgStretch(0);
      dlgLabel("Enter a &Number between 0 and 99");
      dlgSpacing(5);
      dlgStretch(0);
      dlgHBoxLayout {
         dlgIntEdit(Value, 0, 99);
         }
      dlgSpacing(10);
      dlgStretch(0);
      dlgGroup("Reset") {
         dlgStretch(0);
         dlgLabel("change values, press reset and look");
         dlgStretch(1);
         dlgPushButton("Reset")  dlgReset();
         dlgStretch(1);
         }
      dlgStretch(1);
      }
   dlgStretch(0);
   dlgSpacing(10);
   dlgHBoxLayout {
      dlgStretch(0);
      dlgSpacing(550);
      dlgPushButton("+OK") dlgAccept();
      dlgStretch(0);
      dlgSpacing(25);
      dlgPushButton("-Cancel") dlgReject();
      dlgStretch(1);
      }
   dlgStretch(1);
   };
if (Result == 0) exit (0);
// Dialog window with Button
align = 0;
Text = "\n\nCELL example\ndefine cells\n";
Result = dlgDialog(" EAGLE Version 4 / GRID/CELL Demonstration"){
  dlgGridLayout {                           // Grid & Cell
    dlgCell(0, 0) dlgLabel("Cell 0,0");
    dlgCell(0, 1) dlgLabel("Cell 0,1");
    dlgCell(0, 2) dlgLabel("Cell 0,2");
    dlgCell(0, 3) dlgLabel("Cell 0,3");
    dlgCell(0, 4) dlgLabel("Cell 0,4");
    dlgCell(0, 5) dlgLabel("Cell 0,5");
    dlgCell(0, 6) dlgLabel("Cell 0,6");
    dlgCell(0, 7) dlgLabel("Cell 0,7");
    dlgCell(0, 8) dlgLabel("Cell 0,8");
    dlgCell(0, 9) dlgLabel("Cell 0,9");
    dlgCell(0, 10) dlgLabel("Cell 0,10");
    dlgCell(0, 11) dlgLabel("Cell 0,11");
    dlgCell(1, 0) dlgLabel("Cell 1,0");
    dlgCell(2, 0) dlgLabel("Cell 2,0");
    dlgCell(3, 0) dlgLabel("Cell 3,0");
    dlgCell(4, 0) dlgLabel("Cell 4,0");
    dlgCell(5, 0) dlgLabel("Cell 5,0");
    dlgCell(6, 0) dlgLabel("Cell 6,0");
    dlgCell(7, 0) dlgLabel("Cell 7,0");
    dlgCell(8, 0) dlgLabel("Cell 8,0");
    dlgCell(9, 0) dlgLabel("Cell 9,0");
    dlgCell(10, 0) dlgLabel("Cell 10,0");
    dlgCell(11, 0) dlgLabel("Cell 11,0");
    dlgCell(1, 2, 4, 6) dlgTextEdit(Text);
    dlgCell(1, 8) dlgComboBox(Colors, Selected);
    dlgCell(2, 8) dlgCheckBox("&Mirror", mirror);
    dlgCell(3, 8) dlgCheckBox("&Rotate", rotate);
    dlgCell(4, 8, 4, 8) dlgGroup("Gruop") {
      dlgGridLayout {
         dlgCell(6, 8)  dlgRadioButton("&Top", align);
         dlgCell(7, 8)  dlgRadioButton("&Center", align);
         dlgCell(8, 8)  dlgRadioButton("&Bottom", align);
         }
      }
    dlgCell(6, 4) dlgPushButton("+OK") dlgAccept();
    dlgCell(7, 4) dlgPushButton("-CANCEL\n\nStop ULP\nand\nExit") dlgReject();
    dlgCell(7, 2) dlgPushButton("Reset")  dlgReset();
    dlgCell(1, 1) dlgLabel("<img src=" + ulp_path + "eagle.bmp>");
    dlgCell(1, 8) dlgLabel("<img src=" + ulp_path + "eagle.bmp>");
    dlgCell(9, 1) dlgLabel("<img src=" + ulp_path + "eagle.bmp>");
    dlgCell(9, 8) dlgLabel("<img src=" + ulp_path + "eagle.bmp>");
    }
  dlgLabel("a small example for Grid & Cell");
 };
if (Result == 0) exit (0);
Result = dlgDialog("Checkbox Demonstration"){
  dlgGroup("Orientation and Print") {
    dlgCheckBox("&Mirror", mirror);
    dlgCheckBox("&Rotate", rotate);
    dlgCheckBox("&Flip", flip);
    dlgCheckBox("&Black", black);
    dlgCheckBox("&Solid", solid);
    dlgCheckBox("S&caled", scaled);
    }
  dlgVBoxLayout {
    dlgHBoxLayout {
      dlgStretch(1);
      dlgPushButton("+OK") dlgAccept();
      dlgStretch(0);
      }
    dlgHBoxLayout {
      dlgStretch(1);
      dlgPushButton("-Cancel") dlgReject();
      dlgStretch(0);
      }
    }
  };
if (Result == 0) exit (0);
// Comboboxes
Result = dlgDialog("Combobox"){
  dlgComboBox(Colors, Selected);
  dlgVBoxLayout {
    dlgHBoxLayout {
      dlgStretch(1);
      dlgPushButton("+OK") dlgAccept();
      dlgStretch(0);
      }
    dlgHBoxLayout {
      dlgStretch(1);
      dlgPushButton("-Cancel") dlgReject();
      dlgStretch(0);
      }
    }
  };
if (Result == 0) exit (0);
// GridLayout - define cell by cell content
Result = dlgDialog("Grid Layout"){
  dlgGridLayout {
    dlgCell(0, 0) dlgLabel("Row 0/Col 0");
    dlgCell(1, 0) dlgLabel("Row 1/Col 0");
    dlgCell(0, 4) dlgLabel("Row 0/Col 4");
    dlgCell(5, 5) dlgLabel("Row 5/Col 5");
    dlgCell(10, 20) dlgPushButton("+OK") dlgAccept();
    dlgCell(10, 24) dlgPushButton("-Cancel") dlgReject();
    }
  };
if (Result == 0) exit (0);
// input a Integer-Value
Result = dlgDialog("IntEdit"){
  dlgHBoxLayout {
    dlgLabel("Enter a &Number between 0 and 99");
    dlgIntEdit(Value, 0, 99);
    }
  dlgVBoxLayout {
    dlgHBoxLayout {
      dlgStretch(1);
      dlgPushButton("+OK") dlgAccept();
      dlgStretch(0);
      }
    dlgHBoxLayout {
      dlgStretch(1);
      dlgPushButton("-Cancel") dlgReject();
      dlgStretch(0);
      }
    }
  };
if (Result == 0) exit (0);
// List box selection field
Result = dlgDialog("List Box") {
   dlgListBox(Colors, Selected)
   dlgAccept();
   };
dlgMessageBox("selected Color " + Colors[Selected]);
if (Result == 0) exit (0);
//Multi column list view selection field
string Colours[] = { "red\tThe color RED", "green\tThe color GREEN", "blue\tThe color BLUE" };
Selected = 1;
Result = dlgDialog("ListView") {
  dlgListView("Name\tDescription", Colours, Selected) dlgAccept();
  dlgPushButton("+OK") dlgAccept();
  };
dlgMessageBox("last selected\n" + Colours[Selected]);
if (Result == 0) exit (0);
// Predefined Button OK
Result = dlgDialog("Hello") {
  dlgLabel("Hello world");
  dlgPushButton("+OK") dlgAccept();
              // look at the '+' character
  };
// Radio Button
// can be used only in a dglGroup
align = 0;
Result = dlgDialog("RadioButton") {
    dlgGroup("Alignment") {
      dlgRadioButton("&Top", align);
      dlgRadioButton("&Center", align);
      dlgRadioButton("&Bottom", align);
      dlgPushButton("+OK") dlgAccept();
      dlgPushButton("-Cancel") dlgReject();
      }
    };
if (Result == 0) exit (0);
// Input a real value
real rValue = 33.333;
Result = dlgDialog("RealEdit"){
  dlgHBoxLayout {
    dlgLabel("Enter a &Number between 0.0 and 99.0");
    dlgRealEdit(rValue, 0.0, 99.0);
    dlgVBoxLayout {
      dlgHBoxLayout {
        dlgStretch(1);
        dlgPushButton("+OK") dlgAccept();
        dlgStretch(0);
        }
      dlgHBoxLayout {
        dlgStretch(1);
        dlgPushButton("-Cancel") dlgReject();
        dlgStretch(0);
        }
      }
    }
  };
if (Result == 0) exit (0);
sprintf(st, "%f", rValue);
dlgMessageBox("last real value = " + st);
// Define additional space in a box layout context
// space is given in pixels
Result = dlgDialog("Spacing V-Box"){
   dlgVBoxLayout {
     dlgLabel("Label V1");
     dlgSpacing(70);
     dlgLabel("Label V2");
    }
  };
if (Result == 0) exit (0);
Result = dlgDialog("Spacing HBox"){
   dlgHBoxLayout {
     dlgLabel("Label H1");
     dlgSpacing(100);
     dlgLabel("Label H2");
    }
  };
if (Result == 0) exit (0);
// Select two values
Result = dlgDialog("Spinbox - select value for X and Y") {
  dlgVBoxLayout {
    dlgLabel("select &X");    // character & mark selected by ALT+Key
    dlgSpinBox(Value, 0, 99);
    dlgLabel("select &Y");
    dlgSpinBox(Wert, -99, 99);
    dlgPushButton("+OK") dlgAccept();
                // + is the Default-Button [ENTER]
    dlgPushButton("-throw away") dlgReject();
                // - is the Cancel-Button [ESC]
    };
  };
if (Result == 0) exit (0);
dlgMessageBox("ATTENTION:\ndrag the next menu border line!", "OK");
// Define an empty stretchable space in a box layout context
Result = dlgDialog("Stretch horizontal") {
    dlgHBoxLayout {
      dlgStretch(0);
      dlgPushButton("+OK") dlgAccept();
      dlgStretch(5);
      dlgPushButton("Key B");
      dlgStretch(15);
      dlgPushButton("Key C");
      dlgStretch(40);
      dlgPushButton("-Cancel") dlgReject();
      dlgStretch(5);
   }
 };
if (Result == 0) exit (0);
dlgMessageBox(" ATTENTION:\ndrag the next menu border line!", "OK");
Result = dlgDialog("Stretch vertical") {
    dlgVBoxLayout {
      dlgStretch(0);
      dlgPushButton("+OK") dlgAccept();
      dlgStretch(5);
      dlgPushButton("Key 2");
      dlgStretch(15);
      dlgPushButton("Key 3");
      dlgStretch(40);
      dlgPushButton("-Cancel") dlgReject();
      dlgStretch(0);
      }
 };
if (Result == 0) exit (0);
// Defines a string entry field
// define fixed length by dlgSpacing
string Name = "Linus Torvalds";
Result = dlgDialog("dlgStringEdit") {
  dlgHBoxLayout dlgSpacing(400);
  dlgStretch(0);
  dlgLabel("Enter &Name");
  dlgStretch(0);
  dlgStringEdit(Name);
  dlgVBoxLayout {
     dlgStretch(0);
     dlgHBoxLayout {
        dlgStretch(1);
        dlgPushButton("+OK") dlgAccept();
        dlgStretch(0);
        }
     dlgHBoxLayout {
        dlgStretch(1);
        dlgPushButton("-Cancel") dlgReject();
        dlgStretch(0);
        }
     dlgStretch(10);
     };
  dlgStretch(1);
  };
if (Result == 0) exit (0);
dlgMessageBox("the last selected \n" + Name);
// Define a tab page
align = 0;
int p_align = 0;
Result = dlgDialog("Container for tab pages") {
  //Define a container for tab pages
  dlgTabWidget {
    dlgTabPage("&Video") {
      dlgHBoxLayout {
         dlgLabel("<img src=" + ulp_path + "eagle.bmp>");
         }
      dlgHBoxLayout {
        dlgLabel("Video mode");
        dlgGroup("Gruppe") {
          dlgRadioButton("&Black and White", align);
          dlgRadioButton("&White and Black", align);
          }
        }
      }
    dlgTabPage("&Printer") {
      dlgLabel("Printer setup");
      dlgGroup("Gruppe") {
        dlgRadioButton("&Top", p_align);
        dlgRadioButton("&Center", p_align);
        dlgRadioButton("&Bottom", p_align);
        }
      }
    dlgTabPage("&Memory") {
      dlgLabel("Memory setup");
      dlgCheckBox("R&otate", rotate);
      dlgCheckBox("Mi&rror", mirror);
      dlgCheckBox("&Flip", flip);
      dlgCheckBox("&Swap", swap);
      }
    dlgTabPage("&Export") {
      dlgLabel("select a file name for WRITE");
      dlgHBoxLayout {
        dlgStretch(0);
        dlgPushButton("&File") {
          string fileName;
          fileName = dlgFileOpen("select a File", "*.*", "*.BRD\n*.SCH\n*.SCH\n*.ULP");
          };
        dlgStretch(1);
        }
      }
    dlgTabPage("&Input") {
      dlgLabel("select a file for read");
      dlgHBoxLayout {
        dlgStretch(0);
        dlgPushButton("&File") {
          string fileName;
          fileName = dlgFileOpen("select a File", "*.*", "");
          };
        dlgStretch(1);
        }
      }
    dlgTabPage("&Help") {
      dlgLabel("<img src=" + ulp_path + "eagle.bmp>");
      dlgLabel("Copyright (c) 1988-2000 CadSoft Computer GmbH");
      }
    }
  dlgHBoxLayout {
    dlgStretch(0);
    dlgPushButton("+OK") dlgAccept();
    dlgStretch(0);
    dlgLabel(" <--------> ");
    dlgStretch(0);
    dlgPushButton("-Cancel") dlgReject();
    dlgStretch(1);
    }
  };
if (Result == 0) exit (0);
string sresult;
sprintf(sresult, "%d", Value);
cmd  = "selected X = " + sresult + ".\n";
sprintf(sresult, "%d", Wert);
cmd += "selected Y = " + sresult + ".\n";
Result = dlgDialog("Editor Window") {
  dlgTextEdit(cmd);
  dlgHBoxLayout {
    dlgPushButton("+OK") dlgAccept();
    dlgPushButton("-Cancel") dlgReject();
    }
  };
if (Result == 0) exit (0);
dlgMessageBox(cmd);
//Define a multiline text viewer field
Text = "This is some text.\nLine 2\nLine 3";
string Text2 = "This is the 2nd text.\nLine 2\nLine 3";
Text2 += "\n...\n...\n...\n...\nScroll-\nbars\non?\n";
Text2 += "OK\nEnd.";
Result = dlgDialog("List Window") {
  dlgVBoxLayout {
    dlgLabel("&View the text");
    dlgTextView(Text);
    dlgLabel("Vie&w the text");
    dlgTextView(Text2);
    }
  dlgHBoxLayout {
    dlgStretch(1);
    dlgPushButton("+OK") dlgAccept();
    }
  };
if (Result == 0) exit (0);
// Button
int haveButton = 1;
Result = dlgDialog("Test") {
  dlgLabel("Start");
  if (haveButton)
     dlgPushButton("Here") dlgAccept();
  };
if (Result == 0) exit (0);
Result = dlgDialog("'3 Boxes close by ESC") {
    dlgHBoxLayout {
       dlgLabel("Box 1");
       dlgLabel("Box 2");
       dlgLabel("Box 3");
       dlgPushButton("+OK") dlgAccept();
       }
  };
if (Result == 0) exit (0);
Result = dlgDialog("selected Color") {
  dlgVBoxLayout {
    dlgLabel("selected Color");
    dlgLabel(Colors[Selected]);
    }
  };
if (Result == 0) exit (0);
// Redisplays the dialog after changing values
string Status[] = { "Idle", "1st run", "2nd run", "3rd run", "Finished" } ;
int stat = 0;
string labstr = Status[0];
Result = dlgDialog("Test") {
               dlgLabel(labstr);
               dlgPushButton("+OK")    dlgAccept(42);
               dlgPushButton("Cancel") dlgReject(-3);
               dlgPushButton("Run") {
               if (stat < 4) stat++;
               labstr = Status[stat];
               dlgRedisplay();
                // some program action here...
               }
               dlgPushButton("Reset") {
                  dlgReset();
                  stat = 0;
                  labstr = Status[stat];
                  dlgRedisplay();
                  }
               };
if (Result == 0) exit (0);
sprintf(cmd, "%d",  Result);
dlgMessageBox(cmd);
int Number = 99;
string dlgStr = "Empty";
real rVal = 9.99;
Result = dlgDialog("Reset Int & Real to 0") {
               dlgIntEdit(Number);
               dlgRealEdit(rVal);
               dlgStringEdit(dlgStr);
               dlgPushButton("+OK")    dlgAccept(42);
               dlgPushButton("Cancel") dlgReject();
               dlgPushButton("Reset")  dlgReset();
               };
if (Result == 0) exit (0);
// File handling
int n = 0;
char b[];
string fileName = dlgFileOpen("select File", "*.*", "*.BRD\n*.SCH\n*.SCH\n*.ULP");
  int nBytes = fileread(b, fileName);
  for (int x = 0; x < nBytes; x++) {
    cmd += b[x];
    }
dlgMessageBox(fileName +"\nread", "OK");
 
     |