Performance script?

Hi,
i want some performance script about database ?
which script or how can performance check the database ?
i have use v$dba_data_files,v$dba_free_space ,v$session_wait ,v$session_event
but i m confuse how can performance database ..........?

i want some performance script about database ? This is very vague. What do you really want to see?
You can use statspack for Oracle 9i and AWR for Oracle 10g Databases.
If you can go here for database scripts,
https://metalink.oracle.com/metalink/plsql/f?p=130:14:4609856481415275689::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,131704.1,1,0,0,helvetica
Adith

Similar Messages

  • Performance script (dangerous)

    I have posted another topic about a quiet harddisk and better performance.
    These settings are part of a script I am using at boot and shutdown.
    The script is copying my home directory to a ramdisk, the same is done with /tmp.
    This is ofcourse only possible when you have a separate /data directory, and not only a $USER where all your stuff is stored.
    The result;
    - almost no harddisk writes when browsing, reading mail, editing etc...
    - almost quiet system
    - better performance because most things are done from ram
    Disadvantages:
    - when your system is crashing, your changes are lost
    - you do need more ram (advice 1G or more)
    - your system is not standard anymore.
    Before using the script, please try to understand what I am doing!
    BTW; it is necessarry that the users are added to the group audio in /etc/group, because I am using that group to find out which users are available.
    Here is the script (changes mentioned some posts below are added):
    #!/bin/sh
    # Performance script
    # Maintainer: Lontronics, [email protected]
    # Last modified: april 16th, 2007
    action_start() {
    # Change interval to 10 minutes for pdflush:
    echo 60000 > /proc/sys/vm/dirty_expire_centisecs
    # Let the harddisk spin down when not used for X * 5 seconds
    # For example 12 will give a standby time of 24*5=120 seconds
    # Also set read ahead to on
    if [ -x /sbin/hdparm ]; then
    /sbin/hdparm -S 24 -A 1 /dev/sda
    fi
    # Clean ramdisk directory and mount ramdisk for writing temporary information
    if [ -d /mnt/ramdisk0 ]; then
    rm -rf /mnt/ramdisk0/* > /dev/null
    else
    mkdir /mnt/ramdisk0
    fi
    mount -t tmpfs tmpfs /mnt/ramdisk0
    # Check tmp directory...
    if [ ! -d /tmp ]; then
    rm -rf /tmp
    mkdir /tmp
    chmod 777 /tmp
    fi
    # Find available users and take action...
    # We take the audio group in /etc/group, but you can take every group which is containing all normal users
    NAME=($(grep ^audio /etc/group | cut -d: -f4 | tr "," " "))
    count=0
    while [ "x${NAME[count]}" != "x" ]
    do
    # If no user directory then extract the backup when available.
    if [ ! -d /home/${NAME[$count]} ]; then
    rm -rf /home/${NAME[$count]}
    mkdir /home/${NAME[$count]}
    chown -R ${NAME[$count]} /home/${NAME[$count]}
    if [ -f /home/${NAME[$count]}.tar.gz ]; then
    tar zPxvf /home/${NAME[$count]}.tar.gz --directory=/ > /dev/null
    if [ -d /home/${NAME[$count]} ]; then
    echo ""
    echo "WARNING:"
    echo "Extracted backup to /home/${NAME[$count]}"
    echo "It is possible some data is lost..."
    rm -rf /home/${NAME[$count]}.tar.gz
    else
    echo ""
    echo "ERROR:"
    echo "Error occured when extracting files from backup."
    echo "Check backup with name /home/${NAME[$count]}.tar.gz and try to extract it yourself"
    echo "with the command tar zxvf /home/${NAME[$count]}.tar.gz --directory=/"
    echo "New but empty user directory for user ${NAME[$count]} made"
    fi
    else
    echo ""
    echo "ERROR:"
    echo "Unfortunately there seems no backup available."
    echo "New but empty user directory for user ${NAME[$count]} made"
    fi
    fi
    # Make backup of user directory for when things are going wrong
    tar -cPpz --file=/home/${NAME[$count]}.tar.gz /home/${NAME[$count]} > /dev/null
    # Copy home directory information to the ramdisk for usage
    mv /home/${NAME[$count]} /mnt/ramdisk0
    ln -s /mnt/ramdisk0/${NAME[$count]} /home/${NAME[$count]}
    echo "${NAME[$count]}"
    count=$(( $count + 1 ))
    done
    # Copy tmp directory information to the ramdisk for usage
    mv /tmp /mnt/ramdisk0/tmp
    ln -s /mnt/ramdisk0/tmp /tmp
    # Output
    echo "Performance script started"
    echo "Do not forget to run performance stop before shutdown,"
    echo "otherwise it is possible you will loose your data!"
    action_stop() {
    ERROR=0
    # Change interval for pdflush to normal:
    echo 500 > /proc/sys/vm/dirty_expire_centisecs
    # Disable standby (spindown)
    if [ -x /sbin/hdparm ]; then
    /sbin/hdparm -S 0 /dev/sda
    fi
    # Find available users and take action...
    # We take the audio group in /etc/group, but you can take every group which is containing all normal users
    NAME=($(grep ^audio /etc/group | cut -d: -f4 | tr "," " "))
    count=0
    while [ "x${NAME[count]}" != "x" ]
    do
    # If temporary user directory available then...
    if [ -d /mnt/ramdisk0/${NAME[count]} ]; then
    # Copy ramdisk information to real directory
    rm -rf /home/${NAME[count]}
    mv /mnt/ramdisk0/${NAME[count]} /home/${NAME[count]}
    rm -rf /home/${NAME[count]}.tar.gz
    else
    ERROR=1
    echo ""
    echo "ERROR:"
    echo "The temporary user directory seems not to be available on the ramdisk, probably the performance script was not running"
    echo "Therefor the following actions are not performed:"
    echo "- /home/${NAME[count]} is not replaced"
    echo "- /mnt/ramdisk0 is not unmounted"
    echo "Please check if everything is okay"
    fi
    count=$(( $count + 1 ))
    done
    # If tmp directory on ramdisk is available then...
    if [ -d /mnt/ramdisk0/tmp ]; then
    rm -rf /tmp
    rm -rf /mnt/ramdisk0/tmp/*
    mv /mnt/ramdisk0/tmp /tmp
    else
    ERROR=1
    echo ""
    echo "ERROR:"
    echo "The tmp directory seems not to be available on the ramdisk, probably the performance script was not running"
    echo "Therefor the following actions are not performed:"
    echo "- /tmp is not replaced"
    echo "- /mnt/ramdisk0 is not unmounted"
    echo "Please check if everything is okay"
    fi
    # If no errors occured unmount the ramdisk to free memory
    if [ $ERROR = 0 ]; then
    umount -f /mnt/ramdisk0 2> /dev/null
    rm -rf /mnt/ramdisk0 2> /dev/null
    fi
    # Output
    echo "Performance script stopped"
    case "$1" in
    'start')
    action_start
    'stop')
    action_stop
    echo "usage $0 start|stop"
    esac
    To use the script:
    in /etc/rc.sysinit find:
    stat_busy "Removing Leftover Files"
    /bin/rm -f /etc/nologin &>/dev/null
    /bin/rm -f /etc/shutdownpid &>/dev/null
    just above add:
    # Activate the performance script
    if [ -x /data/scripts/performance ]; then
    /data/scripts/performance start
    fi
    Where ofcourse /data/scripts/performance is my path of the performance script, but you have to change this to where you have saved the script
    in /etc/rc.shutdown find:
    # avoid NIS hanging syslog-ng on shutdown by unsetting the domainname
    if [ -x /bin/domainname ]; then
    /bin/domainname ""
    just above add:
    # Stop the performance script
    if [ -x /data/scripts/performance ]; then
    /data/scripts/performance stop
    fi
    Where ofcourse /data/scripts/performance is my path of the performance script, but you have to change this to where you have saved the script
    Have fun!
    Jan
    Last edited by Lontronics (2007-04-17 20:30:57)

    @drakosha;
    Yes I did, but not for getting better performance. The noticable difference is less writing to the disk, especially with the other settings used in the script. But why not trying yourself with a /tmp ramdrive ?
    @klixon;
    Thanks for the compliment.
    And about your line of script; thanks too, although you were forgotten one thing to make an array from it.
    Will use cut though, simple indeed
    Line is now:
    NAME=($(grep ^audio /etc/group | cut -d: -f4 | tr "," " "))
    I think it is not wise to run it from rc.conf because I make a new /<ramdrive>/tmp before something is done with it.
    But I will see if it is possible; indeed neater.
    Jan
    Last edited by Lontronics (2007-04-16 19:58:01)

  • Cannot perform scripting operations on lists

    Hi,
    I'm having trouble performing scripting operations on lists, the only variables I can retrieve from lists are the values @HasLeadSelection, @LeadSelectedIndex and @RowCount. I cannot perform any methods on lists, I have gone through the Complete Help document and have also tried to use Resolve to attempt to access list rows but that doesn't seem to working either. Any help would be greatly appreciated!
    Thanks
    Alexander Ludwig

    Hi Alessandro & Alexander,
    I just tried it and yes we can change the colour trough scripting as well.
    Something like below in the Calculation Rule of the property Background Colour would do the job.
    result = 'STANDARD'  // This is a fallback value in case the if condition below is not satisfied.
    if( $currentrow.xxx == 'xx' )  // Here xxx should be the element within the table
    result = 'BADVALUE_DARK'   // This is one of the value from above screenshot.
    end
    Check this other thread for more details:http://scn.sap.com/thread/3528872
    And yeah the code completion is having serious issues. It shows the attributes which do not belong under is sometimes.
    Binding to another attribute and setting it trough ABSL might decrease the performance as there would be a roundtrip required in this case to change the value if this field is not shown on UI and is only used to decide the colour.
    Regards
    Vinod

  • Interpret results of performance reports

    Are there any white papers to interpret the results of
    the performance reports. The docs included with the performance scripts are not detailed. Any help is appreciated.
    Harish

    there is a discussion of the output at
    http://www.oracle.com/technology/products/ias/portal/html/admin_perf_10g_sizing_faq.htm

  • Performance Documents

    Hi,
    I would require some performance scripts for index rebuild, reduce table defragementation and some performance related scripats and also some techincal Documents for Oracle 8i
    Rgds..

    1. For Table Fragmentation
    http://www.orafaq.com/node/1936
    2.Index Fragmentation
    http://www.dbspecialists.com/scripts.html
    http://oracleact.com/papers/index_leaf_block_frag.html
    http://www.cryer.co.uk/brian/oracle/tuning_iif.htm
    From:http://searchoracle.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid41_gci1255576_mem1,00.html
    Even with LMT, indexes can sometimes become fragmented over time due to inserts and deletes of rows in the index leaf pages. I have found the following useful to identify fragmented indexes.
    (A) Run an analyze index validate structure on your indexes.
    (B) Query the index_stats table. If the percentage of deleted leaf rows to total leaf rows (DEL_LF_ROWS/LF_ROWS) is greater than 20%; then, the index probably should be rebuilt.
    Hth
    Girish Sharma

  • Regading Scripts

    Hi all,
    I have a requirement that i have to get the data from a Dialog Programming screen (user entries in fields) into a Script. Means I have to Print the contents of the screen. So how can i do this. Please help me out in solving the problem.
    Thanks in Advance.
    Murthy

    hi ramana,
    i had done a similar thing...
    module user_command_0100 input.
    v_ucomm = sy-ucomm.
      case v_ucomm.
        when 'BACK' or 'CANCEL'.
          leave to list-processing and return to screen 0.
    when 'PRNT'.
          perform scripts.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    form scripts .
      select marc~matnr
             marc~werks
             t001w~name1
             marc~pstat
             marc~prctr
             marc~minls
             marc~maxls
             into corresponding fields of table it_final
             from marc inner join t001w
             on marcwerks = t001wwerks
             where marc~matnr = itab1-matnr.
      perform call_script.
    endform.                    " SCRIPTS
    form call_script .
      call function 'OPEN_FORM'
       exporting
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
          form                              = 'ZPTEST'
          language                          = sy-langu
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
       exceptions
         canceled                          = 1
         device                            = 2
         form                              = 3
         options                           = 4
         unclosed                          = 5
         mail_options                      = 6
         archive_error                     = 7
         invalid_fax_number                = 8
         more_params_needed_in_batch       = 9
         spool_error                       = 10
         codepage                          = 11
         others                            = 12.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      call function 'WRITE_FORM'
       exporting
          element                        = 'HEADING'
      FUNCTION                       = 'SET'
         type                           = 'BODY'
         window                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
       exceptions
         element                        = 1
         function                       = 2
         type                           = 3
         unopened                       = 4
         unstarted                      = 5
         window                         = 6
         bad_pageformat_for_print       = 7
         spool_error                    = 8
         codepage                       = 9
         others                         = 10.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      loop at it_final.
        call function 'WRITE_FORM'
         exporting
            element                        = 'DETAILS'
      FUNCTION                       = 'SET'
           type                           = 'BODY'
           window                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
         exceptions
           element                        = 1
           function                       = 2
           type                           = 3
           unopened                       = 4
           unstarted                      = 5
           window                         = 6
           bad_pageformat_for_print       = 7
           spool_error                    = 8
           codepage                       = 9
           others                         = 10.
        if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
      endloop.
      call function 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
       exceptions
         unopened                       = 1
         bad_pageformat_for_print       = 2
         send_error                     = 3
         spool_error                    = 4
         codepage                       = 5
         others                         = 6.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " CALL_SCRIPT
    hope this helps,
    do reward if it helps,
    priya.

  • WLS 5.1 and TX support

              The Weblogic 5.10 documentation states:
              "WebLogic Server Version 5.1 is compliant with the JavaSoft EJB 1.1 specification."
              Yet elsewhere in the documentation it states:
              "The following sections describe EJBs in several transaction scenarios. Note that in all cases EJB transactions should be restricted to a single persistent store, because WebLogic Server does not provide a two-phase commit protocol. EJBs that engage in distributed transactions (transactions that make updates in multiple datastores) cannot guarantee that all branches of the transaction commit or roll back as a logical unit."
              Wait a minute. I thought EJB 1.1 specified that an EJB container must provide a transaction coordinator to support distributed two-phase commit across multiple EJB servers.
              From the spec:
              "Regardless whether an enterprise bean uses bean-managed or container-managed transaction demarcation,
              the burden of implementing transaction management is on the EJB Container and Server Provider.
              The EJB Container and Server implement the necessary low-level transaction protocols, such as the
              two-phase commit protocol between a transaction manager and a database system, transaction context
              propagation, and distributed two-phase commit."
              The spec goes on to show several distributed transaction use cases that must be supported by the EJB container.
              This "single repository" limitation of Weblogic severely limits my options.
              What am I missing?
              Greg
              

    I used Loadrunner's WLS monitor while running some performance scripts on our application. I ended up relying on the WLS Console and some SNMP traps (using HP Openview to review data) in order to acurately guauge utilization of system resources...Regards,Steve

  • Flash compatibility

    Hi,
    Also having problem with Flash since installing OSX Lion. I know Apple don't like Flash, but whether I'm in Firefox or Safari, it just brings up the Accept or Deny box for viewing videos and it won't let me select either of them. Anyone else having problems or is it a setting issue I need to change?
    OMB

    You would think, though, that a QuickTime flash track could be made to be reasonably safe by limiting the scope of the player. We lost some JavaScript capability and some HREF track capability because QuickTime was capable of performing script actions *outside of QuickTime*. While I fail to see why QuickTime launching a web browser and passing a URL is any different than any other application launching a browser and passing a URL...and I fail to see why a MySpace scripting vulnerability would be Apple's problem...the security risks of such a configuration are pretty obvious.
    But with Flash, we're talking about giving an interactive track within the movie the ability to accept user input and exercise control over QuickTime Player and the other tracks within the movie. Perhaps it was possible for Flash to do other things within a QuickTime movie, but for the purposes of movie interactivity, and probably just about every application in which QuickTime has been called on to play back Flash, the scope of Flash scriptability can be limited to the QuickTime player, possibly even to the movie in which the track is actually playing. I would think that limiting the scope of the Flash media handler would solve virtually all of the security problems with Flash within QuickTime without actually disabling the media handler.
    I think what bothers me the most about this is that Apple makes a big deal about the fact that movies created with the very first version of QuickTime will still play in QT 7.4, but they conveniently overlook the fact that many movies created in QuickTime 6 have been rendered unplayable by a "security" update.
    --Dave Althoff, Jr.

  • Internal Disk to Disk Data Transfer Speed Very Slow

    I have a G5 Xserve running Tiger with all updates applied that has recently started experiencing very slow Drive to Drive Data transfer speeds.
    When transferring data from one drive to another ( Internal to Internal, Internal to USB, Internal, Internal to FW, USB to USB or any other combination of the three ) we only are getting about 2GB / hr transfer speeds.
    I initially thought the internal drive was going bad. I tested the drive and found some minor header issues etc... that were able to be repaired so I replace the internal boot drive
    I tested and immediately got the same issue.
    I also tried booting from a FW drive and I got the same issue.
    If I connect to the server over the ethernet network, I get what I would expect to be typical data transfer rates of about 20GB+ / hr. Much higher than the internal rates and I am copying data from the same internal drives so I really don't think the drive is the issue.
    I called AppleCare and discussed the issue with them. They said it sounded like a controller issue so I purchased a replacement MLB from them. After replacing the drive data transfer speeds jumped back to normal for about a day maybe two.
    Now we are back to experiencing slow data transfer speeds internally ( 2GB / hr ) and normal transfer speeds ( 20GB+ / hr ) over the network.
    Any ideas on what might be causing the problem would be appreciated

    As suggested, do check for other I/O load on the spindles. And check for general system load.
    I don't know of a good GUI in-built I/O monitor here (and particularly for Tiger Server), though there is iopending and DTrace and Apple-provided [performance scripts|http://support.apple.com/kb/HT1992] with Leopard and Leopard Server. top would show you busy processes.
    Also look for memory errors and memory constraints and check for anything interesting in the contents of the system logs.
    The next spot after the controllers (and it's usually my first "hardware" stop for these sorts of cases, and usually before swapping the motherboard) are the disks that are involved, and whatever widgets are in the PCI slots. Loose cables, bad cables, and spindle-swaps. Yes, disks can sometimes slow down like this, and that's not usually a Good Thing. I know you think this isn't the disks, but that's one of the remaining common hardware factors. And don't presume any SMART disk monitoring has predictive value; SMART can miss a number of these cases.
    (Sometimes you have to use the classic "field service" technique of swapping parts and of shutting down software pieces until the problem goes away. Then work from there.)
    And the other question is around how much time and effort should be spent on this Xserve G5 box; whether you're now in the market for a replacement G5 box or a newer Intel Xserve box as a more cost-effective solution.
    (How current and how reliable is your disk archive?)

  • Rounding a percent to a whole number

    Hello,
    I'm still fairly new to performing script calculations and with this particular one seems a bit more complex for me.
    I'm trying to determine the percent difference between 2 numbers and display the percentage as a whole number. Logically my calculation looks like
    (numericField1 - numericField2 / numericField1 * 100)
    (ex. 1000 - 850 / 1000 * 100 = 15%)  
    I need assitance with my calculation and especially rounding the % to a whole number. I would not like any answers displayed like 22.66666%
    The code below is somethig I tried
    event.value = roundNumber( ( this.getField(numericField1).value - this.getField(numericField2t).value  )  / this.getField(numericField1).value , 2 ) + '%';
    function roundNumber(num, dec) {
            var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
            return result;
    Any advice would be great!

    Actually Adobe makes this really simple for you.  If you use a numeric field to display the result, the display pattern for the field will control how the number is shown.  You can set a percentage pattern:"num{zzzz9.99%}" to control how many digits will be displayed, and how many digits will be significant past the decimal point.  If there are more digits, Adobe will automatically round the number.  In the attached example I used the pattern
    "num{zzzz9%}" to ensure that only a whole number will be displayed.  Adobe will use normal rounding rules: 0-4 rounds down, 5-9 rounds up.
    Additionally, the percentage pattern will automatically multiply the field value by 100, so you don't need to do that in your script.
    For the example attached, I added your calculation as FormCalc script to the Calculate event of the result field.  The script is now simply:
    (NumericField1 - NumericField2) / NumericField1
    Adobe takes care of the rest.

  • Use of Advanced Page Properties

    Hi,
    I like to know what is the use of the Advanced Page Properties(Right click a Page> Select properties>Click on Advanced).
    There are 5 items there:
    1) A2 Playback
    2) No Merge
    3) Send to Extension Server
    4) Skip in e-Tester
    5) Treat as Direct Navigation
    The last 2 items seams pretty straight forward, but I can't figure out the others. There is no documentation about it in the e-Tester Help.
    If you provide examples would be great.
    Thanks

    Hi Aether,
    Hope this is the kind of info you are looking for. I think this info is in the knowledge base. I had copied it a long time back.
    Explanation of Advanced Options
    Question
    What are the Advanced Page Properties?
    Answer
    A2 PlayBack
    Directs e-Tester to perform an A2 style navigation for this page during script playback. A2 and transforms are how e-Load executes script navigations. e-Tester records and plays back scripts by recording at the browsers object level and capturing all of the events that the user performed to navigate from one page to the next. This may include things like clicks on links, images, buttons, other form elements, etc. You can see these events or actions by looking in the Properties of the Address node for each script page. At the same time, e-Tester records a Transform (using A2 technology) to construct navigations to be used when running the script in e-Load. e-Load Thin Client cannot use object based navigations since it is not instantiating actual browsers the browser object model does not exist.
    In cases where your script does not playback in e-Tester, because the events to perform the navigation were not recorded properly, sometimes we may need to direct e-Tester to use e-Load style A2 navigations instead. We do this by setting A2 playback for the page we would like to do that on and that will force an e-Load A2 type navigation rather than using the recorded actions to navigate. It is best not to just set A2 navigations to try to resolve an e-Tester playback problem. You first need to try to understand the navigation that is being performed and determine why it was not recorded/played back properly by e-Tester. Understanding the problem is critical because their may be real problems that need to be resolved. A2 should be only used as a last resort when all other options have been exhausted.
    No Merge
    Instructs e-Tester not to merge new page content retrieved on playback with the existing recorded baseline pages in the visual script. When this is set you will see that the Visual Script will not update on playback even if there is different content retrieved (no flags or updated content will be shown in the page nodes). The example where this setting is used most is to avoid updates to the recorded items in the Parameters node as follows.
    When you record a script, e-Tester automatically captures, in the Parameters node of a page, all of the user-input form fields and data submitted from the preceding page. On playback, if that first page had additional form fields that were not there during recording, these new form fields will be merged in and added to the Parameters node of the next page.
    You can see this in the FMStocks demo. The login page has 2 fields (login and password) which will be captured in the Parameters node of page 2 of your script (if you just record a 2 page login script). If you switch to Build B of FMStocks, you will see a Customer ID field added to the login page and when you play the script back that you had originally recorded, the Customer ID field will be added to the Parameters node of page 2. If you had set "No Merge" on page 2, then this additional form field would not have been added to the page 2 Parameters node.
    There are some cases where you need to use No Merge. For example, when the form fields on a page have dynamic names which causes e-Tester to constantly keep adding Parameters every time the script plays back.
    For example lets say the Login and Password fields were called "login123" and "password123". Then you play the script back and the content of the login page is dynamically updated and the fields are now called "login456" and "password456". This would cause e-Tester to add another login and password field to the Parameters node of page 2 because it sees these as new fields (since the names are different). In this case they are actually the same fields, just with new names. Therefore you would want to set No Merge to avoid this situation so e-Tester handles it properly.
    Send to Extension Server
    Used to mark a page in your script to be sent to Extension Server when running the script in e-Load. e-Load once again uses Transforms and A2 navigations to play the script when running in Thin Client. Sometimes e-Load Thin Client will not be able to process the page to perform the navigation properly using the Transform or you may have failures during script playback in e-Load (Failed to Find/Failed to Match). When Extension Server is enabled, e-Load switches from a Thin Client to a full browser for the page that its enabled on. This allows e-Load to process that page as a full browser would. This may be required, for example, if there is some client side script that needs to be executed for the navigation to perform properly. Once again, you should not resort to Extension Server until you have understood the problem at hand. In most cases, the A2 Transforms should be able to perform the navigations in e-Load Thin Client, without the need for Extension Server. Also, enabling Extension Server is a scalability hit because a full browser must be instantiated for the page which requires much more resources than just using the Thin agent. If there are no other options, then Extension Server should be enabled.
    Treat as Direct Navigation
    Instructs e-Tester to perform a page navigation as a direct navigation to the recorded URL for that page. Once again, e-Tester normally performs script navigations by executing the recorded actions that the user performed to get from one page to the next. However, if e-Tester cannot perform the navigation in this manner because it couldnt record or playback the events proprerly, a direct navigation may need to be used instead. You would use Treat as Direction navigation if you are performing a static navigation that does not require A2. If the navigation to the next page is dynamic due to URL session variables etc. then you will need to set A2 playback instead. As in the case of using A2 playback, you should never automatically just set Treat as Direct Navigation to try to resolve an e-Tester playback problem. You first need to try to understand the navigation that is being performed and determine why it was not recorded/played back properly by e-Tester. Understanding the problem is critical because their may be real problems that need to be resolved. Treat as Direct Navigation should be only used as a last resort when all other options have been exhausted.

  • Unsecured Iframe and ability to make JS calls to Iframe

    I setup a sandboxed iframe parent/child in which I call in a remote content from an html page for sake of example we will say: http://127.0.0.1/ui.html
    This remote page includes some content from a third party website (an embedded youtube video, and some external JS includes), as well as its own content. I also have setup functions which I have exposed to the parent and can call them. (simple alerts)
    I cannot view the embedded video, or include any scripts residing outside the sandboxed url path the remote content or any content included (outside of the ui.html).
    The documentation states:
    "HTML content in remote (network) security sandboxes can only load CSS, frame, iframe, and img content from remote sandboxes (from network URLs)."
    Which is in line with the occurances.
    My question is...
    Is there any way to allow these external includes as well as maintain the ability to perform script calls from the parent to the child sandbox?

    Hey abc1174,
    Welcome to the BlackBerry® Support Community Forums.
    Currently this feature is not available for the BlackBerry Z10 smrtphone.
    Thank you.
    -HB
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Statspack Tables

    Hi All,
    How to identify whether STATSPACK is configured or not in 8x DB (thru an SQL)?
    We use the following tables for the purpose mentioned next to it in 9x.
    stats$snapshot -- Snapshot Details
    stats$sql_summary - Statistics of SQL executed during a snap
    stats$sqltext - SQL text executed
    sTAtS$SYSTEM_EVENT - System events during a snap
    STATS$FILESTATXS - I/O Stats during a snap
    But what are equivalent tables from where we can find the similar information in 8x?
    Thanks in Advance,
    Jaggyam

    You need probably to check if there's a PERFSTAT user/schema and what objects are owned by it.
    " STATSPACK differs from the existing UTLBSTAT/UTLESTAT performance scripts in the following ways:
    * They collect more data, including high resource SQL.
    * Many of the manual calculations which were required with BSTAT/ESTAT are now provided; for example. the first page contains a summary of instance performance and load.
    * Permanent tables are created. Each time a new "snapshot" of data is taken, it is added to these tables, with keys which allow comparison between snapshots.
    * A new user, PERFSTAT, is automatically created. All objects created by this package are owned by PERFSTAT. This user has limited query-only privileges.
    * Written in PL/SQL and uses SQL*Plus as the reporting tool.
    Like UTLBSTAT.SQL and UTLESTAT.SQL, STATSPACK can be found in the ORACLE_HOME/rdbms/admin/ directory on UNIX and in the ORACLE_HOME/rdbms81/admin directory on NT. "
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76992/ch12_too.htm#12109

  • Hot key

    need code for hot key or hot spot

    Hi Rahul,
    Check this program
    *& Report  ZLAXMI_TESTPAPER                                            *
    REPORT  ZLAXMI_TESTPAPER  MESSAGE-ID ZZ                     .
    *TABLES
    TABLES: MARA, T001W.
    *variable declaration.
    DATA: V_WERKS TYPE T001W-WERKS,
          V_MEINS TYPE MARA-MEINS,
          V_NTGEW TYPE MARA-NTGEW,
          V_BRGEW TYPE MARA-BRGEW,
          V_GEWEI TYPE MARA-GEWEI,
          V_VOLUM TYPE MARA-VOLUM,
          V_VOLEH TYPE MARA-VOLEH,
          V_UCOMM LIKE SY-UCOMM.
    DATA: IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE,
          V_MSG(200) TYPE C..
    *INTERNAL TABLE DECLARATION
    DATA: BEGIN OF IT_T001W OCCURS 0,
            WERKS LIKE T001W-WERKS,
            NAME1 LIKE T001W-NAME1,
            LAND1 LIKE T001W-LAND1,
          END OF IT_T001W.
    DATA: BEGIN OF IT_MARC OCCURS 0,
            MATNR LIKE MARC-MATNR,
            MAKTX LIKE MAKT-MAKTX,
          END OF IT_MARC.
    DATA: BEGIN OF IT_PLANT OCCURS 0,
            WERKS TYPE MARC-WERKS,
            PSTAT TYPE MARC-PSTAT,
            PRCTR TYPE MARC-PRCTR,
            MINLS TYPE MARC-MINLS,
            MAXLS TYPE MARC-MAXLS,
            NAME1 TYPE T001W-NAME1,
          END OF IT_PLANT.
    DATA: BEGIN OF IT_TRANS OCCURS 0,
            MATNR_001(018),
            MEINS_004(003),
            BRGEW_007(017),
            GEWEI_008(003),
            NTGEW_009(017),
            VOLUM_010(017),
            VOLEH_011(003),
          END OF IT_TRANS.
    *SELECTION SCREEN
    SELECT-OPTIONS: S_MATNR FOR IT_MARC-MATNR.
    *START OF SELECTION
    START-OF-SELECTION.
    PERFORM GET_PLANT_DETAILS USING IT_T001W.
    *AT LINE SELECTION
    AT LINE-SELECTION.
      IF SY-LSIND = '1'.
        SET PF-STATUS 'FF'.
        PERFORM GET_MAT_DETAILS USING IT_T001W-WERKS.
        PERFORM WRITE_MAT_DETAILS.
      ENDIF.
      IF SY-LSIND = '2'.
        SELECT SINGLE MATNR
                      MTART
                      MEINS
                      NTGEW
                      BRGEW
                      GEWEI
                      VOLUM
                      VOLEH
                      ERSDA FROM MARA
                      INTO CORRESPONDING FIELDS OF MARA
            WHERE MATNR = IT_MARC-MATNR.
        V_MEINS = MARA-MEINS.
        V_NTGEW = MARA-NTGEW.
        V_BRGEW = MARA-BRGEW.
        V_GEWEI = MARA-GEWEI.
        V_VOLUM = MARA-VOLUM.
        V_VOLEH = MARA-VOLEH.
        CALL SCREEN '100'.
      ENDIF.
    *end of selection
    END-OF-SELECTION.
      PERFORM PLANT_DETAILS USING IT_T001W.
    *&      Form  GET_PLANT_DETAILS
          text
         -->P_IT_T001W  text
    FORM GET_PLANT_DETAILS  USING    P_IT_T001W.
      IT_T001W = P_IT_T001W.
      SELECT WERKS
             NAME1
             LAND1
             FROM T001W
             INTO TABLE   IT_T001W.
    ENDFORM.                    " GET_PLANT_DETAILS
    *&      Form  GET_MAT_DETAILS
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MAT_DETAILS USING P_IT_T001W-WERKS. .
      IT_T001W-WERKS = P_IT_T001W-WERKS.
      SELECT MARC~MATNR
             MAKT~MAKTX
             INTO
             TABLE
             IT_MARC
             FROM
             MARC JOIN MAKT ON
             MARCMATNR = MAKTMATNR
             WHERE MARC~WERKS = IT_T001W-WERKS.
    ENDFORM.                    " GET_MAT_DETAILS
    *&      Form  WRITE_MAT_DETAILS
          text
    -->  p1        text
    <--  p2        text
    FORM WRITE_MAT_DETAILS .
      WRITE:/1(10) 'PLANT NO',
              (30) 'PLANT NAME'.
      SKIP.
      WRITE:/1(10) IT_T001W-WERKS,
              (30) IT_T001W-NAME1.
    *SKIP.
      WRITE:/1(18) 'MATERIAL NO',
              (40) 'MATERIAL DESCRIPTION'.
      SKIP.
      LOOP AT IT_MARC.
        WRITE:/1(18) IT_MARC-MATNR HOTSPOT ON,
                (40) IT_MARC-MAKTX HOTSPOT ON.
        HIDE: IT_MARC-MATNR,IT_MARC-MATNR.
      ENDLOOP.
    ENDFORM.                    " WRITE_MAT_DETAILS
    *&      Form  plant_details
          text
         -->P_IT_T001W  text
    FORM PLANT_DETAILS  USING    P_IT_T001W.
      IT_T001W = P_IT_T001W.
      WRITE:/1(10) 'PLANT NO',
               (30) 'PLANT NAME',
               (10) 'COUNTRY'.
      LOOP AT IT_T001W.
        WRITE:/1(10) IT_T001W-WERKS HOTSPOT ON,
                (30) IT_T001W-NAME1 HOTSPOT ON,
                (10) IT_T001W-LAND1 HOTSPOT ON.
        HIDE: IT_T001W-WERKS,IT_T001W-NAME1.
      ENDLOOP.
    ENDFORM.                    " plant_details
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STAT1'.
      SET TITLEBAR 'TT'.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'G1'.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'PRINT'.
          PERFORM GET_FORM_DETAILS.
          PERFORM SCRIPTS.
        WHEN 'CHANGE'.
          IF V_MEINS <> MARA-MEINS OR
              V_NTGEW <> MARA-NTGEW OR
              V_BRGEW <> MARA-BRGEW OR
              V_GEWEI <> MARA-GEWEI OR
              V_VOLUM <> MARA-VOLUM OR
              V_VOLEH <> MARA-VOLEH.
          ENDIF.
          IT_TRANS-MATNR_001 = MARA-MATNR.
          IT_TRANS-MEINS_004 = MARA-MEINS.
          IT_TRANS-BRGEW_007 = MARA-BRGEW.
          IT_TRANS-GEWEI_008 = MARA-GEWEI.
          IT_TRANS-NTGEW_009 = MARA-NTGEW.
          IT_TRANS-VOLUM_010 = MARA-VOLUM.
          IT_TRANS-VOLEH_011 = MARA-VOLEH.
          APPEND IT_TRANS.
          LOOP AT IT_TRANS.
            PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.
           PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                         'RMMG1-AENNR'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=ENTR'.
            PERFORM BDC_FIELD       USING 'RMMG1-MATNR'
                                          IT_TRANS-MATNR_001.
            PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0070'.
         PERFORM BDC_FIELD       USING 'MSICHTAUSW-KZSEL(01)'
                                  'X'.
           PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                         'MSICHTAUSW-DYTXT(01)'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=ENTR'.
       PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '4004'.
            PERFORM BDC_FIELD       USING 'MARA-MEINS'
                                          IT_TRANS-MEINS_004.
            PERFORM BDC_FIELD       USING 'MARA-BRGEW'
                                          IT_TRANS-BRGEW_007.
            PERFORM BDC_FIELD       USING 'MARA-GEWEI'
                                          IT_TRANS-GEWEI_008.
            PERFORM BDC_FIELD       USING 'MARA-NTGEW'
                                          IT_TRANS-NTGEW_009.
            PERFORM BDC_FIELD       USING 'MARA-VOLUM'
                                          IT_TRANS-VOLUM_010.
            PERFORM BDC_FIELD       USING 'MARA-VOLEH'
                                          IT_TRANS-VOLEH_011.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=BU'.
            CALL TRANSACTION 'MM02' USING IT_BDCDATA MODE 'A' UPDATE 'S'
            MESSAGES INTO IT_MESSAGES.
            LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
            LOOP AT IT_MESSAGES.
              CALL FUNCTION 'FORMAT_MESSAGE'
                EXPORTING
                  ID        = SY-MSGID
                  LANG      = 'EN'
                  NO        = SY-MSGNO
                  V1        = SY-MSGV1
                  V2        = SY-MSGV2
                  V3        = SY-MSGV3
                  V4        = SY-MSGV4
                IMPORTING
                  MSG       = V_MSG
                EXCEPTIONS
                  NOT_FOUND = 1
                  OTHERS    = 2.
              IF SY-SUBRC <> 0.
                MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF.
              WRITE:/ V_MSG.
            ENDLOOP.
          ENDLOOP.
          CLEAR IT_TRANS.
          REFRESH IT_TRANS.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  GET_FORM_DETAILS
          text
    -->  p1        text
    <--  p2        text
    FORM GET_FORM_DETAILS .
      SELECT  MARC~WERKS
              MARC~PSTAT
              MARC~PRCTR
              MARC~MINLS
              MARC~MAXLS
              T001W~NAME1 INTO TABLE
              IT_PLANT  FROM MARC JOIN T001W
              ON MARCWERKS = T001WWERKS
              WHERE MARC~MATNR = IT_MARC-MATNR.
    ENDFORM.                    " GET_FORM_DETAILS
    *&      Form  BDC_DYNPRO
          text
         -->P_0470   text
         -->P_0471   text
    FORM BDC_DYNPRO  USING    VALUE(P_0470)
                              VALUE(P_0471).
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM  = P_0470.
      IT_BDCDATA-DYNPRO   = P_0471.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.                    " BDC_DYNPRO
    *&      Form  BDC_FIELD
          text
         -->P_0475   text
         -->P_0476   text
    FORM BDC_FIELD  USING    VALUE(P_0475)
                             VALUE(P_0476).
      CLEAR IT_BDCDATA.
      IT_BDCDATA-FNAM = P_0475.
      IT_BDCDATA-FVAL = P_0476.
      APPEND IT_BDCDATA.
    ENDFORM.                    " BDC_FIELD
    *&      Form  SCRIPTS
          text
    -->  p1        text
    <--  p2        text
    FORM SCRIPTS .
    DATA : LV_TABIX TYPE SY-TABIX.
      CALL FUNCTION 'OPEN_FORM'
       EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
         FORM                              = 'ZLAXMI_TESTPAPER'
         LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
      CANCELED                          = 1
      DEVICE                            = 2
      FORM                              = 3
      OPTIONS                           = 4
      UNCLOSED                          = 5
      MAIL_OPTIONS                      = 6
      ARCHIVE_ERROR                     = 7
      INVALID_FAX_NUMBER                = 8
      MORE_PARAMS_NEEDED_IN_BATCH       = 9
      SPOOL_ERROR                       = 10
      CODEPAGE                          = 11
      OTHERS                            = 12
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *CALL FUNCTION 'START_FORM'
    EXPORTING
      ARCHIVE_INDEX          =
      FORM                   = 'ZLAXMI_TESTPAPER'
      LANGUAGE               = SY-LANGU
      STARTPAGE              = 'PAGE1'
      PROGRAM                = ' '
      MAIL_APPL_OBJECT       =
    IMPORTING
      LANGUAGE               =
    EXCEPTIONS
      FORM                   = 1
      FORMAT                 = 2
      UNENDED                = 3
      UNOPENED               = 4
      UNUSED                 = 5
      SPOOL_ERROR            = 6
      CODEPAGE               = 7
      OTHERS                 = 8
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT                        = 'HEADER'
      FUNCTION                       = 'SET'
        TYPE                           = 'BODY'
         WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT IT_PLANT.
      CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT                        = 'ITEM'
      FUNCTION                       = 'SET'
        TYPE                           = 'BODY'
         WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDLOOP.
      CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
       UNOPENED                       = 1
       BAD_PAGEFORMAT_FOR_PRINT       = 2
       SEND_ERROR                     = 3
       SPOOL_ERROR                    = 4
       CODEPAGE                       = 5
       OTHERS                         = 6
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " SCRIPTS
    *&      Module  EXIT  INPUT
          text
    MODULE EXIT INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " EXIT  INPUT
    Do reward if it helps,
    Regards,
    Laxmi.

  • Which Apple event?

    I like to write little applets in AS to entertain my grandchildren and give the computer a personality using speech recognition, and text to speech. An example is if you tell the computer "Thank you" it responds appropriately with a random response from a list of possible ones like "you're welcome", "anytime", "no problem", etc. Another is if you tell the computer to "go to sleep" it says, "good night" and puts itself to sleep. But so far I have not found an apple event I can use when the computer wakes from sleep to trigger a script to make it say, "good morning" or "Hello" or something dependent on the time of day or night it gets awakened from its slumber.
    The question, "does anyone know of an apple event or some other way to make the occurence of waking from sleep that can be used by AS to trigger the applet?
    NorCalDP

    Translating what Craig posted above ...Here are some general directions for building an "AppleScriptOBJC" application that can perform script executions via sleep notifications:
    *+NOTE: You need to have Apple's Developer tools installed to proceed. They're FREE, go get them already!!!+*
    1) Launch "Xcode"
    2) Click on "*Create a new Xcode project*"
    3) Select the "*Cocoa-AppleScript Application*" template and click "Choose"
    4) Type in a name and click "Save"
    5) Click the disclosure triangle to the left of the "Classes" folder
        (this will reveal the "YourAppNameAppDelegate.applescript" file)
    6) Double click the "YourAppNameAppDelegate.applescript" file to open it in a separate editor window
    7) Replace the script code that looks like this:
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Replace this code with the code below...">property parent : class "NSObject"
    on applicationWillFinishLaunching_(aNotification)
    -- Insert code here to initialize your application before any files are opened
    end applicationWillFinishLaunching_
    on applicationShouldTerminate_(sender)
    -- Insert code here to do any housekeeping before your application quits
    return current application's NSTerminateNow
    end applicationShouldTerminate_</pre>
    with the following code:
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Copy this code and paste it into your AppleScriptOBJC AppDelegate.applescript file, replacing the code seen above...">property parent : class "NSObject"
    property pNSWorkspace : class "NSWorkspace"
    on awakeFromNib()
    tell (pNSWorkspace's sharedWorkspace())'s notificationCenter()
    addObserverselector_name_object(me, "screenDidWake", "NSWorkspaceScreensDidWakeNotification", missing value)
    addObserverselector_name_object(me, "computerDidWake", "NSWorkspaceDidWakeNotification", missing value)
    addObserverselector_name_object(me, "computerWillSleep", "NSWorkspaceWillSleepNotification", missing value)
    addObserverselector_name_object(me, "screenDidSleep", "NSWorkspaceScreensDidSleepNotification", missing value)
    end tell
    end awakeFromNib
    on applicationWillFinishLaunching_(aNotification)
    -- Insert code here to initialize your application before any files are opened
    end applicationWillFinishLaunching_
    on applicationShouldTerminate_(sender)
    -- Insert code here to do any housekeeping before your application quits
    return current application's NSTerminateNow
    end applicationShouldTerminate_
    on screenDidWake()
    say "The screen has awoken."
    end screenDidWake
    on computerDidWake()
    say "The computer has awoken."
    end computerDidWake
    on computerWillSleep()
    say "The computer will sleep."
    end computerWillSleep
    on screenDidSleep()
    say "The screen did sleep."
    end screenDidSleep</pre>
    8) Press *Command + R* and click "*Save All*"
    Xcode will take a moment to compile and run your new application. Once it does, all you will see is a blank window on the screen. This window can be customized to your liking using another Developer application named "*Interface Builder*". More details about that can be found elsewhere on the web. The point of this post was to show how to monitor your computer for sleep notifications using "AppleScriptOBJC".
    The application, created in the above steps, will notify you when your computer does one of 4 things: the display sleeps, the display wakes up, the computer sleeps, or the computer wakes up. You can put any AppleScript code you want to execute where the "say" commands are for the various sleep notifications.
    Hope this helps someone...

Maybe you are looking for

  • Invalid COMMIT WORK in an update function module. in VKM1 Tcode

    Hi All, I am getting the short dump with message "Invalid COMMIT WORK in an update function module. " Calling a COMMIT WORK in an update process is not allowed because the function modules triggered in a Logical Unit of Work cannot then be processed

  • Software - Reboots when "Find" is used

    I am using a Palm TX and when I use the (find) the operating system reboots shortly after initiating the command. Is there a fix to this problem? Post relates to: Palm TX

  • Renew-subscription doesnt work

    Hi, I have a lapsed subscription to AE that I needed to renew. I went online paid for my renewal I open my software but it keeps saying i need to renew my subscription! I have logged out , restarted my computer, I have waited hrs before opening the s

  • Web browser on Nseries, HELP!

    Hello all. I am new to this so forgive me if this is posted in the wrong area. Recently i have not been able to access the internet on my N82. No message comes up when i choose the Web option on the menu screen - the screen just flashes and takes me

  • Help Please With Header/Footer Includes

    Can someone please help with an easy to follow answer? I am building a site and want to use the header and footer as include files to make maintenance of the links easier. In the header, the navigation is rollover graphics. (I mention this because th