Advanced loadClip scripting

This is what I want to do:
I want to load a swf file in an empty movie clip (which I hav
edone before), and then onLoad tell the swf to jump to a specified
frame in that swf file (not a frame in the holder movie clip).
Is this possible with some nifty actionscript?
-Ricky Bobby
"I'm just a big hairy winning machine."

yes. use the onLoadInit() method of a moviecliploader
listener or use preloader code to ensure your swf has completed
loading before directing its timeline to a particular frame.

Similar Messages

  • What to do? When on a site with a PDF download I wish to open, the site commences to open in a new Tab but the information does not come through? This happens on all sites. The advanced Java Script is disabled.

    When on a site with a PDF download I wish to open, when I click on download the site commences to open in a new Tab but the information does not come through? This happens on all sites. The advanced Java Script is disabled. The new tab will sometimes flash black then go white with nothing else happening or just go white & nothing else?

    I had the same problem and also had PDF Download 3.0.02 installed. By removing this addon I can now select a PDF document which then opens up a normal Open With/Save dialogue allowing me to open the file or save it. Hope this helps.

  • [SOLVED] advanced shell script for mount and unmount samba share

    Good morning guys,
    Today I've a very long question....
    Hope in your help....:
    I usually move from different network.
    For one of those I need to mount some share that are under an ActiveDirectory server.
    To do that I use samba.
    Especially I've made and use the below  shell script.
    I know that it's so stupid but I'm a very newbie:
    #!/bin/sh
    echo "This is a custom script for mount my citrix share"
    echo "Please insert user password (must a sudoer user)"
    echo " "
    sudo mount -t cifs -o username='myusername',password='mypassword' //host_ip/TsHome$/myusername /home/myuser/samba_share/TsHOME
    sudo mount -t cifs -o username='myusername',password='mypassword' "//host_ip/direction" /home/myuser/samba_share/direction
    echo " "
    read -p "Press ENTER key to close this terminal"
    exit
    As I say the script work but it's so crude...!
    I want/need to implement it whit the follow addictions:
    1. print a feedback on mount: somenthing like "TsHOME is now mounted" or "unable to mount TsHOME"
    2. check if the share are already mounted: to prevent accidentally multiple mount. If a share is already mounted I want to print something like "TsHOME is already mounted on /home/myuser/samba_share/TsHOME"
    3. ask for share password  (now it's in clear on script) - This is optinal
    4. un-mount the share before reboot or shutdown command. That because I've notice that If i reboot or shutdown without manually un-mount the share the step of unmounting network file system became very slow
    If it's no extremely difficult, can someone help me to write this script?
    I know that man exist but I'm not a programmer and it's so difficult for me approch it.
    Thank you in advance.
    Ale
    Last edited by Alexbit (2010-09-23 21:29:13)

    Thank you very (VERY) much!
    I've follow your information and.. it work!
    If can be usefull to other this is the complete script:
    #!/bin/sh
    echo "This is a custom script for mount citrix share"
    echo "****************************************"
    echo " "
    echo "Please insert domain password:"
    read -s mypassword
    echo " "
    echo "|checking mount state...in share are not mounted mount it!|"
    echo "+-------------------------------------------------------------------------+"
    if grep "TsHome" /etc/mtab &>/dev/null; then
    grep "TsHome" /etc/mtab | awk '{print "TsHome is already mounted on " $2}'
    else
    sudo mount -t cifs -o username='yourusername',password="$mypassword" //ipaddress/TsHome$ /home/Samba_share/TsHOME && echo "TsHOME is now mounted" || echo "unable to mount TsHOME"
    fi
    echo " "
    if grep "direction" /etc/mtab &>/dev/null; then
    grep "direction" /etc/mtab | awk '{print "direction is already mounted on " $2}'
    else
    sudo mount -t cifs -o username='yourusername',password="$mypassword" '//ipaddress/direction' /home/Samba_share/direction' && echo "direction pat is now mounted" || echo "unable to mount direction"
    fi
    echo " "
    if grep "Area" /etc/mtab &>/dev/null; then
    grep "Area" /etc/mtab | awk '{print "Area is already mounted on " $2}'
    else
    sudo mount -t cifs -o username='yourusername',password="$mypassword" '//ipaddress/Area' /home/Samba_share/Area && echo "Area is now mounted" || echo "unable to mount Area"
    fi
    echo " "
    echo "All DONE!"
    echo " "
    read -p "Press ENTER key to close this terminal"
    exit
    I don't really well understand what I've to put in rc.local.shutdown....
    I think somethings like:
    #!/bin/bash
    # /etc/rc.local.shutdown: Local shutdown script.
    echo "This is a custom script for UN-mount citrix share"
    echo "********************************************"
    echo " "
    echo "|check mount state: if mount then un-mount!|"
    echo "+-------------------------------------------------------+"
    echo " "
    if grep "TsHome" /etc/mtab &>/dev/null; then
    grep "TsHome" /etc/mtab | awk '{print "TsHome is NOT mounted -> going on..." $2}'
    else
    sudo umount /home/Samba_share/TsHOME && echo "TsHOME is now UN mounted" || echo "unable to UN-mount TsHOME"
    fi
    echo " "
    if grep "direction" /etc/mtab &>/dev/null; then
    grep "direction" /etc/mtab | awk '{print "direction is NOT mounted -> going on.." $2}'
    else
    sudo umount /home/Samba_share/direction && echo "direction is now UN mounted" || echo "unable to UN-mount direction pat"
    fi
    echo " "
    if grep "Area" /etc/mtab &>/dev/null; then
    grep "Area" /etc/mtab | awk '{print "Area is NOT mounted - Finished" $2}'
    else
    sudo umount /home/Samba_share/Area && echo "Area is now UN mounted" || echo "unable to UN-mount Area"
    fi
    echo " "
    echo "going shutdown"
    echo " "
    sleep 5
    I've try but it seems to ignore the IF statement... this is the output when ALL share are UNmounted:
    $ sh /etc/rc.local.shutdown
    This is a custom script for UN-mount citrix share
    |check mount state: if mount then un-mount!|
    +-------------------------------------------------------+
    umount: /home/Samba_share/TsHOME: not mounted
    unable to UN-mount TsHOME
    umount: /home/Samba_share/direction: not mounted
    unable to UN-mount direction
    umount: /home/Samba_share/Area: not mounted
    unable to UN-mount Area
    going shutdown
    Tomorrow I will test again when I'm at office.
    Meanwhile can you check if I made a macroscopic mistakes?
    Thank you again!
    Last edited by Alexbit (2010-09-23 17:34:49)

  • Weird issue. Captivate 6 not letting me select a script for an Advanced Action

    Hi, So i'm facing this really weird issue on a captivate 6 project that i built. I need to add an Advance Action on a slide Exit action. This was previously set as "Continue" and now I want to set this to "Execute Advanced Action" (an Advanced Action script that I just wrote). The thing is that when I change the On Exit property to "Execute Advanced Actions", I am not able to select a script from the "Script" dropdown. I've tried everything from:
    changing machines and doing this on different computers with Captivate 6
    Making copies of the file and trying those
    Closing Captivate and Restarting my computer
    Ensuring that the slides are not locked
    but can't seem to figure this out. Also funnily, if I try to set the On Exit property of let's say slide 67 as "Execute Advanced Actions" (when it was previously just "Continue"), all other slides are also changing to this, meaning the On Exit property for all other slides has also been changed from "Continue" to "Execute Advanced Actions".
    I've been stuck with this for the last 6 hours and can't figue this out.
    Please Help!!!
    -Sean    

    If this is the same file you were having issues with before where we suspected corruption, then I'd have to say this probably confirms it.
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/recover-corrupt-project
    Usually the fix is to copy all slides into a new blank shell project of the same size to try and strip out the corruption issue.
    See item #4 here:
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/basic-troubleshooting-tech niques
    However, since you are on a Cp version earlier than 7.0.1, please note that this will also strip out all of your current advanced actions as well (which also might be where the corruption is anyway).
    Your issue is actually quite rare.  I cannot guarantee you that Cp 7 would never do the same thing, but one advantage of Cp7 is that you can try copying and pasting slides into a new shell project and it WILL bring along the advanced actions and variables as well.  So I definitely think it's worth downloading the trial version of Cp7, upgrading with the Cp 7.0.1 patch and giving it a go to see if that fixes your issue.
    Alternatively, if you haven't got lots of time-consuming Advanced Actions to recreate, just paste all slides into a new shell project and recreate them.  It's probably not going to take that long if it's only one project file.

  • Text Entry Box--Advanced Actions--Conditional Statement--Double quotes in literal input value

    Hello forums,
    I'm new to the forums (and Captivate in general), but I'm having a real problem carrying out a tutorial design and I think you may be my only hope.  Let me explain what I want to do and the difficulty that I'm having:
    I'm an instruction librarian at a university, and I'm designing an interactive tutorial for English 100 students to complete in order to become familiar with how to search the library catalog.  What I've done is taken a screenshot of the catalog search page, made it the background of a slide in Captivate (vers. 6), and placed a text entry box over the search bar in the screenshot.  The idea is for the students to conduct a simulated search by choosing one of three suggested search string formulations, and depending on the search string they enter, the tutorial will jump to a slide featuring a screenshot of what the actual search results would look like.  The idea is to emphasize the use of keywords over full-sentence phrases, and the use of double quotation marks to enclose multi-word search terms.
    So I've set the action for the TEB to "Execute Advanced Actions" and then created some IF/THEN statements in the "Advanced Actions" pop-up window (with action type set to 'conditional'). The script is such that if the student enters the first search option (how does sleep affect college students) in the TEB, the tutorial jumps to 1 slide, if they enter the second option (college students AND sleep), featuring a Boolean operator (AND), the tutorial jumps to a 2nd slide, and if they enter the third option ("college students" AND sleep) with the double quotes around "college students" and the Boolean operator, the tutorial should jump to a 3rd slide.  This action script works fine for the first two input options, but I can't make it work for the third search option.
    I think that it has something to do with the fact that the third input option features double quote marks, and this seems to throw off the script (I tried a quote-less input value for the third IF/THEN just to make sure that it would work jumping to the 3rd slide and it did), and I'm wondering if anyone has any suggestions as to how I can get around this issue.  Again, I need it to work so that if the student enters "college students" AND sleep, with the quote marks and the Boolean operator, the tutorial will jump to a slide showing the search results if those search terms were used in a real search of the catalog.
    I'd be extremely grateful for any help that anyone here can give me, we've been trying to make our online tutorials more engaging and interactive (and therefore more interesting), and I think this would be a great way to teach students about using quotes in their catalog searches.
    Thank you for your time and consideration.
    Andrew Wilk
    College Library
    UW-Madison

    The tutorial is for a "how to use catalog searching" instruction in an undergraduate library session.  We use boolean operators (AND, OR, NOT) to combine search terms, ex. to search for books about the sleeping habits of college students, I would enter "college students AND sleep."  Because "college students" is a multi-word phrase to describe one concept, I need to put quotation marks around the phrase to prevent the catalog from searching for the individual words separately, so the most correct search becomes ["college students" AND sleep] with quotation marks around only "college students," a user-typed "AND," and the word "sleep" (no q-marks).
    A colleague of mine worked out a pretty cool (if complicated) solution that I'll share if anyone is interested.  Since the q-marks where the problem, we've set it up so that the TEB validates the response for the search string with q-marks around "college students." If they enter it correctly, the tutorial jumps to the corresponding slide. The attempt # is set to 1, and if the user fails to enter the validated phrase (they misspell or use one of the other response options) then the TEB is set to run an Advanced Actions Script in which the other two options are scripted in IF/THEN statements that cause, when the term is entered correctly, the tutorial to jump to their corresponding slides. We've created another tab of IF/THEN statements that say that if the response is NOT equal to one of these response options, then the slide restarts (technically the slide "jumps" back to itself and starts over) and the user gets another chance to start the cycle over again.
    I know this is confusing (I had a really hard time explaining it in words), so if anyone is interested I could make a Jing video when I have some time.
    Thank you for all your suggestions

  • Ajax Script not working in IE (window.XMLHttpRequest)

    Hi,
    I have written following code in ajax.
    This is a javascript function called on onchange event of a button.
    This code works fine in firefox and chrome but does not work in IE8.0+
    the values don't get displayed.
    plz suggest me if there is any change.
    thnx in advance.
    <script type="text/javascript">
    function showUser(str) {
      if (str=="") {
        document.getElementById("userDetailsShownHere").innerHTML="";
        return;
      if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
      } else { // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) {
          document.getElementById("userDetailsShownHere").innerHTML=xmlhttp.responseText;
          document.getElementById("btn").name=str;
            showGift(str);
      xmlhttp.open("GET","getuser.php?username="+str,true);
      xmlhttp.send();
    //This code will execute on button click
    function showGift(str) {
        var life = document.getElementById("lifeLabel").value;
        var number = parseInt(life, 0);
        if(number == 55){      
            if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
          } else { // code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 && xmlhttp.status==200) {
              document.getElementById("userDetailsShownHere").innerHTML=xmlhttp.responseText;
             document.getElementById("btn").name=str;
           document.getElementById("btn").style.display="inline";
          xmlhttp.open("GET","getuser.php?username="+str,true);
          xmlhttp.send();
        else if(number > 0){
          document.getElementById("noLife").style.display="none";
            number = number - 1;
          if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
          } else { // code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
           xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 && xmlhttp.status==200) {
              document.getElementById("userDetailsShownHere").innerHTML=xmlhttp.responseText;
              document.getElementById("btn").name=str;
            document.getElementById("btn").style.display="none";
             if(document.getElementById("cometomorrow") || document.getElementById("win")){
                document.getElementById("btn").style.display="none";
                console.log("hide");
              }else{
                setTimeout("showButton()", 1000);
          xmlhttp.open("GET","getgift.php?username="+str+"&loop="+number,true);
          xmlhttp.send();
        else {
        document.getElementById("userDetailsShownHere").innerHTML="";
            document.getElementById("noLife").style.display="inline";
        document.getElementById("btn").style.display="none";
    </script>

    Hi Vishalika,
    Please post questions about html, css and scripting for website development to
    MSDN
    IE Web Development forum is moving to stack-overflow
    xmlhttpRequests is not available to webpages using the file: protocol in MSIE browsers.
    If possible include with your questions a link to your website or a mashup that shows the issue.
    If you are running the webpage from your file system (file: protocol), please advise as such.
    f12>Debug tab to debug your webpage scripts and include any error messages from the console with your scripts... (however xmlhttprequests to local resources do not cause errors in the Developer tool console).... you should always test your web applications
    from an actual web server first (localhost).
    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to
    raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Rob^_^

  • Script to duplicate Basic Paragraph style, then change character point size

    I'm looking to create a script that will create a cascade of paragraph styles based on the [Basic Paragraph] style settings. My goal is for each new paragraph style's character point size to be a percentage of the original [Basic Paragraph]'s. So if [Basic Paragraph] is 100% (character point size 10pt), the script would create a paragraph style named '120%' that has a character point size of 12pt. Then 133%, 140%, so on and on. I modified a script found on this forum to generate those new styles, but I don't know how to create them to be basedOn the [Basic Paragraph]. Any help would be very much appreciated, thanks in advance.
    current script:
    var doc = app.activeDocument,  
        pstyle = ["100%", "120%", "133%" ];  
    for(var i =0;i<pstyle.length;i++)  
            if(pstyle[i] == "100%") 
                doc.paragraphStyles.add({name:pstyle[i], appliedFont:"Stag", pointSize:10});              
            else if(pstyle[i] == "120%") 
                doc.paragraphStyles.add({name:pstyle[i], appliedFont:"Stag", pointSize:10*1.2})              
            else if(pstyle[i] == "133%") 
                doc.paragraphStyles.add({name:pstyle[i], appliedFont:"Stag", pointSize:10*1.33333})              

    Try this,
    var doc = app.activeDocument, 
        pstyle = ["100%", "120%", "133%" ]; 
    for(var i =0;i<pstyle.length;i++) 
            if(pstyle[i] == "100%")
                doc.paragraphStyles.add({name:pstyle[i], basedOn: doc.paragraphStyles[1], appliedFont:"Minion Pro", pointSize:10});             
            else if(pstyle[i] == "120%")
                doc.paragraphStyles.add({name:pstyle[i], basedOn: doc.paragraphStyles[1], appliedFont:"Minion Pro", pointSize:10*12})             
            else if(pstyle[i] == "133%")
                doc.paragraphStyles.add({name:pstyle[i], basedOn: doc.paragraphStyles[1], appliedFont:"Minion Pro", pointSize:10*1.33333})             
    Vandy

  • How to shell script for noob? or Cryptography for someone who doesn't need.

    Hi, I've seen the need of automating some tasks in the Terminal and I believe using shell scripts is my solution, although I don't really even understand how they work.
    Instead of posting a full how-to here, I'd like to ask if anyone knows about good comprehensive guide for someone who never used any programming language, yet knows how to work a bit with the Terminal?
    I will figure out the command I will need to input in the Terminal myself, by testing. Once it's figured all I need is to make a shell script out of it, and perhaps make an application out of it. (Automator? ... or more Script Editor? Or?)
    Thanks
    After seing this page...
    http://www.askdavetaylor.com/howcan_i_secure_encrypt_folders_on_my_macs_usb_flashdrive.html
    ... I believed to have found a great solution for some heavy cryptography, to protect some folder and for learning pleasure. What I wanted to do is to automate the openssl task mostly like this:
    Open my flash drive (or a certain folder) containting a disk image (uncompressed, or compressed if necessary, doesn't matter) but uncrypted. Clicking on something I will name 'Lock' for the moment will run the shell script, encrypting the said image with pre-set parameters and a password I will input when prompted by the app.
    Re-running the app will prompt me a password and simply un-encrypt the image, making it useable for me.
    That's all. Perhaps if I can do it, I'll make it prompt me what cipher and all other parameter to use, but I don't understand openssl very well yet. *I just read and understood more or less informations on that page.*
    Who knows, I'll end up with a sweet GUI for encrypting files usable by the common mortals.

    The Advanced Bash Scripting Guide is a great resource for beginners thru advanced users- http://tldp.org/LDP/abs/html/index.html

  • Script to auto start and stop an application

    Ok, I'm looking for an easy solution, maybe someone can point me in the right direction:
    I have a security camera program that runs on a Mac Mini that I would like to start and stop at a specific time of day. Is there an easy way to create an Applescript to do that?
    Thanks much in advance.

    Two scripts and iCal can do this for you. However, it assumes that your workstation is always logged into the Finder and that your app can be scripted beyond start and stop.
    --Script 1, launch application
    tell application "name of security app"
    activate
    -- do more stuff here like start capture
    end tell
    --Script 2, quit the application
    tell application "name of security app"
    quit
    end tell
    Save them both as scripts and then use iCal to make two repeating events. One to start the app and the other to stop it. Attach your scripts as event actions. Then sit back and let the iCal schedular the rest.

  • Newb bash script

    Well I've had linux for about a year or so now....Well I suppose longer than that but I didn't use it for a while but here I am full time user of Linux for about a year now, wahoo!
    Anyways, I suppose its time to dabble into some coding so I can understand those pesky pkgbuilds when I wanna change them...
    Basically right now I have the linux client Team Fortress 2 dedicated server installed and it has a command to run which starts the script.  I made a script in /usr/bin that I can call on quickly with just 'tf2server' to fire up the server when I want.  It already has the options in that script such as the players and which map to load.
    ./srcds_run -game tf +maxplayers 5 +map
    is basically the line that it calls. What I want to do though is instead of having to go to the folder where it is and running that command with different options when I want to each time I'd like to be able to just do something like...
    tf2server cp_well
    for example, and then it would use well for the map.  I know that in terminal you can type --help on most commands and it will show you usage, so basically my question is....Is there a guide, or someone willing to give an example on how I can accomplish this? I'm assuming it will only take bash and some wildcards of some kind to do.
    Help is appreciated

    SiegeMachine wrote:./srcds_run -game tf +maxplayers 5 +map
    Unless your script is explicitly cd'ing into the directory for 'srcds_run', then attempting to invoke the command found in the current directory is probably not what you want.  If this is the case, I'd either have the script change to the correct directory itself, or ensure the path to srcds_run is in your $PATH and remove the leading "./".  When running a script, the current directory is that which the script was invoked from and not that which the script is located.
    To accept options as in your example is quite simple:
    ./srcds_run -game tf +maxplayers 5 +map $@
    $@ evaluates to the argument(s) specified.  So, assuming the '+map' option takes the name of a map as an argument:
    tf2server cp_well
    Should work fine.  With this you can also specify any additional settings for the server.  E.g.,:
    tf2server cp_well +timelimit 30
    (Note: I know nothing about Team Fortress. '+timelimit' probably doesn't exist; I'm just making things up )
    If you're interested in learning shell scripting, Advanced Bash Scripting (PDF) is an excellent resource.
    Hope this helps.
    Last edited by chpln (2009-12-17 09:54:15)

  • Looking for a utility/script to send app window to/from different displays

    Hi,
    Is there any utility to send an app window from/to a specific display?
    i.e. I have four displays Dell3007WFPHC (Center 2560x1600);
    Dell2001FP( 1200x1600right) ;
    Dell2001FP(1200x1600 left);
    and a Cintiq 12WX (bottom center1280x800)
    I want to move and fit photoshop app window from Dell3007WFPHC (Center) to cintiq by pressing one key. Does such a utility or script already exist?
    Thanks in advance, Behrooz

    For scripting stuff see the AppleScript and Unix forums under OS X Technologies.

  • Data Guard monitoring Scripts.

    I am looking for scripts to monitor Data Guard?
    Can someone help me with this please?
    Thanks in advance.

    These scripts are Unix specific:
    ## THIS ONE IS CALLED BY THE NEXT
    #!/bin/ksh
    # last_log_applied.ksh <oracle_sid> [connect string]
    if [ $# -lt 1 ]
    then
         echo "$0: <oracle_sid> [connect string]"
         exit -1
    fi
    oracle_sid=$1
    connect_string=$2
    ORACLE_HOME=`grep $oracle_sid /var/opt/oracle/oratab | awk -F":" {'print $2'}`
    export ORACLE_HOME
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    PATH=$PATH:$ORACLE_HOME/bin
    export PATH
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    export ORA_NLS33
    ORACLE_SID=$oracle_sid
    export ORACLE_SID
    ofile="/tmp/${oracle_sid}_last_log_seq.log"
    #### STANDBY SERVER NEEDS TO CONNECT VIA SYSDBA
    if [ ${connect_string:="NULL"} = "NULL" ]
    then
         $ORACLE_HOME/bin/sqlplus -s /nolog << EOF >tmpfile 2>&1
         set pagesize 0;
         set echo off;
         set feedback off;
         set head off;
         spool $ofile;
         connect / as sysdba;
         select max(sequence#) from v\$log_history;
    EOF
    #### PASS CONNECT STRING IN FOR PRIMARY SERVER
    else
         $ORACLE_HOME/bin/sqlplus -s $connect_string << EOF >tmpfile 2>&1
         set pagesize 0;
         set echo off;
         set feedback off;
         set head off;
         spool $ofile;
    select max(sequence#) from v\$log_history;
    EOF
    fi
    tmp=`grep -v [^0-9,' '] $ofile | tr -d ' '`
    rm $ofile tmpfile
    echo "$tmp"
    # standby_check.ksh
    #!/bin/ksh
    export STANDBY_DIR="/opt/oracle/admin/standby"
    if [ $# -ne 1 ]
    then
         echo "Usage: $0: <ORACLE_SID>"
         exit -1
    fi
    oracle_sid=$1
    # Max allowable logs to be out of sync on standby
    machine_name=`uname -a | awk {'print $2'}`
    . $STANDBY_DIR/CONFIG/params.$oracle_sid.$machine_name
    user_pass=`cat /opt/oracle/admin/.opass`
    echo "Running standby check on $oracle_sid..."
    standby_log_num=`$STANDBY_DIR/last_log_applied.ksh $oracle_sid`
    primary_log_num=`$STANDBY_DIR/last_log_applied.ksh $oracle_sid ${user_pass}@${oracle_sid}`
    echo "standby_log_num = $standby_log_num"
    echo "primary_log_num = $primary_log_num"
    log_difference=`expr $primary_log_num - $standby_log_num`
    if [ $log_difference -ge $ALARM_DIFF ]
    then
         /bin/mailx -s "$oracle_sid: Standby is $log_difference behind primary." -r $FROM_EMAIL $EMAIL_LIST < $STANDBY_DIR/standby_warning_mail
         # Page the DBA's if we're falling way behind
         if [ $log_difference -ge $PAGE_DIFF ]
         then
              /bin/mailx -s "$oracle_sid: Standby is $log_difference behind primary." -r $FROM_EMAIL $PAGE_LIST < $STANDBY_DIR/standby_warning_mail
         fi
    else
         echo "Standby is keeping up ok ($log_difference logs behind)"
    fi

  • How can I find the Scripts directory from a script?

    Hello all! After playing with Photoshop scripting, I'm now playing with AE too, and in my first try I've stuck in finding the scripts path from the script itself.
    In Photoshop, there was this piece of code that somebody in the Photoshop Scripting forum kindly shared:
    var scriptsPath = new Folder (app.path + "/" + localize ("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));
    But this line doesn't work in After Effects because app.path variable doesn't exist (very funny, I thought Photoshop and After Effects shared the same basic app variables) and the path given to the "localize" function is wrong in AE (I think "$$$" means nothing to it).
    Can somebody give me a clue about how to solve this? Thanks a lot in advance :-)

    This script shows a couple of examples you can try. The first part shows a way to get the folder the running script is in. The second gets the main AE app folder although I don't know if appFolder works on Windows (you'd still need to add /Scripts on Mac or /SupportFiles/Scripts on Win).
    var thisScript = new File($.fileName);
    var containingFolder = new Folder(thisScript.parent.absoluteURI);
    alert("This script is in " + containingFolder.absoluteURI);
    var appFolder = new Folder(Folder.appPackage.parent.absoluteURI);
    alert("The app folder is at " + Folder.decode(appFolder.absoluteURI));

  • Validation script

    Hello and thanks for viewing.
    I have the following script that needs some massaging. The goal is to allow only numeric entries with NO spaces and both a min and max of 10 characters. In other words a ten digit phone number only. I have the max but I don't know the rest. Can someone advise please and thanks in advance.
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    <form action="http://www.realtyalerts.ca/MyAlerts/Home/Index" method="post">
    <span id="sprytextfield1">
    <input name='id_number' type='text' id='id_number' maxlength="10" />
    <span class="textfieldRequiredMsg">A 10 digit phone number is required.</span></span>
    <input value='Go' type='submit' />
    </form>
    <script type="text/javascript">
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    //-->
    </script>

    Then, you can do it with behaviors in DW. With your 'input' for number field selected either in code or design view, go to 'Behaviors' panel (if it is now shown already, click Window > Behaviors to show it).
    Click the 'Plus' callout button > Validate Form.
    Choose the field that you're validating (in your case, id_number). Accept 'Number from' 10 to 10 (min and max 10). Hit OK.
    -ST

  • Prevent On Success Hide from advancing slide

    I click box that will hide a text caption.  When I use "On Success" > "Hide" to hide the text caption and click box group, it advances my slide, ignoring the NEXT button's pause attribute.
    It does NOT advance if I use the following setting:   "On Success"  > "Advanced action" > "...mycustom script that only hides the click box and text caption group..."
    Why does the built-in HIDE function differently than HIDE in the Advanced Action script?  Shouldn't they both function the same, and NOT advance the slide?
    Micky

    Micky, Captivate has been designed that way, since several versions. Did you see this video:
    http://www.youtube.com/watch?v=M3nKi-DB6Fw
    If you want this to change, do not complain here, but enter a feature request. I'm happy with the situation because both are possible, sometimes one want the playhead to continue...
    Lilybiri

Maybe you are looking for

  • Calling web service from oracle forms 10g

    Problem Description: I'm following the steps as per the doc: http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html to create a java stub to call external web service and then use java importe

  • How can I connect my ipod to a new computer without deleting all my music

    I just got a brand new laptop and when I connected my ipod and iphone 4 it prompts to syns a delete everything.  How can I avoid that.  I tried using the manual setting, but once I press apply it asks again to sync and delete all my music. Is there a

  • Please help me to get a clue from this program

    I'm sorry to bother you with such stupid questions. I have to admit I'm just making my first steps in programming. So I have a program like this and don't understand how it works: // Masking sign extension. class HexByte { static public void main(Str

  • Adobe Photoshop CC 2014 is marked as "trial" (in the CC manager)

    - and asks me on every start wether I want to continue with my trial - even though my subscription is valid and regular Photshop CC works like a charm. Whats up with that?

  • Unsure of proper configuration for SF300-24 & router

    Hello, Our company lost a switch and replaced it with a SF300-24.  The other components are a Westell modem and an Amped Wireless R10000G router. The current configuration has the Westell DLS modem going into the R10000G router, the router is the DHC