Editing LabelGraphic Script

Is there any chance someone can help me out or point me in the right direction on small script edit? I am not terribly familiar with Javascript and I just started testing the Javascript version of the LabelGraphics option in Indesign CS3. This works pretty well for me, but I am wondering if it can be edited to make the label text box have a white fill background. I am using this for print grids and need it to show over an image.

Hi AlliantPrinting,
The CS4 version has an option to apply an object style, and it should work in CS3. You can get it from:
http://www.adobe.com/products/indesign/scripting/index.html
(click the Scripting Resources) tab to get to the scripting page. The CS4 sample scripts are posted there for download. Let me know if it works for you!
Thanks,
Ole

Similar Messages

  • How do I edit this script (newbie)

    Editing a script
    I found a script that creates a reminder event based upon the birthdays of my contacts in Address Book. It looks forward one week at a time.
    I'm not familiar with creating scripts. How would I edit this to do the following (if possible)
    1- I set up a contact list in Address Book for only those people whose birthdays I want to be reminded of. Is it possible to have this script only look through this contact list, not every contact.
    2- Can it also be set up to delete the previously set events (so that the only events that appear are the ones for the ensuing week)
    3- Can it be set up to remind me of anniversaries also? How would I edit it? (I tried to find and replace the term birthday with anniversary, but all it did was notify me of forthcoming week's birthdays but called them anniversaries)
    Thanks!
    ===============
    birthdayAlert.scpt
    User set variables
    set numberDaysNotice to 1 -- how many days before the birthday to alert you, 0 is that day
    set timeOfNotification to 5 -- the hour you want the notification
    set selectedCalender to "Birthday Reminders" -- the calender in iCal you want to add the events to
    Setup
    set birthdayPeople to {}
    set birthdayDates to {}
    Get the current date & next week
    set today to current date
    set nextWeek to today + (60 * 60 * 24 * 7)
    Loop through everyone in the Address Book
    tell application "Address Book"
    set peopleArray to the name of every person
    repeat with i from 1 to count of peopleArray
    set thisPerson to person i
    set thisBirthday to birth date of thisPerson
    Check if they've got a birthday entered on their card
    if thisBirthday is not equal to (missing value) then
    set year of thisBirthday to year of (current date) -- otherwise it uses their birth year
    See if it's in the next week
    if (thisBirthday is greater than today) and (thisBirthday is less than nextWeek) then
    set thisBirthday_day to day of thisBirthday
    set thisBirthday_month to month of thisBirthday
    Add them to our list
    set birthdayPeople to birthdayPeople & name of thisPerson
    set birthdayDates to birthdayDates & birth date of thisPerson
    end if
    end if
    end repeat
    end tell
    If we have birthday's go into iCal and add the alerts
    if (count of birthdayPeople) is greater than 0 and ((count of birthdayPeople) is equal to (count of birthdayDates)) then
    tell application "iCal"
    tell calendar selectedCalender
    repeat with i from 1 to count of birthdayPeople
    set thisDate to item i of birthdayDates
    set year of thisDate to year of today
    set time of thisDate to (60 * 60) * timeOfNotification
    set day of thisDate to (day of thisDate) - numberDaysNotice
    set thisEvent to make new event at end with properties {description:"", summary:(item i of birthdayPeople) & "'s Birthday", location:"", start date:thisDate, end date:thisDate + 15 * minutes}
    tell thisEvent
    make new display alarm at end with properties {trigger interval:0}
    end tell
    end repeat
    end tell
    end tell
    end if

    1- I set up a contact list in Address Book for only those people whose birthdays I want to be reminded of. Is it possible to have this script only look through this contact list, not every contact.
    Sure - if you created a specific group of the people you want to track then just change the line:
    set peopleArray to the name of every person
    to:
    set peopleArray to the name of every person of group "Birthdays"
    (or whatever group name you used). You see, as written your script just grabs everyone's name as opposed to just the names of people in the specific group.
    2- Can it also be set up to delete the previously set events (so that the only events that appear are the ones for the ensuing week)
    Yes, but that's a little trickier since you need some way to denote which events are birthday events vs. other events from last week. If you're using a specific calendar for this then you could just delete existing events in that calendar, or you could implement a minor change to the way you create events - use the description to identify this is one of your auto-created birthday alarms:
    set thisEvent to make new event at end with properties {description:"birthday", summary:(item i of birthdayPeople) & "'s Birthday", location:"", start date:thisDate, end date:thisDate + 15 * minutes}
    So now the events will have a specific description, so it's easy to start your new script off with a line that deletes existing 'birthday" events, via:
    tell application "iCal"
      delete every event of calendar selectedCalendar whose description = "birthday"
    end tell
    (you can nix the '... whose description = "birthday"' element if you just want to delete all existing events in the calendar).
    3- Can it be set up to remind me of anniversaries also? How would I edit it? (I tried to find and replace the term birthday with anniversary, but all it did was notify me of forthcoming week's birthdays but called them anniversaries)
    Sure, that's because you specifically ask Address Book for birthdays:
    set thisBirthday to birth date of thisPerson
    To track anniversaries you need to ask Address Book for different data. This one's a little tricker since anniversaries are tracked via the custom date element, so you'd need something like:
    set anniversaryList to {}
    tell application "Address Book"
      repeat with eachPerson in (get every person) -- add 'of group "anniversaries' if you use a specific group
        repeat with eachDate in eachPerson's custom dates
          if label of eachDate = "anniversary" then
            -- this person has an Anniversary set, so add your code here to check if eachDate is in the next week if it is:
            copy eachPerson to end of anniversaryList
          end if
        end repeat
      end repeat
    end tell
    At the end of this you'll have a list of people whose anniversary is upcoming and you can duplicate your iCal code to add anniversary events in addition to birthdays.

  • EDITING SQL SCRIPT IN CRYSTAL REPORTS

    I just installed Version 12 and am trying to edit SQL scripts in Crystal Reports that were created in Version 8.  When opening the Database tab on the Main Menu, the Query Panel is greyed out and not accessible.  I can view the SQL Query but cannot edit it.  If someone can advise me what to do I would be very appreciative.
    Edited by: Frank Romano on Mar 18, 2009 4:17 PM

    Hi Frank,
    Here is the SAP Note that says that you cannot edit SQL from Crystal 9 and later
    Symptom
    In Crystal Reports (CR) 8.5 and earlier, it is possible to edit the SQL statement in the 'Show SQL Query' dialog box. Doing so allows the report designer to modify the SQL statement that CR generates. Starting with Crystal Reports version 9, users are no longer able to modify the SQL in the 'Show SQL Query' window.
    How can you control the SQL statement that Crystal Reports sends to the database?
    Resolution
    To control the SQL statement that Crystal Reports 9 and later uses, use the 'Add Command' feature to create a Command Object. The 'Add Command' feature replaces the ability to edit SQL statements in the 'Show SQL Query' dialog box. Use this dialog box to write your own SQL command (query) which will be represented in Crystal Reports as a Table object.
    More Information
    Additional information about creating and using Command Objects ('Add Command') can be found on our support site and within the Online Help file contained in Crystal Reports.
    On our support site search for the technical brief, cr_query_engine.pdf and knowledge base article c2016641 at
    http://support.businessobjects.com/search
    Keywords
    OBJECT ADD COMMAND EDIT SHOW SQL QUERY DATABASE ACCESS MENU MODIFY SQL Crystal Reports Show SQL query Command object , c2017389
    Regards,
    Raghavendra

  • Run script action - ZCM edits my script's content

    Good day,
    I am implementing a script in a bundle that allows me to generate files on the fly and execute them. Upon saving my "run script" action, ZENworks takes on himself to parse and edit my script, I am not sure why.
    A part of my script generates a .hta file, an html application, that is used as a temporary splash screen. For some reason (line 85) my event name (Windows_onLoad()) is renamed by ZENworks like this :
    oFile.WriteLine " Sub Window_onload()"
    becomes
    oFile.WriteLine " Sub Window_<body <body <body <body <body onload()"
    Does that ring a bell for anyone?
    I have other means of doing what I want but I wanted to bring this specific issue to you. Let me know what you think.
    Thank you!
    Action parameters :
    Code:
    Script to run : 'Define oyur own script'
    Script content : *copy of the script found below*
    Script file extention : .vbs
    Path to script Engine : C:\Windows\system32\wscript.exe
    Executable security level : Run as dynamic administrator
    Requirements : Registry Key and Value exists
    \HKEY_LOCAL_MACHINE\SOFTWARE\Lafleche\ZenworksAssignedObjets - Inst-Coba-x64 - NO
    ZENworks Agent : 11.2.2.121992 & 11.2.3.18535
    ZENworks version : 11.2.3.0
    Code:
    set oFSO = CreateObject("Scripting.FileSystemObject")
    set oShell = CreateObject("WScript.Shell")
    strFileName1 = Replace(oFSO.GetTempName,".tmp",".reg")
    strFileName2 = oFSO.GetTempName
    strFileName3 = Replace(oFSO.GetTempName,".tmp",".hta")
    set oFile = oFSO.CreateTextFile(strFileName3)
    oFile.WriteLine "<!DOCTYPE html>"
    oFile.WriteLine "<html>"
    oFile.WriteLine " <head>"
    oFile.WriteLine " <title>Title</title>"
    oFile.WriteLine " <HTA:APPLICATION Caption=""yes"" SysMenu=""yes"" />"
    oFile.WriteLine " <script language=""VBScript"">"
    oFile.WriteLine ""
    oFile.WriteLine " Sub Window_onload()"
    oFile.WriteLine " "
    oFile.WriteLine " window.resizeTo 500,250"
    oFile.WriteLine " "
    oFile.WriteLine " strComputer = ""."""
    oFile.WriteLine " Set objWMIService = GetObject(""winmgmts:\\"" & strComputer & ""\root\cimv2"")"
    oFile.WriteLine " Set colItems = objWMIService.ExecQuery(""Select * From Win32_DesktopMonitor"")"
    oFile.WriteLine " "
    oFile.WriteLine " For Each objItem in colItems "
    oFile.WriteLine " intHorizontal = objItem.ScreenWidth"
    oFile.WriteLine " intVertical = objItem.ScreenHeight "
    oFile.WriteLine " Next"
    oFile.WriteLine " "
    oFile.WriteLine " intLeft = (intHorizontal - 500) / 2"
    oFile.WriteLine " intTop = (intVertical - 250) / 2"
    oFile.WriteLine " window.moveTo intLeft, intTop "
    oFile.WriteLine " idTimer = window.setTimeout(""PausedSection"", 8000, ""VBScript"")"
    oFile.WriteLine " "
    oFile.WriteLine " End Sub"
    oFile.WriteLine " "
    oFile.WriteLine " Sub PausedSection"
    oFile.WriteLine " window.close"
    oFile.WriteLine " End Sub"
    oFile.WriteLine ""
    oFile.WriteLine " </script>"
    oFile.WriteLine " </head>"
    oFile.WriteLine " <body>"
    oFile.WriteLine " "
    oFile.WriteLine " <img src=""http://www.domain.com/logo.png"" alt="""" />"
    oFile.WriteLine " "
    oFile.WriteLine " <p>Installation underway...</p>"
    oFile.WriteLine " "
    oFile.WriteLine " </body>"
    oFile.WriteLine "</html>"
    oFile.Close
    oShell.Run strFileName3, 0, true
    'oFSO.DeleteFile strFileName3

    Hi All, we now have the same issue. running 11.2.4 MU1 tested on IE8 on XP, IE9 on Win7 and ff 17esr, and suse 12.3 with chrome 31... want us to try ie 10 and 11? currently updating to ff 24 esr, and will update IE to 10 for now.
    Currently we have the exe defined as "c:\windows\system32\mshta.exe", .hta extension.
    Trying to validate the syntax externally, if anyone has any suggestions. Encrypted within the script the app runs fine.
    issue is the <body being added, up to several times:
    "Sub Window_<body <body <body onload
    Window.ResizeTo 590,560
    Continue
    End Sub"

  • Please edit my script to get specific measurements?

    Please edit my script to get specific measurements?
    Hi Guys,
    I do have script, which gives specific measurements of selected objects. This is working great. But I need the following requirements.
    ·      Size should come exactly. That means the selected object is 10.4mm. But this script is measuring as 10mm, which is not correct exactly.
    ·      Color should be following.
    o   Measurement line color with ‘XYZ’ PMS
    o   Measurement text color with ‘ABC’ PMS
    Here is the script of that.
    Thanks in advance...
    Kind Regards
    HARI

    Here is the script of that..
    * Description: An Adobe Illustrator script that automates measurements of objects. This is an early version that has not been sufficiently tested. Use at your own risks.
    * Usage: Select 1 to 2 page items in Adobe Illustrator, then run this script by selecting File > Script > Other Scripts > (choose file)
    * License: GNU General Public License Version 3. (http://www.gnu.org/licenses/gpl-3.0-standalone.html)
    * Copyright (c) 2009. William Ngan.
    * http://www.metaphorical.net
    // Create an empty dialog window near the upper left of the screen
    var dlg = new Window('dialog', 'Spec');
    dlg.frameLocation = [100,100];
    dlg.size = [250,250];
    dlg.intro = dlg.add('statictext', [20,20,150,40] );
    dlg.intro.text = 'First select 1 or 2 items';
    dlg.where = dlg.add('dropdownlist', [20,40,150,60] );
    dlg.where.selection = dlg.where.add('item', 'top');
    dlg.where.add('item', 'bottom');
    dlg.where.add('item', 'left');
    dlg.where.add('item', 'right');
    dlg.btn = dlg.add('button', [20,70,150,90], 'Specify', 'spec');
    // document
    var doc = activeDocument;
    // spec layer
    try {
        var speclayer =doc.layers['spec'];
    } catch(err) {
        var speclayer = doc.layers.add();
        speclayer.name = 'spec';
    // measurement line color
    var color = new CMYKColor;
    color.cyan = 0;
    color.magenta = 0;
    color.yellow = 0;
    color.black = 100;
    // gap between measurement lines and object
    var gap = 10;
    // size of measurement lines.
    var size = 10;
    // number of decimal places
    var decimals = 0;
    // pixels per inch
    var dpi = 72;
        Start the spec
    function startSpec() {
        if (doc.selection.length==1) {
            specSingle( doc.selection[0].geometricBounds, dlg.where.selection.text );
        } else if (doc.selection.length==2) {
            specDouble( doc.selection[0], doc.selection[1], dlg.where.selection.text );
        } else {
                alert('please select 1 or 2 items');
        dlg.close ();
        Spec the gap between 2 elements
    function specDouble( item1, item2, where ) {
        var bound = new Array(0,0,0,0);
        var a =  item1.geometricBounds;
        var b =  item2.geometricBounds;
        if (where=='top' || where=='bottom') {
            if (b[0]>a[0]) { // item 2 on right,
                if (b[0]>a[2]) { // no overlap
                    bound[0] =a[2];
                    bound[2] = b[0];
                } else { // overlap
                    bound[0] =b[0];
                    bound[2] = a[2];
            } else if (a[0]>=b[0]){ // item 1 on right
                if (a[0]>b[2]) { // no overlap
                    bound[0] =b[2];
                    bound[2] = a[0];
                } else { // overlap
                    bound[0] =a[0];
                    bound[2] = b[2];
            bound[1] = Math.max (a[1], b[1]);
            bound[3] = Math.min (a[3], b[3]);
        } else {
            if (b[3]>a[3]) { // item 2 on top
                if (b[3]>a[1]) { // no overlap
                    bound[3] =a[1];
                    bound[1] = b[3];
                } else { // overlap
                    bound[3] =b[3];
                    bound[1] = a[1];
            } else if (a[3]>=b[3]){ // item 1 on top
                if (a[3]>b[1]) { // no overlap
                    bound[3] =b[1];
                    bound[1] = a[3];
                } else { // overlap
                    bound[3] =a[3];
                    bound[1] = b[1];
            bound[0] = Math.min(a[0], b[0]);
            bound[2] = Math.max (a[2], b[2]);
        specSingle(bound, where );
        spec a single object
        @param bound item.geometricBound
        @param where 'top', 'bottom', 'left,' 'right'
    function specSingle( bound, where ) {
        // width and height
        var w = bound[2]-bound[0];
        var h = bound[1]-bound[3];
        // a & b are the horizontal or vertical positions that change
        // c is the horizontal or vertical position that doesn't change
        var a = bound[0];
        var b = bound[2];
        var c = bound[1];
        // xy='x' (horizontal measurement), xy='y' (vertical measurement)
        var xy = 'x';
        // a direction flag for placing the measurement lines.
        var dir = 1;
        switch( where ) {
            case 'top':
                a = bound[0];
                b = bound[2];
                c = bound[1];
                xy = 'x';
                dir = 1;
                break;
            case 'bottom':
                a = bound[0];
                b = bound[2];
                c = bound[3];
                xy = 'x';
                dir = -1;
                break;
            case 'left':
                a = bound[1];
                b = bound[3];
                c = bound[0];
                xy = 'y';
                dir = -1;
                break;
            case 'right':
                a = bound[1];
                b = bound[3];
                c = bound[2];
                xy = 'y';
                dir = 1;
                break;
        // create the measurement lines
        var lines = new Array();
        // horizontal measurement
        if (xy=='x') {
            // 2 vertical lines
            lines[0]= new Array( new Array(a, c+(gap)*dir) );
            lines[0].push ( new Array(a, c+(gap+size)*dir) );
            lines[1]= new Array( new Array(b, c+(gap)*dir) );
            lines[1].push( new Array(b, c+(gap+size)*dir) );
            // 1 horizontal line
            lines[2]= new Array( new Array(a, c+(gap+size/2)*dir ) );
            lines[2].push( new Array(b, c+(gap+size/2)*dir ) );
            // create text label
            if (where=='top') {
                var t = specLabel( w, (a+b)/2, lines[0][1][1] );
                t.top += t.height;
            } else {
                var t = specLabel( w, (a+b)/2, lines[0][0][1] );
                t.top -= t.height;
            t.left -= t.width/2;
        // vertical measurement
        } else {
            // 2 horizontal lines
            lines[0]= new Array( new Array( c+(gap)*dir, a) );
            lines[0].push ( new Array( c+(gap+size)*dir, a) );
            lines[1]= new Array( new Array( c+(gap)*dir, b) );
            lines[1].push( new Array( c+(gap+size)*dir, b) );
            //1 vertical line
            lines[2]= new Array( new Array(c+(gap+size/2)*dir, a) );
            lines[2].push( new Array(c+(gap+size/2)*dir, b) );
            // create text label
            if (where=='left') {
                var t = specLabel( h, lines[0][1][0], (a+b)/2 );
                t.left -= t.width;
            } else {
                var t = specLabel( h, lines[0][0][0], (a+b)/2 );
                t.left += size;
            t.top += t.height/2;
        // draw the lines
        var specgroup = new Array(t);
        for (var i=0; i<lines.length; i++) {
            var p = doc.pathItems.add();
            p.setEntirePath ( lines[i] );
            setLineStyle( p, color );
            specgroup.push( p );
        group(speclayer, specgroup );
        Create a text label that specify the dimension
    function specLabel( val, x, y) {
            var t = doc.textFrames.add();
            t.textRange.characterAttributes.size = 8;
            t.textRange.characterAttributes.alignment = StyleRunAlignmentType.center;
            var v = val;
            switch (doc.rulerUnits) {
                case RulerUnits.Inches:
                    v = val/dpi;
                    v = v.toFixed (decimals);
                    break;
                case RulerUnits.Centimeters:
                    v = val/(dpi/2.54);
                    v = v.toFixed (decimals);
                    break;
                case RulerUnits.Millimeters:
                    v = val/(dpi/25.4);
                    v = v.toFixed (decimals);
                    break;
                case RulerUnits.Picas:
                    v = val/(dpi/6);
                    var vd = v - Math.floor (v);
                    vd = 12*vd;
                    v =  Math.floor(v)+'p'+vd.toFixed (decimals);
                    break;
                default:
                    v = v.toFixed (decimals);
            t.contents = v;
            t.top = y;
            t.left = x;
            return t;
    function setLineStyle(path, color) {
            path.filled = false;
            path.stroked = true;
            path.strokeColor = color;
            path.strokeWidth = 0.5;
            return path;
    * Group items in a layer
    function group( layer, items, isDuplicate) {
        // create new group
        var gg = layer.groupItems.add();
        // add to group
        // reverse count, because items length is reduced as items are moved to new group
        for(var i=items.length-1; i>=0; i--) {
            if (items[i]!=gg) { // don't group the group itself
                if (isDuplicate) {
                    newItem = items[i].duplicate (gg, ElementPlacement.PLACEATBEGINNING);
                } else {
                    items[i].move( gg, ElementPlacement.PLACEATBEGINNING );
        return gg;
    dlg.btn.addEventListener ('click', startSpec );
    dlg.show();

  • Edit rman script

    Hi guys,
    someone can tell me if is possible to edit rman script in Backup Jobs definition of Grid?
    I've scheduled some jobs backup and I need to edit script but don't find where i can edit it..
    thanks
    Andrea

    hi,
    yes this is possible.
    from grid, select the database and then scroll down to the bottom of the page, there you will see a section called Related Lin ks,
    one of these is jobs.
    select this and you will then get a page which shows any scheduled jobs, completed jobs.
    there are also a number of options one of which is 'edit', this will allow you to edit your job.
    hope this helps
    Alan

  • Edit the scripts of speech recognition

    I would like to know if I can edit the scripts to be able to command the mac with custom voice commands (in the text and the language), and how I have to do for doing that. thanks

    See if this helps:
    http://forums.macrumors.com/showthread.php?t=299688

  • How can I use firefox to access Oracle's 10g Express Edition Database script editor?

    I have installed Oracle's 10g Express Edition (xe) Database in my computer, which is running Ubuntu 10.04 64-bit. I can access the database through the command line and by using the web interface on Firefox. However, the script editor doesn't work with Firefox. The scripts are not shown and I'm unable to edit them.

    I have installed Oracle's 10g Express Edition (xe) Database in my computer, which is running Ubuntu 10.04 64-bit. I can access the database through the command line and by using the web interface on Firefox. However, the script editor doesn't work with Firefox. The scripts are not shown and I'm unable to edit them.

  • Edit restore script

    Hi,
    I have script to restore database and I want to edit it because it restoring database from latest backup, I want it restoring from desired backup.
    I need your help to show me where instruction to be edited and substitute instruction.
    @echo off
    REM
    REM The script assumes that user can connect using "/ as sysdba"
    REM
    REM =================
    REM Restore procedure
    REM =================
    REM
    REM If Installed Oracle home is also lost and oracle binaries were
    REM re-installed or the Oracle is installed to new oracle home location
    REM compared to backup time, then user will be prompted to enter Flash
    REM Recovery Area location.
    REM
    REM For database in NoArchiveLog mode, database is restored to last offline
    REM backup time/scn;
    REM For database in Archive log mode, database is restored from last backup
    REM and a complete recovery is attempted. If complete recovery fails,
    REM user can open the database with resetlogs option provided the files
    REM are not recovery fuzzy.
    REM
    REM The restore log is saved in ?/DATABASE/OXE_RESTORE.LOG
    REM
    setlocal
    set /p inp="This operation will shut down and restore the database. Are you sure [Y/N]?"
    :checkinp
    if /i "%inp%" == "Y" goto :confirmedyes
    if /i "%inp%" == "n" exit
    :Askagain
    set /p inp=
    goto :checkinp
    :confirmedyes
    echo Restore in progress...
    echo db_name=xe >%temp%\rman_dummy.ora
    echo sga_target=270M >>%temp%\rman_dummy.ora
    net start oracleserviceXe
    REM Startup database in nomount mode using RMAN...
    echo set echo on^;
    echo startup nomount pfile=%temp%\rman_dummy.ora force^;
    ) > %temp%\restore_rman0.dat
    rman target / @%temp%\restore_rman0.dat
    if not %errorlevel% == 0 set Errorstr= RMAN Error - could not startup dummy instance & goto :restorefailederr
    echo connect / as sysdba^;
    echo set head off
    echo set echo off
    echo set linesize 515
    echo variable var varchar2^(512^)^;
    echo execute :var := sys.dbms_backup_restore.normalizefilename^(^'SPFILE2INIT^'^)^;
    echo spool %temp%\spfile2init.log
    echo select sys.dbms_backup_restore.normalizefilename^(^'SPFILE2INIT.ORA^'^) spfile2init from dual^;
    echo exit^;
    ) > %temp%\spfile2init.sql
    sqlplus /nolog @%temp%\spfile2init.sql >nul
    FOR /F %%i in (%temp%\spfile2init.log) do set SPFILE2INIT=%%i
    echo connect / as sysdba;
    echo set head off
    echo set echo off
    echo set linesize 515
    echo variable var varchar2^(512^)^;
    echo execute :var := sys.dbms_backup_restore.normalizefilename^(^'FRA_LOC^'^)^;
    echo spool %temp%\restore_rmanlog.log
    echo select sys.dbms_backup_restore.normalizefilename^(^'OXE_RESTORE.LOG^'^) RESTORE_RMANLOG from dual^;
    echo exit^;
    ) > %temp%\restore_rmanlog.sql
    sqlplus /nolog @%temp%\restore_rmanlog.sql >nul
    FOR /F %%i in (%temp%\restore_rmanlog.log) do set RESTORE_RMANLOG=%%i
    if not exist ^"%SPFILE2INIT%^" goto get_rcvarea_loc
    echo set echo on^;
    echo shutdown immediate^;
    echo startup nomount pfile=^"%SPFILE2INIT%^"^;
    echo restore ^(spfile from autobackup^) ^(controlfile from autobackup^)^;
    echo startup mount force^;
    echo configure controlfile autobackup off^;
    echo restore database^;
    ) > %temp%\restore_rman1.dat
    rman target / @%temp%\restore_rman1.dat trace "%RESTORE_RMANLOG%"
    if not %errorlevel% == 0 set Errorstr= RMAN Error - See log for error & goto :restorefailederr
    goto restored_files
    :get_rcvarea_loc
    set /p rcvarea_loc="Enter the flash recovery area location:"
    echo set echo on^;
    echo restore ^(spfile from autobackup db_recovery_file_dest=^'%rcvarea_loc%^'^)^;
    echo startup nomount force^;
    echo restore ^(controlfile from autobackup^)^;
    echo alter database mount^;
    echo configure controlfile autobackup off^;
    echo restore database^;
    ) > %temp%\restore_rman1.dat
    rman target / @%temp%\restore_rman1.dat trace "%RESTORE_RMANLOG%"
    if not %errorlevel% == 0 set Errorstr= RMAN Error - See log for error & goto :restorefailederr
    goto restored_files
    :restored_files
    echo connect / as sysdba^;
    echo declare cursor n1 is select name from v$tempfile^;
    echo begin
    echo for a in n1
    echo loop
    echo begin
    echo sys.dbms_backup_restore.deletefile^(a.name^)^;
    echo exception
    echo when others then
    echo null^;
    echo end^;
    echo end loop^;
    echo end^;
    echo /
    echo exit^;
    echo /
    ) > %temp%\deltfile.sql
    sqlplus /nolog @%temp%\deltfile.sql >nul
    echo connect / as sysdba^;
    echo set head off
    echo set echo off
    echo spool %temp%\logmode.log
    echo select log_mode from v$database^;
    echo exit^;
    ) > %temp%\logmode.sql
    sqlplus /nolog @%temp%\logmode.sql >nul
    FOR /F %%i in (%temp%\logmode.log) do set LOGMODE=%%i
    if "%LOGMODE%" == "NOARCHIVELOG" goto process_noarchivelog
    if "%LOGMODE%" == "ARCHIVELOG" goto process_archivelog
    set Errorstr= Unknown log mode : %LOGMODE%
    goto :restorefailederr
    :process_noarchivelog
    echo set echo on^;
    echo alter database open resetlogs;
    ) > %temp%\restore_rman2.dat
    rman target / @%temp%\restore_rman2.dat trace "%RESTORE_RMANLOG%" append
    if not %errorlevel% == 0 set Errorstr= RMAN Error - See log for details & goto :restorefailederr
    goto :restoresucess
    :process_archivelog
    echo set echo on^;
    echo recover database^;
    echo alter database open resetlogs;
    ) > %temp%\restore_rman2.dat
    rman target / @%temp%\restore_rman2.dat trace "%RESTORE_RMANLOG%" append
    if not %errorlevel% == 0 set Errorstr= RMAN Error - See log for details & goto :restorefailederr
    goto :restoresucess
    :restoresucess
    echo Restore of the database succeeded.
    echo Log file is at %RESTORE_RMANLOG%.
    pause Press any key to exit
    exit
    goto :EOF
    :restorefailederr
    echo ==================== ERROR =============================
    echo Restore of the database failed.
    echo %Errorstr%.
    echo Log file is at %RESTORE_RMANLOG%.
    echo ==================== ERROR =============================
    pause Press any key to exit
    exit
    goto :EOF
    Sorry for my english =)
    Thanks
    Mang Avonk

    How were you able to see the tuf in your ldf? Using a simple text editor i'm unable to see mine.
    if you open that file with text editor, you can't use "find" functionality because its not an ASCII text. It took some time for me to locate the text which you are seeing in image which I posted.
    Also how certain are you that it is not possible, do you have experience programming with SMO? Not that I don't believe you but I have spent some time developing a ps script that somewhat hinges on this, so not happy if it was all for not.
    I have NEVER worked with SMO and have no experience. But Since I have spent 10 years of my life working with Microsoft with SQL Server Product support team, I can tell you that it's not stored in any table in database. It's part of LDF and there is no way
    to get that without parsing the LDF file.
    Here is one of the blog written by my friend, who was working in my team.
    http://blogs.msdn.com/b/batala/archive/2011/07/21/how-to-see-the-standby-file-path-when-we-restore-the-database-in-standby-mode.aspx
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Where do you edit a script

    pardon my ignorance,
    i have been reading in the forums about script editing to enhance functionality in iWeb, hence i have been studying HTML language writing (via the internet). But I can't find anything about where the new scripts are inserted. Any help?
    J

    You can Insert -> HTML Snippet in iweb, there is no facility to edit code per-se.
    To edit code you will need some other applications, Taco HTML Edit is popular, I use Xcode or Dashcode to do my own coding.

  • How to Edit Post Script file Programitically Using PSUTILS in Windows XP

    I am haiving millions of post scripts file. Each having 4 to 5 pages. Except at page number one each page has little content. So though the content size is small but stationery wastage is quite high.
    I googled arround and came to know about a produch PSUTILS that could narrow down my page numbers.
    But unfortunelely, I am not able to get through that how it works.
    Anybody having idea may please expalin in detail step by step that how to use Psutils. Anyother like software may also be intimated please.
    PSUTLIS may be downloded from
    http://gnuwin32.sourceforge.net/packages/psutils.htm
    My sample PS file can be downloaded from
    https://www.dropbox.com/s/m80x4hfcpf49r5x/1010493909.ps
    Regards
    [email protected]

    Hi gimbal2,
    about code
    jTextArea1.setText(e1.getMessage());I am using this code so that the user will be prompted with a message rather than stack trace.
    About the issue I am getting on linux i believe its because of following statement.
    processBuilder = new ProcessBuilder("sqlplus",userName+"/"+password+"@"+databaseName, script_location); //ORACLERegards,
    Ajay
    Edited by: Ajay Sharma on Nov 23, 2012 12:05 PM
    Edited by: Ajay Sharma on Nov 23, 2012 12:06 PM

  • Can not edit a "Script task" with error message

    TITLE: Microsoft Visual Studio
    I try to edit the vb.net script in script task that I developed and get this message.
    Any idea what happen and how to fix this.
    Cannot show Visual Studio 2008 Tools for Applications editor.
    ADDITIONAL INFORMATION:
    Failed to create project at location "C:\Documents and Settings\pchen\Local Settings\Temp\2\SSIS\78a8360ded6b4c719c8aae52ac7483bb"! (Microsoft.SqlServer.VSTAScriptingLib)
    The given path's format is not supported. (mscorlib)

    Silviu investigated further and found the root cause.
    Repro steps to break it (SSIS 2008 VSTA editor for Script Task/Script Component)
    1. Edit script in VSTA
    2. in VSTA File->Save As: save file somewhere on disk (intent is to back up script code)
    3. close vsta.
    4. OK script task dialog
    5. Edit script in task again. Gives Error above.
    This is a bug in the way SSIS calls into VSTA. Unfortunately SSIS cannot disable “Save As” functionality in the script designer which in turn will cause the error you are seeing the next time you try to load the script.
    This is caused by the source file you saved in a location which is not under the project folder.
    We have opened a bug for this in the next version of SQL Server, but the workaround is easy enough for anyone facing this in SQL 2008 or SQL 2008 R2.
    Thanks, Jason
    Didn't get enough help here? Submit a case with the Microsoft Customer Support team for deeper investigation - http://support.microsoft.com/select/default.aspx?target=assistance

  • How disable JSF2 edit my script tag?

    I am using jsf2. Problem is the script tag being edited to append closing script tag. It cause the jquery not work(I also not sure why but it does not work when i come with closing tag). How to disable jsf to format my script tag?
    original
    <script src="/jquery/menu/demo/jquery.dimensions.min.js"/>
    output
    <script src="/jquery/menu/demo/jquery.dimensions.min.js"><!--
    //--></script>

    am not sure, try with this
    <script src="/jquery/menu/demo/jquery.dimensions.min.js" type="text/javascript" > </script>

  • BPC Security - Edit Logic Script

    Trying to find the security task that give edit access to Logic Script(BPC 10 NW SP9). Is this combined with the "Edit Packages" Data Manger task?
    Thank you.
    Regards,
    Vinod Swarnapuri

    Vinod,
    I think the one you are looking for is Manage Business Rules.
    Akos

  • Photoshop tools edit in script

    Hi friends,
    I want to create photoshop plugin, is that is possible to edit in photoshop tools script, like edit in brush tool?
    if there is any help please thanks in advance
    thanks
    Rahul

    Rahul Kathet wrote:
    I didnt get any response from SDK forum, I am getting confuse how to do that
    You just have to post a question like you did here.
    You may have to wait a day or two – it's not as busy there as it is here.

Maybe you are looking for

  • Error while invoking EJB lookup

    Hello Outline: Two DCs, one containing some JPA code, exposing method as EJB. The other generated as WS skeleton from ESR. Code in WS method: TrainingSBLocal bean = (TrainingSBLocal) context.lookup("app.company.pl/training2ear/LOCAL/TrainingSBBean");

  • How to work with text objects in b2b frontend

    Hi, My functional team has assigned new text ids "0012","Z005" and "Z025" in text object "CRM_ORDERH" and text procedure "ZORDER02". Now they want me to add five new text input fields to b2b order creation page and they want the data entered by custo

  • Disable conference call/ three-way calling function

    Is there any way to disable the conference call/ three-way calling function on this phone???? I can't make a normal phone call without randomly starting a three-way call with someone from my contact list or recent call log.  I can only keep the phone

  • Printing from Lightroom = bad, From CS3 = Perfect.

    OK, before you flame me I am sure this has been asked before but I tried looking threw the search engine and nothing came up that was directly related to my issue. Specs: Vista Ultimate Lightroom (Latest version) Photoshop CS3 (Latest version) iP6700

  • Can I remove podcast feeds on iPhone?

    Hello. I've amassed quite a few podcast feeds on my iPhone 4 (iOS 5.0.1) and wanted to remove them to free up memory on the phone. (I don't syncy through iTunes on my mac, I download them direct to the phone.) I usually just swipe and delete and remo