Simple PLATFORM detect script?

I'm hoping there's a simple solution for this -- I need it up
and running before Monday.
I've built two versions of a simple site: one stupid version
for cel phones/blackberrys, etc., one sensible version for regular
ol' Macs & PCs. The cel version is the default page. The one
for computers is in a subfolder.
Rather than get into an elaborate script that would attempt
to account every kind of handheld that might hit the site, it seems
like it should be easier to just simply detect for Mac & PC
with javascript and route them accordingly to the subfolder. The
handhelds should just ignore the javascript and stay where they
are....... right?
I'm not a javascript person, though -- so if anybody has a
simple script that does this, I'd be most appreciative.
Also, is my hypothesis about the handhelds simply ignoring
javascript correct, or will they choke on it and not render the
page?
Many thanks!

> The handhelds should just ignore the javascript and stay
where
> they are....... right?
Wrong. Many (most? all?) visual phones do javascript.
The right way to do this would be to build one page with a
mobile media
stylesheet - this stylesheet would dumb the page down
(however, you'd be
surprised how nice pages look on my iPhone) for cel phones,
and let the page
blossom on other media.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Bentmen" <[email protected]> wrote in
message
news:gf4lp4$jjk$[email protected]..
> I'm hoping there's a simple solution for this -- I need
it up and running
> before Monday.
>
> I've built two versions of a simple site: one stupid
version for cel
> phones/blackberrys, etc., one sensible version for
regular ol' Macs & PCs.
> The
> cel version is the default page. The one for computers
is in a subfolder.
>
> Rather than get into an elaborate script that would
attempt to account
> every
> kind of handheld that might hit the site, it seems like
it should be
> easier to
> just simply detect for Mac & PC with javascript and
route them accordingly
> to
> the subfolder. The handhelds should just ignore the
javascript and stay
> where
> they are....... right?
>
> I'm not a javascript person, though -- so if anybody has
a simple script
> that
> does this, I'd be most appreciative.
>
> Also, is my hypothesis about the handhelds simply
ignoring javascript
> correct,
> or will they choke on it and not render the page?
>
> Many thanks!
>

Similar Messages

  • Browser detection script

    Hello,
    I'm wondering how playback in Flash or on older browsers work. Does the published content run a browser detection script?
    Thank you.

    Actually this seems to work better:
    if (accept.indexOf("vnd.wap.wml") >= 0) {
         // I have a WAP browser...
    }I thought Opera (being WML compatible) would load the WML content, but thankfully it does not broadcast it in the Accept header.
    Thanks.

  • Flash Detection Script

    The Flash detection script generated by Flash 8 doesn't work
    with IE7 .....andy fixes out there??

    On Wed, 12 Sep 2007 17:48:49 +0000 (UTC), "joeq"
    <[email protected]> wrote:
    > let's say you have a page with that script and some
    flash content on it as
    >well... called scriptwithflash.html (catchy, eh?). i want
    to be able to have
    >that page load if the proper version of flash is found
    and redirect to another
    >page (ohcrapyoudonthaveflash.html) if it is isn't.
    Okay. Now it makes sense. Change this:
    if ( MM_FlashCanPlay ) {
    window.location.replace("
    http://www.leoandsabrina.com/main.html");
    } else{
    window.location.replace("
    http://www.leoandsabrina.com/poop.html");
    To this:
    if ( !MM_FlashCanPlay ) {
    window.location.replace("
    http://www.leoandsabrina.com/ohcrapyoudonthaveflash.html");

  • Detection script -- play alternative movies?

    How can I create alternative content like a quicktime movie
    to play as the alternative content, if user doesn't have flash
    player 8? I can put text or images in script, but quicktime or
    other media embeded in script doesn't show??

    I have a detection script put in my flash movie, which is
    embeded in my Dreamweaver file, from my Flash 8 authoring. It is
    for Flash 8. I want user's who don't have Flash 8 player, to see a
    quicktime version of that movie (in it's quicktime version). In the
    script section "alternative content" I can only place text or
    images and not quicktime or older flash movies -- it doesn't allow
    me to. Is there a way to do this??

  • Where to start with a simple platform game?

    What resources should I look at to learn how to create a very simple platform game, with a charactor who can simply jump on platforms and avoid enemies to reach the end of the level?
    I have made games like this with other languages but never flash.
    Thanks.

    I am also interested in this answer but in my case from the aspect of Silverlight-only developer with no flash experience (I know that sucks
    Thanks,
    Nikola

  • I can't get a simple "do shell script" in AppleScript to work!

    Hi All,
    I can get simple commands like "do shell script "ls"" or "do shell script "ps"" to work in AppleScript, but I cannot get something like "do shell script "python -V"" to work. (yes, my shell script says: do shell script "python -V" (no double quotes!))
    This is driving me nuts!
    Can anyone help?
    - Jon

    python -V appears to direct its output to stderr. Try
    do shell script "python -V 2>&1"

  • Simple button navigation script

    This question is so simple-I can't really find the answer
    anywhere, but as a complete NooB I have no idea how to make this
    work. I have a nested movie 1 layer down from main stage that has
    several navigation buttons that move to different main stage
    labeled frames. I get an 1120 error because I am somehow not
    calling them out on the script. I have named the instances..so
    that's not the problem. I think I just need to somehow direct the
    script to the nested location. If I move the buttons to the main
    stage I get no errors and it all works perfectly. Please help.
    Here's a sample script for the button:

    ok..not to mix things up but here's the instance name of
    button I'm currently working on: "buttonbio".
    It's located in a mc called "movFilmbackground". I'm trying
    to get the playhead to go to the frame label "bio" on the main
    stage.
    If I put the first code in...on the main stage at the
    beginning of the timeline, nothing happens when I try the button...
    If I put the second code in.. I get 1120 error.."access of
    undefined property buttonbio" & 1180 error "call to possibly
    undefined method movFilmbackgound"
    CODE

  • Issue with jython : javaos.py : Platform detection for Windows Server 2008

    Hi,
    While trying to execute a Windows batch file via ODI using Jython, the jython code fails with a 'Failure to execute command' error, and the command itself is appended with 'sh -c "<batchfilename>". The javaos.py file does not have 'Windows Server 2008' in the list of osTypeMap values, and therefore defaults to posix, which further adds the string 'sh -c' to the command and tries to execute the batch file under a unix style 'shell'. Adding the string 'Windows Server 2008' to the osTypeMap resolves the problem. However we are looking for possible alternate solutions.
    The question right now is:
    . Is there an updated javaos.py version available which supports Windows 2008.
    . Does the latest ODI installer include jython support for Windows 2008
    Reference links:
    WLST - Jython - detect platform
    http://osdir.com/ml/lang.jython.devel/2006-08/msg00035.html
    Thanks and regards,
    Kalpa

    Hi,
    I believe you mean the Active Directory Logs not the DNS logs, because these are necessary to startup a domain controller, because the AD database depends on these logs.
    So if you have AD logs on a different partition and that is encrypted with Bitlocker you could probably automatically unlock it.
    So you did not encrypt OS partition because the server does not have a TPM fully compliant chip ?
    manage-bde /?
    manage-bde -autounlock -enable Driveletter:
    But you have to be able to boot server normal mode I am not sure if the command can be used in DSRM mode.
    Below are some links that might help:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/c52ffc7d-f822-4b61-b633-46f8e04eac80/bitlocker-for-domain-controller
    Hope this helps.
    Regards,
    Calin

  • Simple date stamp script

    Hello Adobe Community!
    I have 100+ photos to which I need to add a date stamp. Is there a simple script to do this? I'd like to make it an action too if possible, and it's worth noting that I have no idea how to script! There were some samples linked here but I can't for the life of me figure out how to edit them to get the desired effect.

    You can't use the date from either the profile folder or NTUSER.DAT as a reliable indicator of when a user last logged on, if I understand what you're trying to do.  The profile folder date may not be updated even when the user's profile is active;
    my own profile folder on my current system hasn't been updated for fifty days, even though I've logged off and on repeatedly and rebooted the system at least once.
    On the other hand, NTUSER.DAT, since it contains the user's registry hive, can be updated
    at any time by a malware scanner, malicious website blocker, or registry cleaner, or (I think) by some kinds of software installation or update.
    If you want to delete user profiles according to when the user last logged on, you're probably going to have to scan the security log (assuming you have security auditing enabled).  Maybe a tool like
    Log Parser from Microsoft is what you need.
    If you're running in a domain, you should research ways to get information from Active Directory as well.

  • My super simple ip checking script

    i have a small home network with a PC running arch that acts as a NAT router; in the near future i am planning on setting up VPN access on this arch box. i would assume that it is imperative to know the external IP address of the router in order to connect. my ISP is comcast (cable) and they seem to be rather active in changing my DHCP'd address i get from them (in the past 6 months i have had 3 different ones). so i wrote this bash script that runs in the background and monitors the IP of the external interface. its pretty self explanatory; the mails to "vtext.com" are so i can have it texted to me. pointers would be welcome. i am not particularly a programmer, much more just an admin. the awk stuff seems messy, like there should be an easier way to isolate strings than that.... but idk. i run it
    #!/bin/bash
    # IP CHECK 2.0 (file name/path: /etc/scripts/ipcheck)
    # runs in the background and
    # requires sleep, mailx & ifconfig
    # assumes external interface named "eth0"
    # current ip output file path - single-line file containing current address (needs to be writable)
    OPATH="/var/ipcheck/currentip"
    # Amount of seconds to wait between checks
    WAITSECS=300 # 5 mins
    # Read previous IP from specified $OPATH file, if it's there
    if [ -f "$OPATH" ]; then
    OLDIP=`cat $OPATH`;
    fi
    # Begin main program loop
    while :
    do
    # retrieve new ip using ifconfig
    NEWIP=`/sbin/ifconfig eth0 | awk 'BEGIN{FS="inet ";RS=" netmask"}/</{print $2}' | tr -d '\\n' | tr -d ' '`
    # print whatever was awk'd and the current date/time to tty11
    echo "========= $NEWIP -- `date`" >> /dev/tty11
    # if a different NEW IP is detected AND it isn't a null value, then do the following:
    # * write the new address out to the OPATH file, replacing the previous value
    # * e-mail the new address to my phone via vtext.com
    # * e-mail both the old and new addresses to my main e-mail account
    # * reset the $OLDIP value as the new one
    if [[ "$OLDIP" != "$NEWIP" && "$NEWIP" != "" ]]; then
    echo $NEWIP > $OPATH
    echo "======= New Address - Old IP: $OLDIP ---- New IP: $NEWIP" >> /dev/tty12
    echo "New IP: $NEWIP" | /usr/bin/mailx [email protected]
    echo "Old IP: $OLDIP" | /usr/bin/mailx -s "New IP: $NEWIP" [email protected]
    OLDIP=$NEWIP
    fi
    # pause in between checks, then start again
    sleep $WAITSECS
    done

    falconindy wrote:
    Isola wrote:
    Here's my IP checking script, modified for mailx
    #!/bin/bash
    curl ifconfig.me | read IP
    [ "x$IP" == "x`tail -n1 /tmp/wanip`" ] && exit 0
    echo New IP: $IP
    echo -n Old IP:
    cat /tmp/wanip
    echo -n Number of times you had this IP before:
    grep $IP /tmp/wanip | wc -l
    } | mailx -s "New IP: $IP" [email protected] [email protected]
    echo $IP >> /tmp/wanip
    This can't possibly work as is... The assignment in the first line happens in a subshell. It's going to be blank in the rest of the script.
    Okay I admit, I just wrote that without testing it
    edit:
    The 2nd line can be changed for this:
    read IP < <(curl ifconfig.me) || exit $?
    Or
    IP=$(curl ifconfig.me) || exit $?
    Last edited by Isola (2012-07-01 00:59:39)

  • Automator hangs on simple iTunes-related script

    Hi folks,
    Automator (v2.0.2) seems to hang on some very simple scripts involving iTunes. For example:
    Get Selected ITunes Items -> Copy Finder Items (to Desktop)
    will hang in perpetuity on my system, even if a single, small mp3 file is the only selection in iTunes.
    On the other hand, if I use "Ask For Songs" and manually select the same mp3 file, the script works properly.
    Anyone have any ideas?
    Mike

    If you look in the description for the action, the input that the action is expecting and the result (output) of the action are listed. The output for the Get Selected iTunes Items is iTunes Items (an object that other iTunes actions can use), while the output for Ask for Songs is Files/Folders (an object that file handling actions can use). Automator 2 is pretty good at converting different object types, but not everything has a conversion action - apparently this is one of them.

  • Simple CDO Mail script??

    Hi,
    I need to automatically send an e-mail as a asp-page loads.
    No forms or interactivity, just a e-mail with a simple message.
    Does anybody has such a script? I am using asp and
    VisualBasic.
    Thanks!!

    Presuming CDONTS, it doesn't get much easier than the method
    outlined here:
    http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=25
    Simply plop it at the top of the page and away it goes :-)
    Best regards,
    Chris

  • Simple digital clock script

    Hi All,
    Since I am a new bee, I am seeking a simple digital clock MIDlet. Last two days I have been searching internet but I haven't found. If you do not consider me as RTFM or too lazy, could you please either post a script or simple give a shortcut?
    Many thanks in advance
    seyyah

    deepspace,
    this is my code but it is not updating. I know tha I am being too much. Help is really appriciated.
    * DrawImage.java
    * Draw mutable image on a canvas
    import java.util.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class emuezzin extends MIDlet
    private Display display; // The display
    private ImageCanvas canvas; // Canvas
    public emuezzin()
    display = Display.getDisplay(this);
    canvas = new ImageCanvas(this);
    protected void startApp()
    display.setCurrent( canvas );
    protected void pauseApp()
    protected void destroyApp( boolean unconditional )
    public void exitMIDlet()
    destroyApp(true);
    notifyDestroyed();
    * Class ImageCanvas
    * Draw mutable image
    class ImageCanvas extends Canvas implements CommandListener
    private Command cmExit; // Exit midlet
    private emuezzin midlet;
    private Image im = null;
    private String message = "developerWorks 1";
    public ImageCanvas(emuezzin midlet)
    this.midlet = midlet;
    // Create exit command and listen for events
    cmExit = new Command("Exit", Command.EXIT, 1);
    addCommand(cmExit);
    setCommandListener(this);
    * Draw mutable image
    protected void paint(Graphics g)
    // Clear the display
    Calendar now = Calendar.getInstance();
    int hours = now.get(Calendar.HOUR_OF_DAY);
    int minutes = now.get(Calendar.MINUTE);
    int seconds = now.get(Calendar.SECOND);
    String message = hours+":"+minutes+":"+ seconds;
    System.out.println("Current Time = "+message);
    // Create mutable image
    im = Image.createImage(100, 20);
    // Get graphics object to draw onto the image
    Graphics graphics = im.getGraphics();
    // Specify a font face, style and size
    Font font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
         graphics.setFont(font);
    // Draw a filled (blue) rectangle, with rounded corners
    graphics.setColor(0, 0, 255);
         graphics.fillRoundRect(0,0, im.getWidth()-1, im.getHeight()-1, 20, 20);
         // Center text horizontally in the image. Draw text in white
    graphics.setColor(255, 255, 255);
    graphics.drawString(message,
              (im.getWidth() / 2) - (font.stringWidth(message) / 2),
              (im.getHeight() / 2) - (font.getHeight() / 2),
              Graphics.TOP | Graphics.LEFT);
    g.setColor(255, 255, 255);
    g.fillRect(0, 0, getWidth(), getHeight());
    // Center the image on the display
    if (im != null)
    g.drawImage(im, getWidth() / 2, getHeight() / 2,
    Graphics.VCENTER | Graphics.HCENTER);
    public void run(){
    while(true){
    repaint();
    try{
    System.out.println("Current Time =");
    Thread.sleep(1000);
    } catch (Exception e){}
    public void commandAction(Command c, Displayable d)
    if (c == cmExit)
    midlet.exitMIDlet();
    }

  • Simple cold backup script

    I am a linux newbie and I need a simple script that will do the following for me. I am using Oracle 11g and RHEL 6 ....I wanting to use VI to write a script and schedule it nightly....
    1.) shutdown the database
    2.) copy the dbf's and maybe the archivelogs
    3.) start the database
    Then I am hoping to copy the dbf's to another server and clone.
    thanks for the help
    Edited by: user2857110 on Jan 4, 2012 8:10 AM

    This is the coolest way to clone:
    SYS password must be the same on both databases.
    In this RMAN code you will see the labels "Target" and "Auxiliary". Just remember that the "Target" is the DB you will be cloning FROM. It is more like the "Source". The "Auxiliary" is the DB that you will be cloning TO. The "Auxiliary" will be completely erased and replaced by the "Target".
    Must be able to SQLPlus to the "Auxiliary" DB from the command line of the server that hosts the "Target" DB.
    The "Auxiliary" database needs to be mounted but not open.
    Then run this. (I run it from the server that hosts the "Auxiliary" DB)
    rman target sys/password@PROD
    connect auxiliary sys/password@TEST
    run
    allocate channel c1 device type disk;
    allocate auxiliary channel c2 device type disk;
    duplicate target database to TEST from active database nofilenamecheck;
    }

  • Simple Window Close Script

    I have a simple script to close all the windows of the drives I mount at login, but right now the amount of windows to close is hardcoded in to the script. Is there a way to make this script just close all open finder windows instead of a set amount of windows the way it is set up now???
    This is the script as it is now;
    tell application "Finder"
    activate
    repeat 7 times
    close window 1
    end repeat
    end tell
    Any help would be great! Thanks.

    If you want every Finder window closed then this should work:
    <pre>
    tell application "Finder"
    close every window
    end tell
    </pre>
    If there are just specific windows you're wanting to close then it would take a bit more work.
    Steve

Maybe you are looking for