Need Help with running expect script on MAC OS

Hi Guys,
I'm having an issue with running an expect script on my Mac Mini with Mac OS x 10.7.5. I think the script is correct but the not sure why its not working.
The script is as below and also teh error from Xtern or terminal when i try to run it.
#!/usr/bin/expect
set telnetAddr "172.22.22.254"
set telnetAddr1 "172.22.22.252"
set username "ww"
set passwords "ww"
set enablepassword "ww"
spawn  telnet $telnetAddr
expect "Username: "
send "username\r"
expect "Password: "
send "$passwords\r" 
expect "Orange-ISRGW>"
send "enable\r"
expect "Password: "
send "$enablepassword\r"
expect "Orange-ISRGW#"
send "sh flash\r"
expect "Orange-ISRGW#"
send "delete flash:c1140-k9w7-tar.default.JAR\r"
expect "Delete flash:/c1140-k9w7-tar.default.JAR? [confirm]"
send  "\r"
expect "Orange-ISRGW#"
send "exit/r"
interact
here is what happens when i try to run it. This is just a test script before i re-write it to do what i intened to use it for.
sh-3.2# ls -al Text-Script.txt
-rwxrwxrwx@ 1 root  wheel  592 Dec  6 08:36 Text-Script.txt
sh-3.2# more Text-Script.txt
#/!/usr/bin/expect -f
set telnetAddr "172.22.22.254"
set username "ww"
set passwords "ww"
set enablepassword "ww"
spawn telnet $telnetAddr
expect "Username: "
send "username\r"
expect "Password: "
send "$passwords\r" 
expect "Orange-ISRGW>"
send "enable\r"
expect "Password: "
send "$enablepassword\r"
expect "Orange-ISRGW#"
send "term length 0\r"
expect "Orange-ISRGW#"
send "sh flash\r"
expect "Orange-ISRGW#"
send "delete flash:c1140-k9w7-tar.default.JAR\r"
expect "Delete flash:/c1140-k9w7-tar.default.JAR? [confirm]"
send  "\r"
expect "Orange-ISRGW#"
send "exit/r"
sh-3.2#
sh-3.2# pwd
/usr/bin
sh-3.2# Text-Script.txt
/usr/bin/Text-Script.txt: line 8: spawn: command not found
couldn't read file "Username: ": no such file or directory
/usr/bin/Text-Script.txt: line 10: send: command not found
": no such file or directory:
/usr/bin/Text-Script.txt: line 12: send: command not found
": no such file or directorySRGW>
/usr/bin/Text-Script.txt: line 14: send: command not found
couldn't read file "Password: ": no such file or directory
/usr/bin/Text-Script.txt: line 16: send: command not found
": no such file or directorySRGW#
/usr/bin/Text-Script.txt: line 18: send: command not found
": no such file or directorySRGW#
/usr/bin/Text-Script.txt: line 20: send: command not found
": no such file or directorySRGW#
/usr/bin/Text-Script.txt: line 22: send: command not found
": no such file or directorylash:/c1140-k9w7-tar.default.JAR? [confirm]
/usr/bin/Text-Script.txt: line 24: send: command not found
": no such file or directorySRGW#
/usr/bin/Text-Script.txt: line 26: send: command not found
sh-3.2#
sh-3.2#
sh-3.2# ./Text-Script.txt
./Text-Script.txt: line 8: spawn: command not found
couldn't read file "Username: ": no such file or directory
./Text-Script.txt: line 10: send: command not found
": no such file or directory:
./Text-Script.txt: line 12: send: command not found
": no such file or directorySRGW>
./Text-Script.txt: line 14: send: command not found
couldn't read file "Password: ": no such file or directory
./Text-Script.txt: line 16: send: command not found
": no such file or directorySRGW#
./Text-Script.txt: line 18: send: command not found
": no such file or directorySRGW#
./Text-Script.txt: line 20: send: command not found
": no such file or directorySRGW#
./Text-Script.txt: line 22: send: command not found
": no such file or directorylash:/c1140-k9w7-tar.default.JAR? [confirm]
./Text-Script.txt: line 24: send: command not found
": no such file or directorySRGW#
./Text-Script.txt: line 26: send: command not found
sh-3.2#

Works like a Charm after making the change suggested ..
macminiserver:ExpectScript Tola$ more Text-Script.txt
#! /usr/bin/expect -f
set telnetAddr "172.22.22.254"
set username "ww"
set passwords "ww"
set enablepassword "ww"
spawn telnet $telnetAddr
expect "Username: "
send "$username\r"
expect "Password: "
send "$passwords\r" 
expect "Orange-ISRGW>"
send "enable\r"
expect "Password: "
send "$enablepassword\r"
expect "Orange-ISRGW#"
send "term length 0\r"
expect "Orange-ISRGW#"
send "sh flash\r"
expect "Orange-ISRGW#"
send  "delete flash:c1140-k9w7-tar.default.JAR\r"
send  "\r"
expect "Orange-ISRGW#"
send "sh flash\r"
interact
macminiserver:ExpectScript Tola$ ./Text-Script.txt
spawn telnet 172.22.22.254
Trying 172.22.22.254...
Connected to 172.22.22.254.
Escape character is '^]'.
User Access Verification
Username: ww
Password:
Orange-ISRGW>enable
Password:
Orange-ISRGW#term length 0
Orange-ISRGW#sh flash
-#- --length-- -----date/time------ path
2         1440 Oct 24 2013 11:23:26 -07:00 vlan.dat
3     63714548 May 3 2010 11:49:40 -07:00 c2800nm-adventerprisek9_ivs_li-mz.151-1.T.bin
5     67871024 Nov 9 2012 19:05:24 -08:00 c2800nm-adventerprisek9-mz.151-4.M5.bin
124751872 bytes available (131600384 bytes used)
Orange-ISRGW#delete flash:c1140-k9w7-tar.default.JAR
Delete flash:/c1140-k9w7-tar.default.JAR? [confirm]
%Error deleting flash:/c1140-k9w7-tar.default.JAR (File not found)
Orange-ISRGW#sh flash
-#- --length-- -----date/time------ path
2         1440 Oct 24 2013 11:23:26 -07:00 vlan.dat
3     63714548 May 3 2010 11:49:40 -07:00 c2800nm-adventerprisek9_ivs_li-mz.151-1.T.bin
5     67871024 Nov 9 2012 19:05:24 -08:00 c2800nm-adventerprisek9-mz.151-4.M5.bin
124751872 bytes available (131600384 bytes used)
Orange-ISRGW#

Similar Messages

  • [solved]Need help with a bash script for MOC conky artwork.

    I need some help with a bash script for displaying artwork from MOC.
    Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
    mocp -Q %file
    gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last  '/'?)
    A point in the right direction would be appreciated.
    thanks, d
    Last edited by dgz (2013-08-29 21:24:28)

    Xyne wrote:
    You should also quote the variables and output in double quotes to make the code robust, e.g.
    filename="$(mocp -Q %file)"
    dirname="${filename%/*}"
    cp "$dirname"/front.jpg ~/backup/art.jpg
    Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
    thanks for the tip.
    here it is, anyhow:
    #!/bin/bash
    filename=$(mocp -Q %file)
    dirname=${filename%/*}
    cp ${dirname}/front.jpg ~/backup/art.jpg
    then in conky:
    $alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
    thanks for the help.
    Last edited by dgz (2013-08-29 21:26:32)

  • Need help with a basic script to resize image then resize the canvas

    I am new to photoshop scripting, and have come across a need to force an image to be 8"x10" at 300dpi (whether it is vertical or horizontal)
    I need to maintain the correct orientation in the file, so an Action will not work, I believe I have to implement a script to accomplish this.
    I have the below script so far, but I am not certain of how to input the variables / paramters
    doc = app.activeDocument;
    if (doc.height > doc.width) doc.resizeImage("2400 pixels","3600 pixels", "300", "BICUBIC");
    if (doc.height > doc.width) doc.resizeCanvas("2400 pixels","3000 pixels", "MIDDLECENTER");
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    if (doc.height < doc.width) doc.resizeCanvas(3000,2400,"MIDDLECENTER");
    When I run this script, I get the following error:
    Error 1245: Illegal argument - argument 4
    - Enumerated value expected
    Line: 5
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    The fact that its failing on lien 5 lets nme know that I have the "If" portions of my script correct, I just dont know how to accomplish the functions correctly.
    Any help would be appreciated!
    Thanks,
    Brian

    I know I'm late here but it seems to me your trying to automate a 8"x10 or 10"x8 300DPI  print.
    To do that you must first crop your image to a 4:5 aspect ratio to prevent distortion unless your shooting with a 4" by 5" camera.   I wrote a Plugin script a couple years ago that could help you do a centered crop.  You could do the whole process by recording a simple Photoshop action that uses two  Plugin Scripts only four steps would be needed.
    Step 1 Menu File>Automate>AspectRatioSelection  (My script based of Adobe Fit Image Plugin script) Set 4:5 Aspect ratio, center,  Rectangle, Replace, no feather. Llike Fit Image this script woks on both Landscape and Portrait images. The Selection will be correct for the images orientation.
    Step 2 Menu Image>Crop
    Step 3 Menu File>Automate>Fit Image set 3000 PX height and 3000 PX width the Image will be Resample so its longest side will be 3000 pixels.  Adobe Fit Image Plugin Script always uses BICUBIC resampling.  I have a modified version of Fit Image  that uses Bicubic Sharper whebndownsizing and BicubicSmoother when up sizing.
    Step 4 Menu Image>Size un check resample set resolution to 300 DPI.
    When you play the actions the Script Dialogs will not be displayed and the setting use when you recorded the action will ne used.
    The Plugin Script are included in my crafting actions package:
    http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
    Contains:
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
    12 Scripts for actions
    My other free Photoshop downloads cam be found here: http://www.mouseprints.net/Photoshop.html

  • Need help with simple python script (renaming and moving folder)

    I have this script for use with sabnzbd, what it does is rename all folders in the desired directory, replacing any spaces with dots (example: Movie 2011 HD -> Movie.2011.HD).
    #!/usr/bin/env python2
    workdir = '/media/stuff/movies' #### CHANGE this line to your movie directory
    for path, dirnames, filenames in os.walk(workdir):
    print "path:", path
    for dirname in dirnames:
    if dirname.find(' ') > -1 :
    # Yes, a space in the directory name, so replace it:
    newname = dirname.replace(' ','.')
    fulldirname = path + '/' + dirname
    fullnewname = path + '/' + newname
    print "Rename" , fulldirname, " ", fullnewname
    os.rename(fulldirname, fullnewname)
    What I would like it to do is 1. rename only the movie I run the script on (instead of /media/stuff/movies as above, the entire movie folder), and then 2. move the movie into /media/stuff/movies. Or vice versa! (I'd just prefer not to have it run on the entire movie directory).
    Appreciate any help!

    Just my two cents:
    I would not use walkdir but as usual a combination of find and python.
    A simplified version of the script could look like this:
    #!/usr/bin/python
    # -*- coding: utf8 -*-
    import os, shutil
    # Define target dir
    target_dir = "/media/stuff/movies/"
    # Loop through all found files
    for source_file in os.popen ("find ."):
    # Remove \n
    source_file = source_file[:-1]
    extension = source_file[-3:]
    # Only process video files
    if (extension == 'mkv') or (extension == 'avi') or (extension == 'mp4'):
    target_file = source_file.split('/')
    target = target_file[len(target_file)-1]
    target = target.replace(' ','.')
    shutil.copy (source_file, targetdir + target)
    Of course you might first want to print out instead of really copy files.

  • Need help with Snow leopard I have Mac OS X ver 10.5.8

    Need help figuring out how to upgrade to snow leopard I have Mac OS X version 10.5.8

    Hey DreenaQ,
    Thanks for the question. Mac OS X 10.6 Snow Leopard is available from the Apple Online Store:
    Mac OS X 10.6 Snow Leopard - Apple Store (U.S.)
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Thanks,
    Matt M.

  • Need help with second hard drive on mac G4

    I recently took apart another computer and installed the hard drive on top of the "master" drive hoping I would be able to download more videos, music ect but when i try and download anything message pops outs that my disk is almost full i need help as you can see. I thought all i had to do was connect the drive but I guess that wasn't it.

    chuck818, welcome to Apple Discussions.
    What size is your Master HD & how much free space do you have? Are you getting messages about the HD being full?
    Insufficient HD space can lead to many problems - freezes, directory/file corruption, etc.
     Cheers, Tom

  • Need help with PHP mail script [was: Can someone please help me?]

    I'm trying to collect data from a form and email it.  I'm using form2mail.php and the problem is that the email is not collecting the form info and it has the same email address in the From: and To: lines. I'm really stuck and would appreciate any help.
    Here is the HTML code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Contact Us</title>
    <style type="text/css">
    <!--
    .style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style2 {
    font-size: 14px;
    color: #000000;
    body {
    background-color: #FFFFFF;
    body,td,th {
    color: #CC3300;
    .style3 {font-size: 14px; font-weight: bold; }
    .style6 {font-size: 18px}
    .style7 {font-size: 16px}
    .style8 {font-size: 16px; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style9 {font-size: 16px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
    .style10 {color: #000000}
    -->
    </style>
    </head>
    <body>
    <div align="center"><img src="nav2.jpg" alt="nav bar" width="698" height="91" border="0" usemap="#Map2" />
      <map name="Map2" id="Map2">
      <area shape="rect" coords="560,9,684,38" href="accessories.html" />
    <area shape="rect" coords="456,8,548,38" href="contact.html" />
    <area shape="rect" coords="305,8,435,40" href="photog.html" />
    <area shape="rect" coords="187,9,283,39" href="services.html" />
    <area shape="rect" coords="81,10,167,39" href="aboutus.html" />
    <area shape="rect" coords="5,10,68,39" href="index.html" />
    </map>
      <map name="Map" id="Map">
        <area shape="rect" coords="9,9,69,39" href="index.html" />
        <area shape="rect" coords="83,11,165,39" href="aboutus.html" />
        <area shape="rect" coords="182,9,285,38" href="services.html" />
        <area shape="rect" coords="436,14,560,37" href="contact.html" />
        <area shape="rect" coords="563,14,682,38" href="accessories.html" />
      </map>
    </div>
    <p> </p>
    <form id="TheForm" name="TheForm" action="form2mail.php" method="post">
      <p align="center" class="style2">P<span class="style1">lease fill out form below for a &quot;free no obligation quote&quot; then click submit.</span></p>
      <p align="center" class="style3">(*Required Information)</p>
      <div align="center">
        <pre><strong><span class="style8">*Contact Name</span> </strong><input name="name" type="text" id="name" />
    <span class="style8"><strong>
    Business Name </strong></span><input name="bn" type="text" id="bn" />
    <span class="style8"><strong>*Phone Number <input type="text" name="first" size="3" onFocus="this.value='';"
        onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.second);" maxlength="3" value="###" /> - <input type="text" name="second" size="3" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.third);" maxlength="3" value="###" /> - <input type="text" name="third" size="4" onFocus="this.value='';" onKeyup="checkNumber(this.value); autoTab(this, document.TheForm.fourth);" maxlength="4" value="####"/> </strong></span>
    <strong><span class="style1">*</span><span class="style8">Email Address</span> <input name="email" type="text" id="email" />     </strong> </pre>
        <label><span class="style9">*Re-enter to confirm</span>
        <input name="emx" type="text" id="emx" /></label><br /><br /><span class="style9">
    <label></label>
        </span>
        <p><span class="style9">*Best time to call </span>
          <select name="name1[]" multiple size="1" >
            <option>8am-9am</option>
            <option>9am-10am</option>
            <option>10am-11am</option>
            <option>11am-12pm</option>
            <option>12pm-1pm</option>
            <option>1pm-2pm</option>
            <option>2pm-3pm</option>
            <option>3pm-4pm</option>
            <option>4pm-5pm</option>
            <option>5pm-6pm</option>
            <option>6pm-7pm</option>
            <option>7pm-8pm</option>
          </select>
          <br />
          <br />
          <span class="style9">Type of Location</span>
          <select name="name2[]" multiple size="1" >
            <option>Residential</option>
            <option>Commercial</option>
          </select>
          <br />
          <br />
            <span class="style1"><br />
            <strong><br />
              <span class="style6">*Type of Services Requested:</span></strong><br />
            </span><strong><span class="style10">(check all that apply)</span><br />
                </strong><br />
                <span class="style7"><span class="style1"><strong>Janitorial cleaning</strong></span>
                <input type="checkbox" name="checkbox[]" value="checkbox" multiple/>
                <br />
                </span><strong><br />
                  <span class="style8">Mobile Auto Detailing</span>
                <input type="checkbox" name="checkbox2[]" value="checkbox" multiple/>
                <br />
                <br />
                  </strong><span class="style9">Moving/Hauling</span>
          <input type="checkbox" name="checkbox3[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Pressure washing</span>
          <input type="checkbox" name="checkbox4[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window washing</span>
          <input type="checkbox" name="checkbox5[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Window Tinting</span>
          <input type="checkbox" name="checkbox6[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Boat cleaning</span>
          <input type="checkbox" name="checkbox7[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">RV cleaning</span>
          <input type="checkbox" name="checkbox8[]" value="checkbox" multiple/>
          <br />
          <br />
                  <span class="style9">Motorcycle cleaning</span>
          <input type="checkbox" name="checkbox9[]" value="checkbox" multiple/>
          <br />
          <br />
          <br />
          <br />
          <input name="SB"  type="button" class="style9" value="Submit" onClick="sendOff();">
        </p>
      </div></label>
      <script language="JavaScript1.2">
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this  header
    var good;
    function checkEmailAddress(field) {
    // Note: The next expression must be all on one line...
    //       allow no spaces, linefeeds, or carriage returns!
    var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org) |(\..{2,2}))$)\b/gi);
    if (goodEmail){
       good = true
    } else {
       alert('Please enter a valid e-mail address.')
       field.focus()
       field.select()
       good = false
    function autoTab(startPoint,endPoint){
    if (startPoint.getAttribute&&startPoint.value.length==startPoint.getAttribute("max length"))
    endPoint.focus();
    function checkNumber(phoneNumber){
    var x=phoneNumber;
    var phoneNumber=/(^\d+$)|(^\d+\.\d+$)/
    if (phoneNumber.test(x))
    testResult=true
    else{
    alert("Please enter a valid number.")
    phoneNumber.focus();
    phoneNumber.value="";
    testResult=false
    return (testResult)
    function sendOff(){
       namecheck = document.TheForm.name.value   
       if (namecheck.length <1) {
          alert('Please enter your name.')
          return
       good = false
       checkEmailAddress(document.TheForm.email)
       if ((document.TheForm.email.value ==
            document.TheForm.emx.value)&&(good)){
          // This is where you put your action
          // if name and email addresses are good.
          // We show an alert box, here; but you can
          // use a window.location= 'http://address'
          // to call a subsequent html page,
          // or a Perl script, etc.
          window.location= 'form2mail.php';
       if ((document.TheForm.email.value !=
              document.TheForm.emx.value)&&(good)){
              alert('Both e-mail address entries must match.')
    </script>
    </form>
    <p> </p>
    </body>
    </html>
    and here is the form2mail.php:
    <?php
    # You can use this script to submit your forms or to receive orders by email.
    $MailToAddress = "[email protected]"; // your email address
    $redirectURL = "http://www.chucksmobile.com/thankyou.html"; // the URL of the thank you page.
    $MailSubject = "[Customer Contact Info]"; // the subject of the email
    $sendHTML = FALSE; //set to "false" to receive Plain TEXT e-mail
    $serverCheck = FALSE; // if, for some reason you can't send e-mails, set this to "false"
    # copyright 2006 Web4Future.com =================== READ THIS ===================================================
    # If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
    # If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
    # To block an IP, simply add it to the blockip.txt text file.
    # CHMOD 777 the blockip.txt file (run "CHMOD 777 blockip.txt", without the double quotes)
    # This is needed because the script tries to block the IP that tried to hack it
    # If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
    # you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
    # you have to do the same with checkboxes
    Web4Future Easiest Form2Mail (GPL).
    Copyright (C) 1998-2006 Web4Future.com All Rights Reserved.
    http://www.Web4Future.com/
    This script was written by George L. & Calin S. from Web4Future.com
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
    $w4fver =  "2.2";
    $ip = ($_SERVER['HTTP_X_FORWARDED_FOR'] == "" ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']);
    //function blockIP
    function blockip($ip) {
    $handle = @fopen("blockip.txt", 'a');
    @fwrite($handle, $ip."\n");
    @fclose($handle);
    $w4fx = stristr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));
    if ($serverCheck) {
    if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"])) { $w4fy = TRUE; } else { $w4fy = FALSE; }
    } else { $w4fy = TRUE; }
    if (($w4fy === TRUE) && ($w4fx === FALSE)) {
    $w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body><font face=3Dverdana size=3D2>";
    if (count($_GET) >0) {
    reset($_GET);
    while(list($key, $val) = each($_GET)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end if
    else {
    reset($_POST);
    while(list($key, $val) = each($_POST)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
       $w4fMessage .= "<b>$key:</b> ";
       foreach ($val as $vala) {
        $vala =stripslashes($vala);
        $vala = htmlspecialchars($vala);
        if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }   
        $w4fMessage .= "$vala, ";
       $w4fMessage .= "<br>\n";
      else {
       $val = stripslashes($val);
       if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
       if (($key == "Submit") || ($key == "submit")) { } 
       else {  if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
         else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
    } // end while
    }//end else
    $w4fMessage .= "<font size=3D1><br><br>\n Sender IP: ".$ip."</font></font></body></html>";
        $w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/\n/");
    $name = preg_replace($w4f_what, "", $name);
    $email = preg_replace($w4f_what, "", $email);
    if (!$email) {$email = $MailToAddress;}
    $mailHeader = "From: $name <$email>\r\n";
    $mailHeader .= "Reply-To: $name <$email>\r\n";
    $mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\n";
    $mailHeader .= "MIME-Version: 1.0\r\n";
    if ($sendHTML) {
      $mailHeader .= "Content-Type: multipart/alternative;";  
      $mailHeader .= "  boundary=\"----=_NextPart_000_000E_01C5256B.0AEFE730\"\r\n";    
    $mailHeader .= "X-Priority: 3\r\n";
    $mailHeader .= "X-Mailer: PHP/" . phpversion()."\r\n";
    $mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fver\r\n";
    if ($sendHTML) {
      $mailMessage = "This is a multi-part message in MIME format.\r\n\r\n";
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
      $mailMessage .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";  
      $mailMessage .= "Content-Type: text/html;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= "$w4fMessage\r\n\r\n";  
      $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--\r\n";  
    if ($sendHTML === FALSE) {
      $mailHeader .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";  
      $mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";  
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
    else { header("Location: ".$redirectURL); }
    } else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
    ?>
    Thanks in advance,
    Glenn
    [Subject line edited by moderator to indicate nature of request]

    Using PHP to process an online form and send the input by email is very simple. The mail() function takes a minimum of three arguments, namely: the address the mail is being sent to, the subject line, and the body of the email as a single string. The reason some people use scripts like form2mail.php is because they don't have the knowledge or patience to validate the user input to make sure it's safe to send.
    Rather than attempt to trawl through your complex form looking for the problems, I would suggest starting with a couple of simple tests.
    First of all, create a PHP page called mailtest.php containing the following script:
    <?php
    $to = '[email protected]'; // use your own email address
    $subject = 'PHP mail test';
    $message = 'This is a test of the mail() function.';
    $sent = mail($to, $subject, $message);
    if ($sent) {
      echo 'Mail was sent';
    } else {
      echo 'Problem sending mail';
    ?>
    Save the script, upload it to your server, and load it into a browser. If you see "Mail is sent", you're in business. If not, it probably means that the hosting company insists on the fifth argument being supplied to mail(). This is your email address preceded by -f. Change the line of code that sends the mail to this:
    $sent = mail($to, $subject, $message, null, '[email protected]');
    Obviously, replace "[email protected]" with your own email address.
    If this results in the mail being sent successfully, you will need to adapt the code in form2mail.php to accept the fifth parameter. You need to change the following line, which is a few lines from the end of the script:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader))
    Change it to this:
    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader, '[email protected]'))
    Again, use your own email address instead of "[email protected]".
    Once you have determined whether you need the fifth argument, test form2mail.php with a very simple form like this:
    <form id="form1" name="form1" method="post" action="form2mail.php">
      <p>
        <label for="name">Name:</label>
        <input type="text" name="name" id="name" />
      </p>
      <p>
        <label for="email">Email:</label>
        <input type="text" name="email" id="email" />
      </p>
      <p>
        <label>
          <input type="checkbox" name="options[]" value="boat cleaning" id="options_0" />
          Boat cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="RV cleaning" id="options_1" />
          RV cleaning</label>
        <br />
        <label>
          <input type="checkbox" name="options[]" value="motorcycle cleaning" id="options_2" />
          Motorcycle cleaning</label>
      </p>
      <p>
        <input type="submit" name="send" id="send" value="Submit" />
      </p>
    </form>
    If that works, you can start to make the form more complex and add back your JavaScript validation.

  • Need help with running a Java program on Linux

    I am trying to get a Java program to run on a Linux machine. The program is actually meant for a Mac computer. I want to see if someone with Java experience can help me determine what is causing the program to stall. I was successful in getting it installed on my Linux machine and to partially run.
    The program is an interface to a database. I get the login screen to appear, but then once I enter my information and hit enter the rest of the program never shows, however, it does appear to connect in the background.
    Here is the error when I launch the .jar file from the command screen:
    Exception in thread "main" java.lang.IllegalArgumentException: illegal component position
    at java.awt.Container.addImpl(Unknown Source)
    at java.awt.Container.add(Unknown Source)
    I am not a programmer and I am hoping this will make some sense to someone. Any help in resolving this is greatly appreciated!

    Well, without knowing a little bit about programming, and how to run your debugger, I don't think you're going to fix it. The IllegalArgumentException is saying that some call does not like what it's getting. So you'll have to go in an refactor at least that part of the code.

  • Help! Need help with preflight package script

    I am trying to write a package with Iceberg to push Office 2004 to 250 Macs. I need a preflight script with a condition that will stop my script if /Applications/Microsoft Office 2004 exists OR if OFFICE 2004 exists. Don't know if searching on the folder name is the best or if there is better way
    If it doesn't exist I want it to continue with with placing Office 2004 in the /Applications folder.
    I don't know how to do conditions (If, then, end)
    PREFLIGHT SCRIPT
    IF /Applications/Microsoft Office 2004 folder exist = STOP
    IF /Applications/Microsoft Office 2004 folder doesn't exist continue with laying down files/folder in the package.
    LAYDOWN FILES
    LAY DOWN FILES IN ICEBERG FILE SECTION OF THE PACKAGE
    POSTFLIGHT SCRIPT
    #!/bin/sh
    #Change to root directory
    cd /
    # Move Microsoft Office X folder to Messages Received folder
    mv /Applications/Microsoft\ Office\ X /Messages\ Received
    #Open Office 2004 Installer
    open /Applications/Utilities/Installers/Office2004Installer
    ALL Mac OS X (10.4.6)
    ALL Mac OS X (10.4.6)
    ALL   Mac OS X (10.4.6)  

    A simple condition (not using iceberg) would be:
    #!/bin/sh
    if [ -e "/Applications/Microsoft Office 2004.app" ]
    then
    echo "Microsoft Office 2004 exists, aborting installation"
    exit 1
    fi
    open -a "/Applications/Utilities/Installers/Office2004Installer"
    If Microsoft Office 2004 is installed then the script will exit with a message. If Microsoft Office 2004 is not there then the last line will be executed and the installer will open.
    PowerBook G4   Mac OS X (10.4.8)   MacBook Pro

  • Need help with turingtest2's scripts

    Hello,
    I moved my files from C:/Users/Pat/My Music to S:/Users/Pat/My Music
    I do not use iTunes to manage my files, so they are organized in my own way. I would like to keep that structure and point iTunes to the new drive without reorganizing the files into different folder structures.
    I have come across turingtest2's scripts and I was planning to use ConsolidateByMoving, except that it is trying to use different folder names based on information stored in iTunes. See below:
    Notice how the band name is being processed as 'Frost_' instead of 'Frost'
    This is happening for most of my tracks and it will not import them the same way they were stored on my C:/.
    I would like to copy them over exactly how they are stored and update iTunes at the same time.
    I know I could simply do a 'replace all' on my iTunes Library.xml changing C:/Users/Pat to S:/Users/Pat, and then corrupt the .itl file, but I would like to preserve the metadata.
    Any recommendations on how I might achieve this would be greatly appreciated.  Perhaps I can alter a script?
    Thanks!!

    Hi there. tt2 here at your service.
    There are three approaches I can think of immediately.
    One would be that I write a variation of my ConsolidateByMoving script that does a search and replace operation on part of the current path to come up with the new target path, instead of calculating the whole path from the tag properties. I already have two variants, one that generates file & folder names over 40 characters and uses different character substitutions, and another that imposes my own personal structure. I use the main iTunes\iTunes Media\<Media Kind> structure and then have my own rules for the finer detail. Adding a tweak like this should be fairly easy.
    A second idea would be for you to move things where you want to and then use the FindTracks script to repair the brroken links. It is pretty good at locating files in non-standard layouts, but there is still a chance that you've arranged things in a way which it doesn't yet cope with.
    The third option, which I consider superior in the long run, can be seen in my post make a split library portable. If I've understood correctly your iTunes media folder is effectively C:/Users/Pat/My Music while the library folder is inside it as C:/Users/Pat/My Music/iTunes. If you have it the other way around, with the media folder inside the iTunes library folder (neither of which have to be called iTunes or iTunes Media) then the library can be moved as a unit whatever the arrangement of tracks within the media folder and it won't break. It also becomes much easier to backup.
    A fourth option would be to explain how to tweak the script so it contains your rules...
    What might be best is to copy your current iTunes folder to S:\ as S:\iTunes and shift-start iTunes to connect to the library file S:\iTunes\iTunes Library.itl then go with the first option (when it is ready) such that it replaces C:\Users\Pat\My Music with S:\iTunes\iTunes Media\Music.
    There will also be a need to consider what, if any, media or apps already exist within the iTunes folder and the current setting of the media folder in preferences.
    What are your thoughts?
    tt2

  • I really need help with my internet on my mac

    Okay I have a 13 unibody mbp 2009 and i cannot connect to the internet in any way (either airport or eithernet cord). I have reset everything and it still doesnt work. All the other computers in the house do. Even the bootcamp windows side works on my mac just the mac side doesnt. I am running 1.5.8.
    Please help me!
    I really need it running

    Open System Preferences/Network
    Select the location you want to fix (e.g. Home) in the top selector
    In the left hand column delete all the Services except Airport (which should say Connected ?)
    Click the Advanced button
    In the window that opens delete all Networks except your home/router named one
    Click TCP/IP
    Set Configure IPv4 to Using DHCP
    Click OK bottom right and you should see the Router fill in the number 192.168.2.1 (or similar) and your IPv4 address as 192.168.2.2 (or similar)
    Click the DNS button and add 8.8.8.8 and 8.8.4.4
    Click OK
    Click Apply
    Close the panel
    You should have an Internet connection through your router

  • Need Help With Custom Calculation Script

    Hey everyone.  I'm using Acrobat Pro X and stumbling a bit on the syntax for the following equation.  I need to add the value of "Cell1" & "Cell2" then add the value of "Cell3".  However,the value of "Cell3" is entered by the user and specifies a percentage of the sum of "Cell1 & "Cell2".  For example: If the user enters "3" into "Cell3" I need the returned value to be 3% of the sum of "Cell1" + "Cell2".  If the user enters "9" into "Cell3" I need the returned value for "Cell3" to be 9% of the sum of "Cell1 & Cell2" and the end result needs to be the sum of "Cell1+Cell2+Cell3".  In greater detail:
    If "Cell1" = $500, "Cell2" = $500 and "Cell3" = "3" then I need the returned value to be $1030.00.
    I hope this makes sense. Here's what I have so far but alas, it's not working.  Any help would be GREATLY appreciated.
    // Get first field value, as a number
    var v1 = +getField("Cell1").value;
    // Get second field value, as a number
    var v2 = +getField("Cell2").value;
    // Get processing field value, as a number
    //var v3 = +getField("Cell3"/100).value;
    // Calculate and set this field's value to the result
    event.value = v3+(v1+v2);
    Thanks,
    Solan

    I posted an answer but realized it wasn't what you wanted. There is some confusion about what you want for Cell3. On the one hand, you say you want the user to enter a vaule in the field, but them you say you want its value to be calculated based on what the user enters and two other field values. It seems to me Cell3 should be the field that the user enters the percentage and the calculated field's (Cell4) script could then be:
    // Get first field value, as a number
    var v1 = +getField("Cell1").value;
    // Get second field value, as a number
    var v2 = +getField("Cell2").value;// Get processing field value, as a number
    // Get the percentage
    var v3 = +getField("Cell3").value;
    // Calculate and set this field's value to the result
    event.value = (1 + v3 / 100) * (v1 + v2);

  • Need help with PHP mail script

    I  have created a  log in system  . In that when the  user completes the  registration process an auto reply(auto-reply@domain)  will generate and  sent this to users email id regarding about the user  name and password  (Lo gin Details). After formal approval from the admin  the user will  get a user activation mail with log in link.
    But , my problem is  these are work only for mail accounts from my  domain  only(test@domain). its not send any of above mentioned details  to other  mail services like gmail or yahoo etc.
    i discussed this   with some others, they said its the problem with your mail function   configuration. but i didn't get any needful information as am a  beginner  in PHP scripting.
    i have contacted this with my  hosting service they said its the  problem with  php mail () function  and use php mailer() instead mail().
    please give me a solution for the same..
    Here am ataching my code..
    <?php
    include 'dbc.php';
    $err = array();
    if($_POST['doRegister'] == 'Register')
    foreach($_POST as $key => $value) {
        $data[$key] = filter($value);
    if(empty($data['full_name']) || strlen($data['full_name']) < 4)
    $err[] = "ERROR - Invalid name. Please enter atleast 3 or more characters for your name";
    //header("Location: register.php?msg=$err");
    //exit();
    // Validate User Name
    if (!isUserID($data['user_name'])) {
    $err[] = "ERROR - Invalid user name. It can contain alphabet, number and underscore.";
    //header("Location: register.php?msg=$err");
    //exit();
    // Validate Email
    if(!isEmail($data['usr_email'])) {
    $err[] = "ERROR - Invalid email address.";
    //header("Location: register.php?msg=$err");
    //exit();
    // Check User Passwords
    if (!checkPwd($data['pwd'],$data['pwd2'])) {
    $err[] = "ERROR - Invalid Password or mismatch. Enter 5 chars or more";
    //header("Location: register.php?msg=$err");
    //exit();
    $user_ip = $_SERVER['REMOTE_ADDR'];
    // stores sha1 of password
    $sha1pass = PwdHash($data['pwd']);
    // Automatically collects the hostname or domain  like example.com)
    $host  = $_SERVER['HTTP_HOST'];
    $host_upper = strtoupper($host);
    $path   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    // Generates activation code simple 4 digit number
    $activ_code = rand(1000,9999);
    $usr_email = $data['usr_email'];
    $user_name = $data['user_name'];
    $rs_duplicate = mysql_query("select count(*) as total from users where user_email='$usr_email' OR user_name='$user_name'") or die(mysql_error());
    list($total) = mysql_fetch_row($rs_duplicate);
    if ($total > 0)
    $err[] = "ERROR - The username/email already exists. Please try again with different username and email.";
    if(empty($err)) {
    $sql_insert = "INSERT into `users`
                  (`full_name`,`user_email`,`pwd`,`address`,`tel`,`fax`,`website`,`date`,`users_ip`,`activa tion_code`,`country`,`user_name`
                VALUES
                ('$data[full_name]','$usr_email','$sha1pass','$data[address]','$data[tel]','$data[fax]',' $data[web]'
                ,now(),'$user_ip','$activ_code','$data[country]','$user_name'
    mysql_query($sql_insert,$link) or die("Insertion Failed:" . mysql_error());
    $user_id = mysql_insert_id($link); 
    $md5_id = md5($user_id);
    mysql_query("update users set md5_id='$md5_id' where id='$user_id'");
    //    echo "<h3>Thank You</h3> We received your submission.";
    if($user_registration)  {
    $a_link = "
    *****ACTIVATION LINK*****\n
    http://$host$path/activate.php?user=$md5_id&activ_code=$activ_code
    } else {
    $a_link =
    "Your account is *PENDING APPROVAL* and will be soon activated the administrator.
    $message =
    "Hello \n
    Thank you for registering with us. Here are your login details...\n
    User ID: $user_name
    Email: $usr_email \n
    Passwd: $data[pwd] \n
    $a_link
    Thank You
    Administrator
    $host_upper
    THIS IS AN AUTOMATED RESPONSE.
    ***DO NOT RESPOND TO THIS EMAIL****
        mail($usr_email, "Login Details", $message,
        "From: \"Member Registration\" <auto-reply@$host>\r\n" .
         "X-Mailer: PHP/" . phpversion());
      header("Location: thankyou.php"); 
      exit();
    ?>

    I  have created a  log in system  . In that when the  user completes the  registration process an auto reply(auto-reply@domain)  will generate and  sent this to users email id regarding about the user  name and password  (Lo gin Details). After formal approval from the admin  the user will  get a user activation mail with log in link.
    But , my problem is  these are work only for mail accounts from my  domain  only(test@domain). its not send any of above mentioned details  to other  mail services like gmail or yahoo etc.
    i discussed this   with some others, they said its the problem with your mail function   configuration. but i didn't get any needful information as am a  beginner  in PHP scripting.
    i have contacted this with my  hosting service they said its the  problem with  php mail () function  and use php mailer() instead mail().
    please give me a solution for the same..
    Here am ataching my code..
    <?php
    include 'dbc.php';
    $err = array();
    if($_POST['doRegister'] == 'Register')
    foreach($_POST as $key => $value) {
        $data[$key] = filter($value);
    if(empty($data['full_name']) || strlen($data['full_name']) < 4)
    $err[] = "ERROR - Invalid name. Please enter atleast 3 or more characters for your name";
    //header("Location: register.php?msg=$err");
    //exit();
    // Validate User Name
    if (!isUserID($data['user_name'])) {
    $err[] = "ERROR - Invalid user name. It can contain alphabet, number and underscore.";
    //header("Location: register.php?msg=$err");
    //exit();
    // Validate Email
    if(!isEmail($data['usr_email'])) {
    $err[] = "ERROR - Invalid email address.";
    //header("Location: register.php?msg=$err");
    //exit();
    // Check User Passwords
    if (!checkPwd($data['pwd'],$data['pwd2'])) {
    $err[] = "ERROR - Invalid Password or mismatch. Enter 5 chars or more";
    //header("Location: register.php?msg=$err");
    //exit();
    $user_ip = $_SERVER['REMOTE_ADDR'];
    // stores sha1 of password
    $sha1pass = PwdHash($data['pwd']);
    // Automatically collects the hostname or domain  like example.com)
    $host  = $_SERVER['HTTP_HOST'];
    $host_upper = strtoupper($host);
    $path   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    // Generates activation code simple 4 digit number
    $activ_code = rand(1000,9999);
    $usr_email = $data['usr_email'];
    $user_name = $data['user_name'];
    $rs_duplicate = mysql_query("select count(*) as total from users where user_email='$usr_email' OR user_name='$user_name'") or die(mysql_error());
    list($total) = mysql_fetch_row($rs_duplicate);
    if ($total > 0)
    $err[] = "ERROR - The username/email already exists. Please try again with different username and email.";
    if(empty($err)) {
    $sql_insert = "INSERT into `users`
                  (`full_name`,`user_email`,`pwd`,`address`,`tel`,`fax`,`website`,`date`,`users_ip`,`activa tion_code`,`country`,`user_name`
                VALUES
                ('$data[full_name]','$usr_email','$sha1pass','$data[address]','$data[tel]','$data[fax]',' $data[web]'
                ,now(),'$user_ip','$activ_code','$data[country]','$user_name'
    mysql_query($sql_insert,$link) or die("Insertion Failed:" . mysql_error());
    $user_id = mysql_insert_id($link); 
    $md5_id = md5($user_id);
    mysql_query("update users set md5_id='$md5_id' where id='$user_id'");
    //    echo "<h3>Thank You</h3> We received your submission.";
    if($user_registration)  {
    $a_link = "
    *****ACTIVATION LINK*****\n
    http://$host$path/activate.php?user=$md5_id&activ_code=$activ_code
    } else {
    $a_link =
    "Your account is *PENDING APPROVAL* and will be soon activated the administrator.
    $message =
    "Hello \n
    Thank you for registering with us. Here are your login details...\n
    User ID: $user_name
    Email: $usr_email \n
    Passwd: $data[pwd] \n
    $a_link
    Thank You
    Administrator
    $host_upper
    THIS IS AN AUTOMATED RESPONSE.
    ***DO NOT RESPOND TO THIS EMAIL****
        mail($usr_email, "Login Details", $message,
        "From: \"Member Registration\" <auto-reply@$host>\r\n" .
         "X-Mailer: PHP/" . phpversion());
      header("Location: thankyou.php"); 
      exit();
    ?>

  • Need help with image push script please

    I am playing around with some javascript for the push / pull image used on webcam sites. When i run one, it never refreshes the image in my browser when I change the image. It only does if I delete the image and then repost it. It seems my browser looks for the cache or something first. How can I make ANY browser force to load the image without deleting it first?
    Here is the script I am using:
    <SCRIPT>
    <!-- ===================
    browserType = navigator.appName;
    newImage = new Image();
    Srvr_IP= "http://127.0.0.1/myFile.jpg?";
    var dly;
    if (browserType == "Netscape") document.write('<IMG SRC="'+ Srvr_IP +'"
    ') else document.write('<IMG SRC="' + Srvr_IP +'" name=ZahidiTV2Web
    Alt="Web Server is off. Please try later." border=1 >');
    uniq= 1;
    newImage.src= Srvr_IP + uniq;
    SnapShot_Loop(4000);
    function SnapShot_Loop(delay)
    dly= delay
    if( document.all) loadNewImage();
    setTimeout("SnapShot_Loop(dly)",delay);
    function loadNewImage()
    Stamp = new Date();
    uniq= Stamp.getTime();
    document.images.ZahidiTV2Web.src= newImage.src;
    newImage.src= Srvr_IP + uniq;
    window.status = "Displaying live video ...";
    </SCRIPT>
    <P>
    Hello

    These forums are for Java, not JavaScript.

  • HT4864 Need help with iCloud set up on Mac Mail Client

    hi thanks for you help.  I had a long day of issues with my icloud configuration on my Mac Mail. Suddenly (with no changes on my part) there were issues with emails going out. I followed the protocols below.  Is there an issue with my AUTHENTICATION choice? I tried external tps but that didn't work, but Apple Token is what is working). I have the box checked for keep sent emails. I can't figure this out and it's so frustrating. I have a new Air Laptop. 
    IMAP information for the incoming mail server
    Server name: imap.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 993
    Username: The name part of your iCloud email address (for example, emilyparker, not ********)
    Password: Your iCloud password
    SMTP information for the outgoing mail server
    Server name: smtp.mail.me.com
    SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
    Port: 587
    SMTP Authentication Required: Yes
    Username: Your full iCloud email address (for example, emilyparker, not ********)
    Password: Your iCloud password
    <E-mail Edited by Host>

    Those look like the correct settings.  You might want to post this over in the OS X Lion forum to see if they have any suggestions.

Maybe you are looking for

  • How to supress SLQ loader exit status 2

    Hi All, I am loading a file through sql loader and control file has the condition as below. INTO TABLE XXX WHEN (256:256) != 'Y' and (1:2)=X'C4C4' Now the problem is that if a value 'Y' comes in the position specified, the sqlloader exit status becom

  • Restarting of SQL services

    Hi having a problem to restart my SQL services and its give me this error- FCB::Open failed: Could not open file E:\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER2\MSSQL\DATA\mastlog.ldf for file number 2.  OS error: 5(failed to retrieve text for this e

  • Max Effective Date in Discoverer

    How do you make Discoverer get the row that has the max effective dated record to return for each person? For example, if the report is bringing back a person with 3 rows and you want the row that has the max effective date, what condition do I use f

  • Vue scan doesn't recognize HP cm 2320

    im running on yosemite.  cm2320 prints just fine...per the helpful post i loaded vuescan to try and get scanner to work with the cm2320 in yosemite with my macbook air, but vuescan say cannot find a scanner....any ideas?  many thanks

  • Why cant i get my mac address book to replace contacts on iphone?

    When I use the ADVANCED function to sync (and replace) my iphone contacts with my iMac address book it does not work.  The function works fine for the calander but not the contacts.  Are "contacts" and "address book" the same thing? what am i doing w