Please correct this script

Hello
In this script i cant change resulution it will change default size 72 dpi when i chnage 300 dpi it cant work
also it was not work in cs5 bridge app
please help me
#target bridge  
if( BridgeTalk.appName == "bridge" ) { 
var menu = MenuElement.find ('myBridgeMenu');
if (menu == null){
var newMenu = MenuElement.create( "menu", "Bridge", "before tools/ps", "myBridgeMenu" );
WebPics = MenuElement.create( "command", "Bridge Processor", "at the end of myBridgeMenu",  "BridgeProcessor" );
WebPics.onSelect = function () {
   WebPictures();
function WebPictures(){
if(app.version.match(/^\d+/) < 2){
    alert("You need CS3 or better to use this script!");
    return;
if($.os.match(/windows/gi)){
var TemplateFolder = new Folder(Folder.userData.absoluteURI + "/Adobe/XMP/Metadata Templates");
var Templates = TemplateFolder.getFiles("*.xmp");
var TemplateNames =[];
for(var d in Templates){TemplateNames.push(decodeURI(Templates[d].name.toString().replace(/\.xmp$/i,'' )));}
var PrefsFile = File(Folder.userData +"/BridgePrefs.dat");
var Prefs = {};
if(!PrefsFile.exists){
    Prefs.folder = decodeURI(app.document.presentationPath);
    Prefs.Width = 900;
    Prefs.Height = 800; 
    Prefs.quality = 79;
    Prefs.type = 0;
    if($.os.match(/windows/gi)){
    Prefs.template = 0;
    }else{
PrefsFile.open('r');
Prefs = eval(PrefsFile.read());
PrefsFile.close();
if($.os.match(/windows/gi)){
if(Prefs.template == null) Prefs.template = 0;
if(Prefs.template == undefined) Prefs.template = 0;
var win = new Window('dialog','Bridge Processor');
g = win.graphics;
var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
g.backgroundColor = myBrush;
win.alignChildren="row";
win.g10 = win.add('group');
win.g10.orientation = "row";
win.title = win.g10.add('statictext',undefined,"Bridge Processor");
win.title.helpTip="Written by Paul Riggott";
win.title.alignment="bottom";
var g = win.title.graphics;
g.font = ScriptUI.newFont("Georgia","BOLDITALIC",26);
win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
win.p1.alignChildren="fill";
win.p2= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
win.g3 =win.p2.add('group');
win.g3.orientation = "row";
win.g3.alignment="left";
win.g3.rb1 = win.g3.add('radiobutton',undefined,'Use selected Files');
win.g3.rb2 = win.g3.add('radiobutton',undefined,'Use files of Type');
var FileExtensions = "DNG,PSD,PDD,JPEG,JPG,JPE,GIF,BMP,RLE,DIB,TIF,CRW,NEF,RAF,ORF,CIN,DPX,EPS,PS,FLM,PSB,EXR, PCX,PDP," +
"PCD,RAW,PICT,PCT,PIC,PXR,PNG,TGA,VDA,ICB,VST,TIF,TIFF,WBM,DNG,SCT,PBM,CRW,CR2,DC2,DCR,NEF ,MOS,MRW,X3F,MOV";
FileExtensions= FileExtensions.toUpperCase();
FileExtensions = FileExtensions.split(",");
FileExtensions= ReturnUniqueSortedList(FileExtensions);
win.g3.dd1 = win.g3.add('dropdownlist',undefined,FileExtensions);
try{
win.g3.dd1.selection= Number(Prefs.type);
}catch(e){win.g3.dd1.selection=0;};
win.g3.rb1.value=true;
win.g3.cb1 = win.g3.add('checkbox',undefined,'Use Subfolders');
win.g3.dd1.enabled=false;
win.g3.cb1.value=false;
win.g3.cb1.enabled=false;
win.g3.rb2.onClick = function(){
win.g3.dd1.enabled=true;
win.g3.cb1.value=false;
win.g3.cb1.enabled=true;
win.g3.rb1.onClick = function(){
win.g3.dd1.enabled=false;
win.g3.cb1.value=false;
win.g3.cb1.enabled=false;
win.p3= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
win.g10a =win.p3.add('group');
win.g10a.alignment="left";
win.g10a.cb1 = win.g10a.add('checkbox',undefined,'Save to Same Location');
win.g11 =win.p3.add('group');
win.g11.spacing=10;
win.g11.orientation = 'row';
win.g11.alignment="left";
win.g11.st1 = win.g11.add('statictext',undefined,'Output Folder :-');
win.g11.st1.preferredSize=[200,20];
win.g11.bu1 = win.g11.add('button',undefined,'Browse');
win.g11.st1.alignment="left";
win.g11a =win.p3.add('group');
win.g11a.et1 = win.g11a.add('edittext');
win.g11a.et1.preferredSize=[400,20];
win.g11a.et1.enabled=false;
if(Folder(Prefs.folder.exists)){
    win.g11a.et1.text =  decodeURI(Folder(Prefs.folder).fsName);
if(Folder(Prefs.folder.exists)) outputFolder = Folder(Prefs.folder);
win.g11.bu1.onClick=function(){  
     outputFolder = Folder.selectDialog("Please select the output folder",Prefs.folder);   
     if(outputFolder !=null) win.g11a.et1.text =  decodeURI(outputFolder.fsName);
win.p4= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
win.g12 =win.p4.add('group');
win.g12.cb1 = win.g12.add('checkbox',undefined,'Use Fullsize JPEG');
win.g12.cb1.helpTip="This can take a lot more time!";
if($.os.match(/windows/gi)){
win.g12.cb2 = win.g12.add('checkbox',undefined,'Set Resolution');
win.g12.et1 = win.g12.add('edittext',undefined,'72');
win.g12.et1.preferredSize=[100,20];
win.g12.et1.onChanging = function() {
  if (this.text.match(/[^\d]/)) {
    this.text = this.text.replace(/[^\d]/g, '');
win.g12.orientation = 'row';
win.g12.alignment="left";
win.g12.spacing=20;
win.g12.cb2.onClick=function(){
    if(win.g12.cb2.value){
        win.g12.et1.enabled=true;
        }else{
            win.g12.et1.enabled=false;
win.g12.cb2.onClick();
win.g14 =win.p4.add('group');
win.g14.spacing=0;
win.g14.orientation = 'row';
win.g14.alignment="left";
win.g14.cb1 = win.g14.add('checkbox',undefined,"Fit Image");
win.g14.cb1.preferredSize=[80,20];
win.g14.st0 = win.g14.add('statictext',undefined,"W: ");
win.g14.et1 = win.g14.add('edittext',undefined,'900');
win.g14.et1.preferredSize=[50,20];
win.g14.et1.enabled=false;
win.g14.et1.text = Number(Prefs.Width);
win.g14.st1 = win.g14.add('statictext',undefined,"px");
win.g14.st1.preferredSize=[30,20]
win.g14.st0a = win.g14.add('statictext',undefined,"H: ");
win.g14.et1a = win.g14.add('edittext',undefined,'900');
win.g14.et1a.preferredSize=[50,20];
win.g14.et1a.enabled=false;
win.g14.et1a.text = Number(Prefs.Height);
win.g14.st1a = win.g14.add('statictext',undefined,"px");
win.g14.st1a.preferredSize=[30,20]
win.g14.st3 = win.g14.add('statictext',undefined,"Quality");
win.g14.st3.preferredSize=[60,20];
win.g14.dd1 = win.g14.add('dropdownlist');
for(var a =1;a<101;a++){
    win.g14.dd1.add("item", a);
win.g14.dd1.selection=Number(Prefs.quality);
win.g14.et1.onChanging = function() {
  if (this.text.match(/[^\d]/)) {
    this.text = this.text.replace(/[^\d]/g, '');
win.g14.et1a.onChanging = function() {
  if (this.text.match(/[^\d]/)) {
    this.text = this.text.replace(/[^\d]/g, '');
if($.os.match(/windows/gi)){
win.g18 =win.p4.add('group');
win.g18.spacing=25;
win.g18.orientation = 'row';
win.g18.alignment="left";
win.g18.cb1 = win.g18.add('checkbox',undefined,'Use Template');
win.g18.dd1 = win.g18.add('dropdownlist',undefined,TemplateNames);
if(Templates.length < 1) {
win.g18.cb1.enabled=false;
}else{
win.g18.dd1.selection=Number(Prefs.template);
win.g18.dd1.enabled=false;
win.g18.cb1.onClick=function(){
    if(win.g18.cb1.value){
        win.g18.dd1.enabled=true;
        }else{
            win.g18.dd1.enabled=false;
win.g14.cb1.onClick=function(){
   if( win.g14.cb1.value){
       win.g14.et1.enabled=true;
       win.g14.et1a.enabled=true;
       }else{
           win.g14.et1.enabled=false;
           win.g14.et1a.enabled=false;
win.g50 =win.p4.add('group');
win.g50.spacing=10;
win.g50.orientation = 'row';
win.g50.alignment="left";
win.g50.st1 = win.g50.add('statictext',undefined,"FileName Options");
var options = ["Document Name","Document Name with Prefix","Document Name with Suffix","Document Name with Sequence Number","New Name with Sequence Number"];
win.g50.dd1 = win.g50.add('dropdownlist',undefined,options);
win.g50.dd1.selection=0;
win.g55 =win.p4.add('group');
win.g55.spacing=10;
win.g55.orientation = 'stack';
win.g55.alignment="left";
win.g55a =win.g55.add('group');
win.g55a.spacing=10;
win.g55a.alignment="left";
win.g55a.st1 = win.g55a.add('statictext',undefined,"Prefix");
win.g55a.et1 = win.g55a.add('edittext',undefined,"");
win.g55a.et1.preferredSize=[250,20];
win.g55a.visible=false;
win.g55b =win.g55.add('group');
win.g55b.spacing=10;
win.g55b.alignment="left";
win.g55b.st1 = win.g55b.add('statictext',undefined,"Suffix");
win.g55b.et1 = win.g55b.add('edittext',undefined,"");
win.g55b.et1.preferredSize=[250,20];
win.g55b.visible=false;
var numbers =[2,3,4,5,6,7,8,9,10];
win.g55c =win.g55.add('group');
win.g55c.spacing=10;
win.g55c.alignment="left";
win.g55c.st1 = win.g55c.add('statictext',undefined,"Sequence Number");
win.g55c.et1 = win.g55c.add('edittext',undefined,"");
win.g55c.et1.preferredSize=[50,20];
win.g55c.st2 =win.g55c.add('statictext',undefined,'Length');
win.g55c.dd1 =win.g55c.add('dropdownlist',undefined,numbers);
win.g55c.dd1.selection=2;
win.g55c.visible=false;
win.g55c.et1.onChanging = function() {
  if (this.text.match(/[^\-\.\d]/)) {
    this.text = this.text.replace(/[^\-\.\d]/g, '');
win.g55d =win.g55.add('group');
win.g55d.spacing=10;
win.g55d.st1 = win.g55d.add('statictext',undefined,"FileName");
win.g55d.et1 = win.g55d.add('edittext',undefined,"");
win.g55d.et1.preferredSize=[195,20];
win.g55d.et2 = win.g55d.add('edittext',undefined,"");
win.g55d.et2.preferredSize=[50,20];
win.g55d.st2 =win.g55d.add('statictext',undefined,'length');
win.g55d.dd1 =win.g55d.add('dropdownlist',undefined,numbers);
win.g55d.dd1.selection=2;
win.g55d.visible=false;
win.g55d.et2.onChanging = function() {
  if (this.text.match(/[^\-\.\d]/)) {
    this.text = this.text.replace(/[^\-\.\d]/g, '');
win.g50.dd1.onChange = function(){
    switch(this.selection.index){
        case 0 : hideFields();checkSave();break;
        case 1 : hideFields();
        win.g55a.visible=true;
        break;
        case 2 : hideFields();
        win.g55b.visible=true;
        break;
        case 3 : hideFields();
        win.g55c.visible=true;
        break;
        case 4 : hideFields();
        win.g55d.visible=true;
        break;
        default : break;
function hideFields(){
win.g55a.visible=false;
win.g55a.et1.text='';
win.g55b.et1.text='';
win.g55b.visible=false;
win.g55c.visible=false;
win.g55c.et1.text='1';
win.g55d.visible=false;
win.g55d.et1.text='';
win.g55d.et2.text='1';
win.g150 =win.p1.add('group');
win.g150.spacing=10;
win.g150.orientation = 'row';
win.g150.alignment="top";
win.g150.bu1 = win.g150.add('button',undefined,"Process");
win.g150.bu1.preferredSize=[200,30];
win.g150.bu2 = win.g150.add('button',undefined,"Cancel");
win.g150.bu2.preferredSize=[200,30];
win.g10a.cb1.onClick=function(){
    if(win.g10a.cb1.value){
        win.g11.bu1.enabled=false;
        win.g50.dd1.selection=4;
        }else{
            win.g11.bu1.enabled=true;
function checkSave(){
    if(win.g10a.cb1.value){
        alert("Sorry this is not allowed as it could overwrite the document!\nPlease use another option");
        win.g50.dd1.selection=4;
        return;
win.g150.bu1.onClick=function(){
    if(win.g11a.et1.text == ''){
        alert("No output folder has been selected!");
        return;
    if(Number(win.g14.et1.text) <10) {
        alert("Please enter a realistic Resize number!");
        return;
    if(Number(win.g14.et1a.text) <10) {
        alert("Please enter a realistic Resize number!");
        return;
    if(win.g50.dd1.selection.index == 1 && win.g55a.et1.text == ''){
        alert("No Prefix Has Been Entered!");
        win.g55a.et1.active=true;
        return;
    if(win.g50.dd1.selection.index == 2 && win.g55b.et1.text == ''){
        alert("No Suffix Has Been Entered!");
        win.g55b.et1.active=true;
        return;
    if(win.g50.dd1.selection.index == 3 && win.g55c.et1.text == ''){
        alert("No Sequence Number Has Been Entered!");
        win.g55c.et1.active=true;
        return;
    if(win.g50.dd1.selection.index == 4 && win.g55d.et1.text == ''){
        alert("No File Name Has Been Entered!");
        win.g55d.et1.active=true;
        return;
    if(win.g50.dd1.selection.index == 4 && win.g55d.et2.text == ''){
        alert("No Sequence Number Has Been Entered!");
        win.g55d.et2.active=true;
        return;
Prefs.folder = decodeURI(outputFolder);
Prefs.Width = Number(win.g14.et1.text);
Prefs.Height = Number(win.g14.et1a.text);
Prefs.quality = parseInt(win.g14.dd1.selection.index);
Prefs.type= parseInt(win.g3.dd1.selection.index);
if($.os.match(/windows/gi)){
if(Templates.length > 0) {
Prefs.template = parseInt(win.g18.dd1.selection.index);
PrefsFile.open('w');
PrefsFile.write(Prefs.toSource());
PrefsFile.close();
    win.close(1);
    process();
win.center();
result = win.show();
function process(){
var folders =[];
if(win.g3.cb1.value){
var topLevel = Folder(app.document.presentationPath);   
folders = FindAllFolders(topLevel, folders);
folders.unshift(topLevel);
var Quality = parseInt(win.g14.dd1.selection.index);
var ResizeW = Number(win.g14.et1.text);
var ResizeH = Number(win.g14.et1a.text);
var sels =[];
Count = 0;
mask = win.g3.dd1.selection.text.toLowerCase();
if(win.g3.rb1.value) {
    sels = app.document.selections;
   processSels();
if(!win.g3.rb1.value &&  !win.g3.cb1.value){
app.document.deselectAll();  
sels = app.document.getSelection(mask);
processSels();
if(!win.g3.rb1.value &&  win.g3.cb1.value){//use subfolders
mask = "*."+ win.g3.dd1.selection.text.toLowerCase();
for(var k in folders){
sels = folders[k].getFiles(mask);
processSels();
function processSels(){
for(var z  in sels){
var Thumb1 = new Thumbnail(sels[z]);
Name = decodeURI(Thumb1.spec.name).replace(/\.[^\.]+$/, '');
var Seq1 = zeroPad((Number(Count)+Number(win.g55c.et1.text)), (parseInt(win.g55c.dd1.selection.index)+2));
var Seq2 = zeroPad((Number(Count)+Number(win.g55d.et2.text)), (parseInt(win.g55d.dd1.selection.index)+2));
var Prefix = win.g55a.et1.text;
var Suffix = win.g55b.et1.text;
var NewName = win.g55d.et1.text;
app.synchronousMode = true;
if(win.g12.cb1.value){
Thumb1.core.fullsize.fullsize;
}else{
    Thumb1.core.preview.preview;
app.synchronousMode = false;
var md = Thumb1.synchronousMetadata;
md.namespace = "http://ns.adobe.com/tiff/1.0/";
var orientation = md.Orientation.replace(/(\w+)(\s+)(.)(\d+)(.)/,"$3$4");
orientation = orientation.replace(/°/,'');
orientation = orientation.replace(/Rotate/,'');
if(orientation == 'Normal') orientation =0;
var bm = undefined;
if(win.g12.cb1.value){
bm = Thumb1.core.fullsize.fullsize;
}else{
    bm = Thumb1.core.preview.preview;
if(bm.width != undefined) bm = bm.rotate(orientation);
if(win.g14.cb1.value){
if(bm.width > bm.height){
var maxSize = Math.max(bm.height,bm.width);
var minSize =Math.min(ResizeW,maxSize);
if(minSize < maxSize) bm = bm.resize(minSize,BitmapData.bicubicSharper);
}else{
    var maxSize = Math.max(bm.height,bm.width);
    var minSize =Math.min(ResizeH,maxSize);
if(minSize < maxSize) bm = bm.resize(minSize,BitmapData.bicubicSharper);
var parts = Thumb1.name.match(/(.*)\.([^\.]+)/); 
switch(Number(win.g50.dd1.selection.index)){
    case 0 : saveFile =  Name; break;
    case 1 : saveFile =  Prefix + Name; break;
    case 2 : saveFile =  Name + Suffix; break;
    case 3 : saveFile =  Name + Seq1; break;
    case 4 : saveFile =  NewName + Seq2; break;
    default : break;
if(win.g10a.cb1.value) outputFolder =app.document.presentationPath;
bm.exportTo(new File(outputFolder +"/"+ saveFile +".jpg"),(Quality+1));
Count++;
if($.os.match(/windows/gi)){
if(win.g12.cb2.value){//set resolution
var res = Number(win.g12.et1.text);
var t = new Thumbnail(new File(outputFolder +"/"+ saveFile +".jpg"));
var mdata = t.synchronousMetadata;
mdata.namespace = "http://ns.adobe.com/tiff/1.0/";
mdata.XResolution =res*1000 +"/1000";
mdata.YResolution =res*1000 +"/1000";
mdata.ResolutionUnit =1;
if(win.g18.cb1.value){
var t = new Thumbnail(new File(outputFolder +"/"+ saveFile +".jpg"));
var mdata = t.synchronousMetadata;
mdata.applyMetadataTemplate(win.g18.dd1.selection.text, "replace");
    if(result == 1) alert("All done!");
function ReturnUniqueSortedList(ArrayName){
var unduped = new Object;
for (var i = 0; i < ArrayName.length; i++) {  
unduped[ArrayName[i]] = ArrayName[i];
var uniques = new Array;
for (var ki in unduped) {
   uniques.push(unduped[ki]);
uniques.sort();
return uniques;
function FindAllFolders( srcFolderStr, destArray) {
    var fileFolderArray = Folder( srcFolderStr ).getFiles();
    for ( var i = 0; i < fileFolderArray.length; i++ ) {
        var fileFoldObj = fileFolderArray[i];
        if ( fileFoldObj instanceof File ) {           
        } else {
         destArray.push( Folder(fileFoldObj) );
        FindAllFolders( fileFoldObj.toString(), destArray );
    return destArray;
function zeroPad(n, s) {
n = n.toString();
while (n.length < s) n = '0' + n;
return n;

The latest version is here:-
http://www.scriptsrus.talktalk.net/BridgeProcessor.htm
This is WINDOWS ONLY, this script will NOT work on a Mac!

Similar Messages

  • When i try and open the auto cad Lt that i just downloaded i get this error The directory may be locked by another process or have been set Read Only. Directory: '/Users/hockaday' Please correct this problem and press OK to exit the application.

    i get this error why i try and open the auto cad that i just downloaded
    The directory may be locked by another process or have been set Read Only.
    Directory: '/Users/hockaday'
    Please correct this problem and press OK to exit the application.

    I did install it in the admin account.  Actually the computer has four accounts, one for my husband, where I installed it.  One for me which also is set to admin, one is called TEST and has nothing in it and one is guest user.
    I don't know how AutoCad is interfacing with the account.  That is why I am not sure what to do about it.  I read other threads in various places and some seemed to point to something having to do with having multiple users.  The solutions were not clear.  I was hoping someone else had this problem and could tell me what to do.  I tried apple support but no help.  I have not tried AutoCad yet as I assumed they wont help since this is a free educational version of their product.

  • Updated my iPhone5 to the latest version and now I cannot receive email.  Please correct this update.

    Anyone else have this problem..... Help please

    Did that... Still nothing. The only time I can receive email it after I reboot the phone. But that only works once,  After that I can't receive anything. Until i reboot the phone again? After that I get the circle of death.
    Any other ideas?

  • MouseMotionListener  doubt  Please correct this small program

    Write an applet to draw a red curve on a blue back ground which follows your cursor.
    Use anonymous inner classes.
    import java.applet.*;
    import java.awt.event.*;
    import java.awt.*;
    <applet code="Curve" width=200 height=100>
    </applet>
    public class Curve extends Applet {
         int x, y;
         String msg = " ";
         public void init() {
              setBackground(Color.blue);
              setForeground(Color.red);
              addMouseMotionListener(new MouseMotionAdapter(){
                   public void mouseMoved(MouseEvent me) {
                        msg = "*";
                        x = me.getX();
                        y = me.getY();
                        showStatus("x="+x+" "+"y="+y);
                        repaint(x, y, 1, 1);
         public void paint(Graphics g) {
              g.drawString(msg,x, y);
    This program is not working as expected.

    DOUBLE POST?
    Reply here: http://forum.java.sun.com/thread.jspa?threadID=779055

  • What recordset now called can somebody please correct this code? MIchael Horton

    Private Sub ShowRecord_Click()
    Dim rst As DAO.Recordset
    Set rst = [Forms]![Assets].RecordsetClone
    rst.FindFirst "InvestID=" & List2
    [Forms]![Assets].Bookmark = rst.Bookmark
    DoCmd.Close acForm, "GoToRecordDialog"
    End Sub

    You can cater for Nulls by executing the code conditionally.  Also it's advisable to examine the NoMatch property before synchronizing the bookmarks, e.g.
    Const MESSAGETEXT1 = "No asset selected."
    Const MESSAGETEXT2 = "No matching record found."
    Dim frm as Form
    Set frm = Forms("Assets")
    If Not IsNull(Me.List2) Then
       With frm.RecordsetClone
           .FindFirst "InvestID = " & Me.List2
           If Not .NoMatch Then
               frm.Bookmark = .Bookmark
               DoCmd.Close acForm, Me.Name
           Else
               MsgBox MESSAGETEXT2, vbInformation, "Warning"
           End if
        End With
    Else
        MsgBox MESSAGETEXT1, vbExclamation, "Invalid Operation"
    End If
    This does assume of course that the list box's bound column is that containing the InvestID values.
    PS:  It also assumes that the list box is not a multi-select control.
    Ken Sheridan, Stafford, England

  • Please correct this

    select a. b_name, b.VESSEL ,b.vessel_date, sum(nvl(b.qty,0)) Econt_QTY,
         x.b_name,y.vessel,y.vessel_date, sum(nvl(y.iqty,0)) Issue_qty
                             from mol_exp a, sub_mol_exp b,
                             mol_issue x , sub_mol_issue y
    where a.mexp_no = b.mexp_no
         and x.alcexp_no = y.alcexp_no
         and b.vessel = y.vessel
    group by a. b_name, b.VESSEL ,b.vessel_date,
              x.b_name,y.vessel,y.vessel_date
    --b.qty = 1000
    -- y.iqty = 500 but it is showin 1000 any one guid me why it is happning.

    your 2nd query is working but it is also adding quantity 2 times.
    actual quantity I have 202 but returning 404.
    no doubt you people are very intelligen dont have data and solving my problem
    Thank you so much all of you.
    I used this cursor in when button press trigger now it is working fine
    DECLARE
         CURSOR repo
         IS
    select a. b_name,a.p_name, b.VESSEL , sum(nvl(qty,0)) EXP_QTY from mol_exp a, sub_mol_exp b
    where a.mexp_no = b.mexp_no
    group by a. b_name,b.vessel, a.p_name;
    V_b_name               mol_exp.b_name%TYPE;
    v_p_name               mol_exp.p_name%type;
    v_vessel               sub_mol_exp.vessel%type;
    v_C_qty                    sub_mol_exp.qty%type;
         BEGIN
    OPEN repo;
    LOOP
         FETCH repo INTO v_b_name,v_p_name,v_vessel,v_c_qty;
    EXIT WHEN repo%NOTFOUND;
                                  insert into exp_report (buyer, p_name, vessel, cont_qty)
                                       values (v_b_name, v_p_name, v_vessel , v_c_qty);
    END LOOP;
         CLOSE repo;
         END;
         --- Export (Issue)
    DECLARE
         CURSOR repo
         IS
    select a.b_name,a.p_name,b.vessel,b.vessel_date, sum(nvl(iqty,0)) Issue_qty from mol_issue a , sub_mol_issue b
    where a.alcexp_no = b.alcexp_no
    group by a.b_name,b.vessel,b.vessel_date,a.p_name;
    V_b_name               mol_issue.b_name%TYPE;
    v_p_name               mol_issue.p_name%type;
    v_vessel               sub_mol_issue.vessel%type;
    v_vessel_date     sub_mol_issue.vessel_date%type;
    v_e_qty                    sub_mol_issue.iqty%type;
         BEGIN
    OPEN repo;
    LOOP
         FETCH repo INTO v_b_name, v_p_name, v_vessel, v_vessel_date, v_e_qty;
    EXIT WHEN repo%NOTFOUND;
                                  update exp_report set vessel_date = v_vessel_date, exp_qty = nvl(v_e_qty,0)
                                  where vessel= v_vessel;
    END LOOP;
         CLOSE repo;
         END;
    Edited by: Kami on Sep 21, 2008 10:34 PM

  • How can Firefox state that it is going to discontinue support for 3.6.17 when Mac OS 10.4.X cannot accept Firefox 4? This whole situation is crazy. Someone at Firefox please correct this insanity.

    WE cannot download Firefox 4 because it is not compatible with Mac OS 10.4.11.

    There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox

  • Any one  please correct  this code it is not giving the result as expected.

    class image {
         public int[][] data;
         public int rows;
         public int columns;
    public class BlurImage {
    public int function1(image i1,int k,int j,int rad)
                   int sum=0;
                   int count=0;
                   int R=0,G=0,B=0;
                   String s=new String();
                   for(int x=k-rad;x<=k+rad;x++)
                        if(x<0 || x>=i1.rows)
                             continue;
    for(int y=j-rad;y<=j+rad;y++)
                             if(y<0 || y>=i1.columns)
                                  continue;
    s=Integer.toHexString(i1.data[x][y]).substring(4,6);
                             B=B+Integer.valueOf(s, 16).intValue();
                             s=Integer.toHexString(i1.data[x][y]).substring(2,4);
                             G=G+Integer.valueOf(s, 16).intValue();
                             s=Integer.toHexString(i1.data[x][y]).substring(0,2);
                             R=R+Integer.valueOf(s, 16).intValue();
    count++;
                   R=R/count;
                   G=G/count;
                   B=B/count;
                   System.out.println(" ");
                   String s1=new String();
                   s1=Integer.toHexString(R).concat(Integer.toHexString(G));
                   s1=s1.concat(Integer.toHexString(B));
                   System.out.println(Integer.valueOf(s1, 16).intValue()+" ");
                   return Integer.valueOf(s1, 16).intValue();
    public image blur_image(image i, int radius) {
              //Write your code here
              if(i.rows<radius || i.columns<radius)
                   return null;
              image i1 = new image();
              i1.rows=i.rows;
              i1.columns=i.columns;
              i1.data=new int[i.rows+1][i.columns+1];
              for (int k = 0; k < i.rows; k++)
              for (int j = 0; j < i.columns; j++)
                        if(i.data[k][j]>0xFFFFFF)
                             return null;
                        i1.data[k][j]=(int)function1(i,k,j,radius);
              return i1;
    public static void main(String[] args) {
    //TestCase 1
    try {
    image i = new image();
    i.rows = 5;
    i.columns = 3;
    i.data = new int[][]{{6, 12, 18}, {5, 11, 17}, {4, 10, 16}, {3, 9, 15}, {2, 8, 14}};
    BlurImage obj = new BlurImage();
    image res = obj.blur_image(i, 2);
    System.out.println("TestCase 1");
    if (res != null) {
    for (int k = 0; k < i.rows; k++) {
    System.out.println();
    for (int j = 0; j < i.columns; j++) {
    System.out.print(res.data[k][j] + ",");
    } else
    System.out.println("NULL");
    catch (Exception e) {
                   e.printStackTrace();
    //TestCase 2
    try {
    image i = new image();
    i.rows = 3;
    i.columns = 5;
    i.data = new int[][]{{0x5a0060, 0x6a0050, 0x6a0050, 0x6a0050, 0x7f0038},
    {0x5a0060, 0x6a0050, 0x6a0050, 0x6a0050, 0x7f0038},
    {0x5a0060, 0x6a0050, 0x6a0050, 0x6a0050, 0x7f0038}};
    BlurImage obj = new BlurImage();
    image res = obj.blur_image(i, 1);
    System.out.println("\nTestCase 2");
    if (res != null) {
    for (int k = 0; k < i.rows; k++) {
    System.out.println();
    for (int j = 0; j < i.columns; j++) {
    System.out.print(Integer.toHexString(res.data[k][j])+ ",");
    } else
    System.out.println("NULL");
    catch (Exception e) {
    e.printStackTrace();
    It should give the output as:------
    test case 1:-
    [ 11, 11, 11 ]
    [ 10, 10, 10 ]
    output.data = [ 10, 10, 10 ]
    [ 9,    9,   9  ]
    [ 9,    9,   9  ]
    test case 2:-
    [ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 ]
    output.data = [ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 ]
    [ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 ]

    public class Test
         public static void main(String args[])
              throws Exception
              System.out.println("[ 10, 10, 10 ]");
    }I'll let you customize the above code for test case 2.
    There is not a single comment in the code. We have no idea what the code is supposed to do. We have no idea what you think is wrong. Therefore the above solution is the best we can provide.

  • Could you correct this 4-lines-script please?

    Hi guys!
    I've some troubles with this script...
    [CODE]
    tell application "iTunes"
    set some_items to the selection
    do shell script "chmod a-w " & quoted form of POSIX path of (some_items as alias)
    end tell
    [CODE]
    Where is the fatal error? (In Finder it works succesfully..)
    Tks in advance..:))

    You can directly edit a file in AppleScript, for example:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    set someLyrics to "blah blah blah
    blah blah blah"
    set theFile to (path to desktop as text) & "test.txt"
    set fileRef to (open for access file theFile with write permission) --fileRef is used to reference the file
    write ((current date) as text) to fileRef
    write return to fileRef
    write someLyrics to fileRef
    close access fileRef --be sure to close the file </pre>
    If you want to append to an existing file, you need to write beyond the existing contents (eof=end of file):
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    set someLyrics to "blah blah blah
    blah blah blah"
    set theFile to (path to desktop as text) & "test.txt"
    set fileRef to (open for access file theFile with write permission) --fileRef is used to reference the file
    write ((current date) as text) to fileRef starting at eof
    write return to fileRef starting at eof
    write someLyrics to fileRef starting at eof
    close access fileRef --be sure to close the file </pre>
    There's quite a bit more to this subject, but if you need to ask further questions I would encourage you to post these separately to get the widest audience / quickest response.

  • Please help me to correct the script

    I try to write a script by my slef, but not work
    app.findGrepPreferencest = firstLineIndent:8, leftIndent:8;
    app.changeGrepPreferences = firstLineIndent:8, leftIndent:16;
    app.changeGrep();
    app.findGrepPreferences = app.changeGrepPreferences = null;
    Can someone please help me to correct the script, please.

    both two script are working
    but waht if I change the script into this format?
    function(){
    app.findGrepPreferences.firstLineIndent  = "8 mm";
    app.findGrepPreferences.leftIndent  = "8 mm";
    app.changeGrepPreferences.firstLineIndent  = "8 mm";
    app.changeGrepPreferences.leftIndent  = "16 mm";
    app.selection[0].changeGrep();
    app.findGrepPreferences.firstLineIndent  = "8 mm";
    app.findGrepPreferences.leftIndent  = "16 mm";
    app.changeGrepPreferences.firstLineIndent  = "8 mm";
    app.changeGrepPreferences.leftIndent  = "24 mm";
    app.selection[0].changeGrep();
    and then so on,
    Can it works?

  • Outlook to iPhone sync failure – Sync suddenly stopped working for calendar events but continued for contacts and notes.   Finally Fixed!!!  SUPPORT TEAM – PLEASE SEE THIS – Complete explanation of cause and correction steps.

    The issue:  Outlook to iPhone sync failure – Sync suddenly stopped working for calendar events but continued for contacts and notes.   Finally Fixed!!! 
    SUPPORT TEAM – PLEASE SEE THIS – Complete explanation of cause and correction steps.
    The cause:  It is now clear what caused this problem.  For years I had several “all-day” events in my Outlook calendar (birthdays, anniversaries, etc.).  In May 2012 I decided to make some of them one hour  events so I could add alerts to remind me of the event.  I did this by dragging them in Outlook to the time I wanted and expanding them to the time slot desired and then adding the alarm.
    The symptom:  Syncing stopped working for the calendar but continued working for contacts and notes.  I didn’t realize sync was failing until months later when I missed two very important phone calls, so when I noticed it the cause was not obvious. 
    The failed attempts:  I’m head of a software firm and my calendar sync is a crucial to my business life so I took this on with a vengeance.  From a quick look at events in Outlook and the iPhone I could see that the problem started in May 2012.  Events before May were in both Outlook and the iPhone but events after May were only one or the other.  Unfortunately I had changed several other things at the same time relating to other events so again the cause was not obvious.  MANY calls with AppleCare proved them incompetent so my internal IT guys assisted trying many things.  We tried a huge number of calendar changes and several versions of iTunes, iPhone OS and Office as well as both iPhone 4 and 5, all without success.
    The fix:  After 18 months of frustration, MANY  hundreds of $ expense and MANY hours of wasted time I saw a blog that had a calendar sync  problem and it indicated all day events were related.  I changed the display of the Outlook calendar to the list view, added columns so I could see “all day” event check marks as well as times of events,  sorted on the “all day” event column to move them to the top, and for all events that were “all day” events AND had a start and end time, I removed recurrence and then added the annual recurrence back…
    After I fixed all events that had BOTH “all day” set and had a start/end time, I tried another sync.  It synced for the first time in 18 months! 
    Problem occurred May 2012 – fixed Nov 2013

    Hi, to remove dummy '_ModGrp' entries, rather than crashing the 'Suppr' key on your keyboard, you can use this basic VBA macro (launched for instance from Excel).
    It will recursively remove all '_ModGrp...' folders
    Sub RemoveFolders_Click()
        Dim oOutlook As Outlook.Application
        Set oOutlook = New Outlook.Application
        Set objNameSpace = oOutlook.GetNamespace("MAPI")
        Call CleanFolders(objNameSpace.Folders)
    End Sub
    Sub CleanFolders(objFolders As Outlook.Folders)
        For i = objFolders.Count To 1 Step -1
            If Left(objFolders(i).Name, 7) = "_ModGrp" Then
                objFolders.Remove( i )
            Else
                If Not objFolders(i).Folders Is Nothing Then
                    Call CleanFolders(objFolders(i).Folders)
                End If
            End If
        Next i
    End Sub

  • HT1848 I cannot authorize my computer, I'm having this error message The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed." please hel

    cannot authorize my computer, I'm having this error message The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed." please help me

    Doublechecking. In the course of your troubleshooting to date, have you worked through the instructions from the following document?
    iTunes: Missing folder or incorrect permissions may prevent authorization

  • I AM STRUGGLINT TO ACCESS MY IPHOTO'S AND HAVE TO GO THROUGH APPLICATIONS TO ACCESS MY PHOTOS. HOW CAN I CORRECT THIS PLEASE. DOES THE MAC HAVE A DEFRAG?  TX

    I am having problems viewing my iPhoto from the dock and have to go through my applications to view. What do I have to do to correct this please? Also does the Mac have a defrag function? I have also been advised by the sales person that the Mac does not need an antivirus programme, is this true?

    I'm sorry but your post make no sense
    first off All Caps is not necessary and makes things hard to read and is consider shouting - it is rude
    Second you do not have "an iPhoto" - iPhoto is an application that manages photos - the photos are stored (by default) in the iPhoto library in a SQL lite database and you use the iPhoto program to manage them
    I am having problems viewing my iPhoto from the dock and have to go through my applications to view.
    can you please explain this in some detail. When you launch iPhoto by clicking on the iPhoto icon in the Dock what happens?
    As to your other OS questions this is certainly not hte best place to address them - we are iPhoto users just like yourself here  ---  basically as I understand it (and I have had had Macs for 30+ years) there is no "defrag and you do not need one - and antivirus is your choice - most people feel it is a waste of money on a Mac but some like to have it
    LN

  • APP-ALR-04106: Please correct the user-defined SQL statement for this alert

    Hi All,
    I have created an alert for engineering module in R12. It got tested and was working fine. when the user testing it, while trigger the alert getting the error, "APP-ALR-04106: Please correct the user-defined SQL statement for this alert".
    when verified the alert, it got verified and ran also. It parsed the query successfully and when run it fetched few records.
    Need help in resolving the issue.
    Thanks in advance.
    Regards,
    sri
    Edited by: user10939296 on Jan 18, 2010 1:16 AM

    Hi Sri;
    I have already gone through the Note: 948037.1. But this note is related to 11i. The solution provided in the Note is for 11i.
    I am facing this issue in R12. Is this patch applicable to R12?I belive its not. But u can check Solution part 4 for your instance, at least it can give you idea. The other note in metalink related bug and all for R11 too.
    I belive its better way to rise Sr while waiting other forum user response to that thread
    Regard
    Helios

  • Since installing the newest version of Firefox 4.0, I am unable to access my work e-mail which uses Lotus Domino Web Access. Can anyone please tell me how to correct this problem?

    Since installing the newest version of Firefox 4.0, I am unable to access my work e-mail which uses Lotus Domino Web Access. Can anyone please tell me how to correct this problem?

    Sheesh. That looks hard. I think it will fall over at this point:
    "Connect to my Exchange mailbox using HTTP" 'cos Thunderbird uses only the regular email protocols: POP, IMAP and SMTP.
    Here (at work) we have in the past have had IMAP and SMTP enabled on our Exchange server so Thunderbird could then connect just like to any other regular internet-based service.
    With the change here to outlook365/outlook 2010 I've had to switch to using DavMail which lets Thunderbird talk to the mail server using OWA.
    I haven't (seriously) tried Exquilla. Whilst I have great respect for its author and some of his other add-ons, I saw no reason to use an add-on that required payment when DavMail works for free.

Maybe you are looking for

  • Problem in loading an external file with unicode name

    Hi, I am working on a project which involves loading of an external file with unicode name for ex: "插入音乐.mp3 ,插入音乐.jpg". These unicode files are loaded successfully when I play/publish the movie with flash player alone. But when the movie is embedded

  • When Scaling Image, Cannot See All Of Image

    I want to allow the user to zoom into an image. Using drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) achieves this, however it displays the scaledImage on background that is of the same size as the original image. i

  • How to save contents of JPanel to an image file

    Hi, I am using a JPanel to display some primitive shapes(line, circle,etc.) and I need to save the contents of this panel to disk as an image file (JPEG, bitmap, TIFF, etc.). Have searched jdc but've found no feasible results. I would really apprecia

  • How do i calibrate monitor?

    Hi all, wondering if there's a way to calibrate my monitor from PS (CS4)? Something like selecting some color profile or such...? Because the colors now on my screen are significantly less green than they actually are (which i can see on another comp

  • "You have been signed out," Signing out as soon as...

    Hello, Starting today, my skype will log me out almost immediately after I log in, leaving the message, "You have been signed out." After several searches, I tried multiple solutions, including updating Skype, re-downloading it, resetting my password