Undefined function DAQmxSetAIADCTimingMode

I have a creative process, installation, read and stop of typical task in VB6 code. The acquisition part is shown below. This code fails to compile when I include the call of synchronization (in bold). Sub or Function not found. If I remove the line in bold code runs correctly and acquires data. However, the default mode is HighResolution and I want HighSpeed.

Note that all the functions and Mode Timing constants appear in NIDAQmx.h, and I can actually get this device work in high resolution or high speed mode using python. However I prefer not having to rewrite the entire VB6 application following a single function call if I can avoid it.

So why this function is not? BTW - I use DAQmx 14.2 on Windows XP 32-bit

' create task

DAQmxErrChk DAQmxCreateTask("", taskHandle)

'Add an input thermocouple analog channel to the task.
DAQmxErrChk DAQmxCreateAIThrmcplChan(taskHandle, "cDAQ-9214/ai:0", "", minTemp, maxTemp, DAQmx_Val_TemperatureUnits1_DegC, _)
DAQmx_Val_ThermocoupleType1_J_Type_TC, DAQmx_Val_CJCSource1_BuiltIn, 25, "")

' set timing
DAQmxErrChk DAQmxSetAIADCTimingMode (taskHandle, Ksystem.txtAIDev.Text, DAQmx_Val_HighSpeed)

"Configure the task for the acquisition of the finished sample and read in the data."
DAQmxErrChk DAQmxCfgSampClkTiming (taskHandle, "OnboardClock", frequency, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_FiniteSamps, numSampsPerChannel)

"Set up needed memory space
DAQmxErrChk DAQmxGetTaskNumChans (taskHandle, numChannels)
arraySizeInSamps = numSampsPerChannel * numChannels
ReDim data (arraySizeInSamps)

"Start the task and to read the data.
DAQmxErrChk DAQmxStartTask (taskHandle)
DAQmxErrChk DAQmxReadAnalogF64 (taskHandle, numSampsPerChannel, timeout, fillMode, data (0), arraySizeInSamps, sampsPerChanRead, ByVal 0 &)

"Call the StopTask module to shut down the DAQmx task.
DAQmxErrChk DAQmxStopTask (taskHandle)
DAQmxErrChk DAQmxClearTask (taskHandle)

I managed to solve this problem and put the solution here in case its value to anyone.

I ended up declaring the function and the call of the NIDAQmx (nicaui.dll) dll directly as follows. Worked a treat with a synchronization mode.

Statement at the top of the form code

' original function header and enumerations can be found in NIDAQmx.h
' int32 __CFUNC DAQmxSetAIADCTimingMode (TaskHandle taskHandle, const char [channel], data int32);
'
Private Declare Function DAQmxSetAIADCTimingMode Lib "" nicaiu. "» DLL"(ByVal taskHandle As Long, ByVal channel As String, ByVal Val As Long) As Long
Const DAQmx_Val_HighSpeed As Long = 14712
Const DAQmx_Val_HighResolution As Long = 10195

Function call

"See the function DAQmxSetAIADCTimingMode in the top declaration
DAQmxErrChk DAQmxSetAIADCTimingMode (taskHandle, myChannel, DAQmx_Val_HighSpeed)

Tags: NI Software

Similar Questions

  • receive the following error code when searching for a piece of music I did several times without a music problem but have recently updated Firefax: Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13

    I am in the page web http://www.songarea.com/ and after searching a piece of music, I get the following error message:
    "Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13.
    I did this several times before without a problem, but have recently updated Firefox with the Skype add-on and wonder if the two things are related.

    URL of affected sites

    http://www.songarea.com/

    Hi John,.

    It is an error message from the web server providing this site. Specifically, it is something wrong with their PHP code.

    It is not browser specific and would go into another browser besides Firefox.

    You will need to contact the webmaster of this site to report this problem. A quick test does not show this problem, but you do not specify what search query, you tried:

    http://www.songarea.com/music-codes/test.html

  • Fatal error: Call to undefined function get_header() in /home/rascal98/public_html/index.php on line 1.

    I received this message: Fatal error: Call to undefined function get_header() in /home/rascal98/public_html/index.php on line 1.  This has happened after that I tried to load a model of Web site using FTP Filezilla.  I asked advice of HostGator support, but offered only man I should have a backup.  Not much help at the moment.  I may be in the last two days charged that more than just a Web site template to the same file or directory public_html, it is called. I tried to reverse all this leaving the Site Manager to erase all files.  That did not help.  I'm stuck because I can't establish a few areas I need.  The terminology "fatal error" was quite worried.

    Hi rascal98,

     

    Welcome to Microsoft Answers Forums.

    The question you have posted is related to the area and would be better suited to the TechNet community. Please visit the link below to find a community that will provide the best support.

    http://social.msdn.Microsoft.com/forums/en-us/category/iedevelopment/

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Call to undefined function getsqlvaluestring() with PHP mysql Dreamweaver

    Hey guys, I'm new to the forum and it seems very useful. I think I have a unique problem well.

    Although this script worked for a year or two, all of a sudden, during the holidays, he went to hay

    Front end is always get all the information, it must be the Database.But when I try to connect through the side admin I created with php and database of dreamweaver extensions normal I get this error.

    I do not know many php - then I'll hide the chain at the moment - if I need to paste the code that I'll - thank you in advance


    Fatal error
    : Call to undefined function getsqlvaluestring() in /xxxxx/xxxx/xxxxxxx/xxxxxxx/newsletters/xxxxxxx/xxxxxxx/admin/login.php on line 22

    Vicinity of line 22 looks like this

    @mysql_select_db ($database_promocenter, $promocenter);

    $LoginRS__query = sprintf ("SELECT username, password, destination_page FROM users WHERE username = %s AND password is %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "int"));

    $LoginRS = mysql_query ($LoginRS__query, $promocenter) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    First part looks like this

    < form id = "form1" name = "form1" method = "POST" action = "<?" PHP echo $loginFormAction;? > ">"
    < b >
    < td bgcolor = "#dedede" >
    < table width = "400" border = "0" align = "center" cellpadding = '3' cellspacing = "0" bgcolor = "#ffffff" >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > user name: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="username"type ="text"id ="username"size ="35"/ >"
    < / label > < table >
    < /tr >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > password: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="password"type ="password"id ="password"size ="35"/ >"
    < / label > < table >
    < /tr >

    Anton

    Could also show you it could never work.  Why?  Because the call to the function is made before the function is defined.  He would always stop execution with an undefined function error.

    Now - it seems that you have added the users authentication that was placed before the code block in which the function is defined.  So I would say that you move it-

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="" {="" 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    from its current location to a new block just under the connection with the directive, i.e.,.

    MOVE HERE ? >

    <>

    Validate request to connect to this site.

    so that the final code looks like this-

    <>

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    ?>

    <>

    Validate request to connect to this site.

  • Undefined function!

    Hi all!
    First of all, I'll give you the code I'm having the problem on:

    import flash.events.MouseEvent; stop() start_btn.addEventListener(MouseEvent.CLICK, startclicked); function startclicked(e:MouseEvent):void {     gotoAndStop(10) } object1.addEventListener(MouseEvent.MOUSE_OVER, overobject1) object2.addEventListener(MouseEvent.MOUSE_OVER, overobject2) object3.addEventListener(MouseEvent.MOUSE_OVER, overobject3) function overobject1(e:MouseEvent):void {     moveobject1(); } function overobject2(e:MouseEvent):void {     moveobject2(); } function overobject3(e:MouseEvent):void {     moveobject3(); } this.stage.addEventListener(Event.ENTER_FRAME, moveMyObjects); function moveMyObjects(event:Event):void {     function moveobject1() {     object1.x -= (object1.x - mouseX) / 3;     object1.y -= (object1.y - mouseY) / 3;     }     function moveobject2() {     object2.x -= (object2.x - mouseX) / 3;     object2.y -= (object2.y - mouseY) / 3;     }     function moveobject3() {     object3.x -= (object3.x - mouseX) / 3;     object3.y -= (object3.y - mouseY) / 3;     } }

    The idea is so when I move my mouse over one of these objects, they begin to follow the pointer.
    I get these errors below:

    Scene 1, Layer 'Actions', frame 1, line 14 1180: call to a method may be undefined moveobject1.
    Scene 1, Layer 'Actions', image1, line 17 1180: call to a method may be undefined moveobject2.
    Scene 1, Layer 'Actions', image1, line 20 1180: call to a method may be undefined moveobject3.

    Have not, I defined the methods based on the moveMyObjects?
    Can someone help me to realize the idea of this way (with the corrected code) or another way (perhaps using a table )
    Thanks in advance.

    MovieClips, buttons, any... try this and tell me what he does want to make...

    Object1.addEventListener (MouseEvent.MOUSE_OVER, overobject)
    object2.addEventListener (MouseEvent.MOUSE_OVER, overobject)
    Object3.addEventListener (MouseEvent.MOUSE_OVER, overobject)

    function overobject(e:MouseEvent):void {}
    e.currentTarget.addEventListener (Event.ENTER_FRAME, moveMyObject);
    }

    function moveMyObject(event:Event):void {}
    event.currentTarget.x = (event.currentTarget.x - mouseX) / 3;
    event.currentTarget.y = (event.currentTarget.y - mouseY) / 3;
    }

  • CONCAT is undefined function

    I make the following query (Access db), but his throw one error, is there an alternative to CONCAT?

    SELECT Job_ads.*, Job_ads.ID & ' |' & Job_ads.image & ' |' & Job_ads. ALT
    AS Jobsadstr

    (the above code does)

    Thanks for your help.

    Katie

  • PXI-5112 with XP, LV 2010 (and the determination of review)

    Just found an old PXI-5112. I could do great with this card things if I could make it work.

    When I first plugged it to my PXI chassis, it was detected in MAX as a device of NOR-DAQ traditional with the latest version of NOR-DAQ traditional (7.4.4). However, when I tried to open a test Panel on this subject, I received a message that the device "failed the test". If I open the Panel test in any case, I get an error-10840 (soft error).

    I called OR support on this subject and the engineer found this article in the knowledge base for me:

    http://digital.NI.com/public.nsf/allkb/E956B50E8E0FC44E86256B030062CA2E

    I then tried to determine my Board review. I read the first issue I've found which corresponded to the model. It was on a sticker on the side rear of the Council and read "702864 A-01". This vignette, we determined that my Board is A revision.

    I tried following the advice that knowledge base article and install OR-DAQ 6.7.0 and 1.6 NO-SCOPE. With this combination, I can load up the SCOPE screws with LV 8.2.1, but when I try to run an example VI on my device, "DAQ::6", it fails to initialize the jury with "method or function not defined", or something like that. With NEITHER-DAQ 6.8.1 and 1.6 NO-SCOPE, I get a lot of impossible to find DLL errors attempting to perform the SCOPE of EIS. With NEITHER-DAQ 7.4.4 and 1.6 NO-SCOPE, I get the same old "Undefined function or method. If I try to run the VI on the wrong channel, like "DAQ::1", I get 'Device does not exist', he seems to recognize the device, just not being able to do something with it.

    I'm about to give up on this, but I just realized that there are FIVE different numbers printed on my Board which match the pattern in this knowledge base article.

    White sticker on chip on the back: 702864A - 01 Copyright 2000 NI

    Yellow sticker on chip on the back: 703058A - 01

    Printed in black on the login Panel: C 186030-01 REV1

    Printed in white on the back of the PCB: 184196E-01

    Printed in white on the front of the PCB: ASSY184194E-01

    There is also a label with bar code with C3297D, which I think is the serial number. The guy NOR tried searching but couldn't find anything.

    An interesting thing in particular on these numbers is that the ASSY184194E-01 contains the same exact number that is given as an example in this article in the knowledge base for a tray of Rev E: 184194E-01

    I have two questions, if anyone can help:

    1. does anyone here have a PXI-5112, Rev A or one E, in no case to work in Windows XP?

    2. which one of these numbers should I trust to identify revision of my Board? It seems like that might be either A, C or E.

    Thank you!

    Max

    Hey Maxwell,

    You are right that the serial number is C3297D, and the part number for the Board should be 184194E-01, indicating that it is revision E and is a module of 16 MB/ch PXI-5112. When you got the error, you said you had traditional-DAQ 7.4.4, but I'm not clear what version of NOR-SCOPE, you had. OR-SCOPE has been installed in the system at this time?

    If you plan to run this Board in LabVIEW 2010 on a Windows XP-based computer, you need to install OR-SCOPE 3.6.2 in order to get all the support you need. As long as you are running a 64 bit OS, the PXI-5112 should function normally. OR-SCOPE 3.6.2 is the oldest version of the driver that will support LabVIEW 2010 (it will support LabVIEW 8.5.1 and more later). Seems to me that previous errors, you have been doing are the result of incompatibilities between versions of your different software/driver. If you install this latest version of NOR-SCOPE, it must include all the right support you need (traditional-DAQ 7.4.4, OR-SCOPE 3.6.2 support for LabVIEW 2010, NOR-DAQmx 9.1.5, MAX 4.7, etc.). Unfortunately, the only way to get NO-SCOPE 3.6.2 is through the CD August 2010 device drivers (DCD). Once you start the installation, you can select always right to install NO-SCOPE and not the rest of the drivers in the package if you do not want. Of course, having the latest updates of all might not be a bad idea, or if you want to just install everything.

    Moreover, all the part numbers you listed (except the last) are parts numbers for specific elements of the PXI-5112 (Panel connection, the real PCB, CPLD chip, etc.). The assembly number is the one you are looking for. Sorry for the confusion.

    Best regards!

  • MATLAB graphics

    I update the LV6.1 to the LV2011 code that generates MATLAB graphics. When I run live naked, the code works correctly. But when I build an app, I start getting all kinds of errors on the form

    1050 error: Undefined function altplt (one of my MATLAB.) M - files) for the arguments to entry of type "double".

    The message is difficult to understand because 1) I have already sunk the entries in single precision. (2) altplt should work correctly with arguments of type "double".  and (3) the code works correctly when you run just screws

    Someone at - it ideas? Thank you.

    Hey Efarr,

    "Try this: in MATLAB select file ' Set Path... from the menu drop down. Select Add path... and add the path where your scripts to function for the MATLAB search path. So in this case simply add the entire Test field file and its subfolders.  This allowed the problem to me, I would like to know how it works for you.

  • Consuming webservice with widget Blackberry - Visual Studio dotnet

    Hi team,

    I have developed a webservice in ASP.NET and consumed it in using the Blackberry application

    HTML/JAVASCRIPT with XML HTTP REQUEST. It works very well and gives the O/P expected only when the

    Web service runs in LOCALHOST. When it's hosted Web service on a different server, I have m

    access with browser.but through the application of BLACKBERRY, unable to get the answer.

    Hearing from friends that JAVASCRIPT cant directly consume not on Web services

    LOCALHOST and the fact using WEBSERVICE behaviors (downloaded webservice. HTC) and

    After writing all the code, and then the debug gives the error to the so-called CALLSERVICE method

    undefined function , I guess that BB doesnot support webservice behavior option.

    Thus, even tried with the approach by JQUERY. It gives an error: external resources error requested resource and doesnot even run with LOCALHOST as well.

    Please help me the way out...

    Kind regards

    GOUSSARD

    Hey! I thought I did, but no jajaja

    I added the http://192.168.1.114:90 address to areas in the config.xml file an it worked!

    Yeiiii! I am so happy

    Thanks for your reply.

  • Changed changed date

    Hello

    I try to create folders and copy the file that I take. The code below works fine. But the modified date of the copied file is changed to the current date and time. Is it possible to keep the date and the old?

    function myfolder(){
        var _files = File.openDialog("Select Indesign/Illustrator file","*",true);
    if(_files==null){return;}
    myFolder = Folder.selectDialog("Choose Main folder to created subfolders");    
    if(myFolder==null){return;}
    _parent = _files[0].parent.toString().replace(_files[0].parent.parent,"");  
    var mygetname=prompt("Please enter the Event ID","");
    if(mygetname==null){return;}
    var myartname=prompt("Please enter the Part Number","");
    if(myartname==null){return;}
    var myartnamew=myartname+"_Aa"
    new Folder(myFolder + "/" + mygetname).create();  
    new Folder(myFolder + "/" + mygetname+ "/OT"+ "/" + myartnamew).create();  
    new Folder(myFolder + "/" + mygetname+ "/OT"+ "/" + myartnamew+ "/Aa").create();
    new Folder(myFolder + "/" + mygetname+ "/OT"+ "/" + myartnamew +"/Soft").create();
    _files[0].copy(new File(myFolder + "/" + mygetname+ "/OT"+ "/" + myartnamew+ "/Aa"+ "/"+myartnamew+ "/" ));
    }
    myfolder();
    

    Thank you

    K

    Perhaps the easiest way for you is moving files / folders with jsx recording dates he current before the move and then restore the dates with the function I wrote below.

    But he didn't not test if all goes well, this should work.

    $.level = 1;
    
    function changeDate(file, date) {
        var year, month, dayOfMonth, hours, minutes, command, appleDate;
    
        year = 1900 + date.getYear();
        month = pad(1 + date.getMonth());
        dayOfMonth = pad(date.getDate());
        hours = pad(date.getHours());
        minutes = pad(date.getMinutes());
        appleDate = "" + year + month + dayOfMonth + hours + minutes;
    
        command = ["try",
            "do shell script \"touch -ft " + appleDate + " '" + file + "'\"",
            "end try"
        ].join('\n');
        try {
            app.doScript(command, ScriptLanguage.APPLESCRIPT_LANGUAGE);
        } catch (e) { $.writeln(command + "\n" + e); }
        return undefined;
    
        function pad(value, digits) {
            value = "" + value;
            digits = digits || 2;
            var padding = new Array(digits + 1).join("0");
            return (padding + value).slice(value.length);
        }
    }
    
    // changeDate(new File('path/to/file').fsName, new Date('1 Jan 2000'));
    

    HTH

    Trevor

  • Brush tools like: spacing is always 25% per script

    When I try to put any tool of type brush spacing, it gets all the values, but not the spacing value [1-1000]

    Is this a bug?

    For example, when I try to put 2% a spacing value, the result will always be 25%. The same happens when I try other values. The result is 25%

    Hardness, diameter, Angle, roundness, Flipy Flipx work well, but not space

    setBrushFeatures(130, 40,undefined,undefined,2,undefined,undefined);
    
    function setBrushFeatures (Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx) {
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var appDesc = executeActionGet(ref);
        var toolDesc = appDesc.getObjectValue(stringIDToTypeID('currentToolOptions'));
        var brushDesc = toolDesc.getObjectValue(stringIDToTypeID('brush'));
        if (Diameter == undefined) Diameter = brushDesc.getDouble(stringIDToTypeID('diameter'));
        if (Hardness == undefined) Hardness = brushDesc.getDouble(stringIDToTypeID('hardness'));
        if (Angle == undefined ) Angle = brushDesc.getDouble(stringIDToTypeID('angle'));
        if (Roundness  == undefined) Roundness = brushDesc.getDouble(stringIDToTypeID('roundness'));
        if (Spacing == undefined) Spacing = brushDesc.getDouble(stringIDToTypeID('spacing'));
        if (Flipy == undefined) Flipy = brushDesc.getBoolean(stringIDToTypeID('flipY'));
        if (Flipx == undefined) Flipx = brushDesc.getBoolean(stringIDToTypeID('flipX'));
        var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID( "Brsh" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
        var desc1 = new ActionDescriptor();
        desc1.putDouble(stringIDToTypeID('diameter'), Diameter);
        desc1.putDouble(stringIDToTypeID('hardness'), Hardness);
        desc1.putDouble(stringIDToTypeID('angle'), Angle);
        desc1.putDouble(stringIDToTypeID('roundness'), Roundness);
        desc1.putDouble(stringIDToTypeID('spacing'), Spacing);  // ??????????????  Allways 25%  !!
        desc1.putBoolean(stringIDToTypeID('flipY'), Flipy);
        desc1.putBoolean(stringIDToTypeID('flipX'), Flipx);
        desc.putObject( stringIDToTypeID('to'), charIDToTypeID( "Brsh" ), desc1 );
        executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    }
    
    
    
    
    

    SuperMerlin Issued the statement in a different thrreat that defines spacing in your original script

    DESC1.putUnitDouble (stringIDToTypeID ('spacing'), charIDToTypeID('#Prc'), spacing);

    //        Features(Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx)
    //setBrushFeatures(undefined,undefined,undefined,undefined,undefined,undefined,undefined);
    //setBrushFeatures(13,0,0,100,25,0,0);       //Adobe Defaults
    //setBrushFeatures(13,0,0,100,25,true,true); //Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx
    //setBrushFeatures(13,0,0,100,25,1,0);       //Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx
    //setBrushFeatures(13,0,0,100,25,0);         //Diameter,Hardness,Angle,Roundness,Spacing,Flipy
    //setBrushFeatures(13,0,0,100,1);            //Diameter,Hardness,Angle,Roundness,Spacing
    //setBrushFeatures(13,0,0,50);               //Diameter,Hardness,Angle,Roundness
    //setBrushFeatures(13,0,45);                 //Diameter,Hardness,Angle
    //setBrushFeatures(13,50);                   //Diameter,Hardness
    setBrushFeatures(25);                        //Diameter 
    
    //==============================================================================================//
    function setBrushFeatures (Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx) {
        //A Brush tool must be the current tool
        if (!app.toolSupportsBrushes(app.currentTool)) selectBrush();  //CC 2014
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var appDesc = executeActionGet(ref);
        var toolDesc = appDesc.getObjectValue(stringIDToTypeID('currentToolOptions'));
        var brushDesc = toolDesc.getObjectValue(stringIDToTypeID('brush'));
        if (Diameter == undefined) Diameter = brushDesc.getDouble(stringIDToTypeID('diameter'));
        if (Hardness == undefined) Hardness = brushDesc.getDouble(stringIDToTypeID('hardness'));
        if (Angle == undefined ) Angle = brushDesc.getDouble(stringIDToTypeID('angle'));
        if (Roundness  == undefined) Roundness = brushDesc.getDouble(stringIDToTypeID('roundness'));
        if (Spacing == undefined) Spacing = brushDesc.getDouble(stringIDToTypeID('spacing'));
        if (Flipy == undefined) Flipy = brushDesc.getBoolean(stringIDToTypeID('flipY'));
        if (Flipx == undefined) Flipx = brushDesc.getBoolean(stringIDToTypeID('flipX'));
        var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID( "Brsh" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
        var desc1 = new ActionDescriptor();
        desc1.putDouble(stringIDToTypeID('diameter'), Diameter);
        desc1.putDouble(stringIDToTypeID('hardness'), Hardness);
        desc1.putDouble(stringIDToTypeID('angle'), Angle);
        desc1.putDouble(stringIDToTypeID('roundness'), Roundness);
        desc1.putUnitDouble( stringIDToTypeID('spacing'), charIDToTypeID('#Prc'), Spacing);
        desc1.putBoolean(stringIDToTypeID('flipY'), Flipy);
        desc1.putBoolean(stringIDToTypeID('flipX'), Flipx);
        desc.putObject( stringIDToTypeID('to'), charIDToTypeID( "Brsh" ), desc1 );
        executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    }
    function selectBrush() {
        //select brush scriptlistener code
        var idslct = charIDToTypeID( "slct" );
        var desc12 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        var ref8 = new ActionReference();
        var idPbTl = charIDToTypeID( "PbTl" );
        ref8.putClass( idPbTl );
        desc12.putReference( idnull, ref8 );
        executeAction( idslct, desc12, DialogModes.NO );
    }
    
  • UndoModes.AUTO_UNDO

    Hi guys!

    While trying to debug a script missbehaving I made on this cancellation mode.

    Can someone tell me what is its role? How is this different/similar form UndoModes.ENTIRE_SCRIPT?

    When you run a script in UndoMode.AUTO_UNDO, ID add cancellation of the script to the previous element of cancellation on the undo stack. If there is no previous item cancellation on the stack, it seems that you will not be able to cancel the action of your script.

    For example, after you manually create a new rectangle, edit > cancel displays 'Cancel add a new item.

    If you then run the script (all in automatic cancellation mode) which turns off the visibility of a layer, Edition > cancel poster always 'Cancel add a new element' - even after your script has run.

    If you are editing > cancel ("cancel add a new item") once your script is run, not only the creation of the new rectangle will be cancelled, will be so your layer settings. The cancellation for the layer settings occur as well as the cancellation of previously created.

    Here is a script that you can run after you have created a new rectangle (or other) and see how it does not affect the top item of the undo stack, after it is performed. After you run the script below, you will see that the script changes are cancelled with as well as the previous cancellation.

    // Make sure the frontmost doc has a layer named, "Layer 1" before running this script.
    app.doScript(ChangeLayerFunc, ScriptLanguage.javascript, undefined, UndoModes.AUTO_UNDO, undefined);
    function ChangeLayerFunc()
    {
         app.activeDocument.layers.item("Layer 1").visible = false;
    }
    

    I hope this helps!

    -Jim

    www.premediasystems.com

  • Why my sending form used?

    Ive tried everything, but I can't get my form to submit?

    This happens when I hit 'submit '.

    Fatal error : Call to undefined function isinjected() in /websites/123reg/LinuxPackage23/CL/OC/KD/clockdoctors.co.UK/public_html/memorials/estimate-à-email.php online 42

    But why?

    http://www.milesmemorials.com/estimator.html

    <? PHP

    If (array_key_exists ('catwebformbutton', $_POST))

    {

    $CAT_Custom_76922 = $_POST ['CAT_Custom_76922'];

    $CAT_Custom_00000 = $_POST ['CAT_Custom_00000'];

    $CAT_Custom_76926 = $_POST ['CAT_Custom_76926'];

    $CAT_Custom_76924 = $_POST ['CAT_Custom_76924'];

    $CAT_Custom_76927 = $_POST ['CAT_Custom_76927'];

    $total = $_POST ['total'];

    $CAT_Custom_76928 = $_POST ['CAT_Custom_76928'];

    $CAT_Custom_76930 = $_POST ['CAT_Custom_76930'];

    $CAT_Custom_76923 = $_POST ['CAT_Custom_76923'];

    $CAT_Custom_00006 = $_POST ['CAT_Custom_00006'];

    $CAT_Custom_00003 = $_POST ['CAT_Custom_00003'];

    $CAT_Custom_76929 = $_POST ['CAT_Custom_76929'];

    $total_crem_disbursements = $_POST ['total_crem_disbursements'];

    $CAT_Custom_76928 = $_POST ['CAT_Custom_76928'];

    $CAT_Custom_76931 = $_POST ['CAT_Custom_76931'];

    $CAT_Custom_00005 = $_POST ['CAT_Custom_00005'];

    $CAT_Custom_00001 = $_POST ['CAT_Custom_00001'];

    $CAT_Custom_00004 = $_POST ['CAT_Custom_00004'];

    $total_burial_disbursements = $_POST ['total_burial_disbursements'];

    $grand_total = $_POST ["grand_total"];

    $FirstName = $_POST ["FirstName"];

    $LastName = $_POST ['name'];

    $EmailAddress = $_POST ["EmailAddress"];

    $HomeAddress = $_POST ['HomeAddress"];

    $HomeCity = $_POST ["HomeCity"];

    $HomeState = $_POST ["HomeState"];

    $HomeZip = $_POST ['HomeZip"];

    $HomeCountry = $_POST ['country'];

    $HomePhone = $_POST ["HomePhone"];

    $CellPhone = $_POST ['portable'];

    Validate first

    If (Empty ($total) |) Empty ($Grand_Total) | Empty ($FirstName) | Empty ($LastName) | empty (dress $EmailAd) | Empty ($HomeAddress) | Empty ($HomeCity) | Empty ($HomeState) | Empty ($HomeZip) | empty ($ country of origin). Empty ($HomePhone) | Empty ($Cellphone))

    {

    ECHO ' Please make sure all fields are filled! "

    "exit";

    }

    If (IsInjected ($EmailAddress))

    {

    echo "value of Bad email!";

    "exit";

    }

    $email_from = ' milesmemorials.com';// < == update e-mail address

    $email_subject = "M & D Web site estimated";

    $email_body. = "name: $FirstName.» \n » ;

    $email_body. = "Name: $LastName.» \n » ;

    $email_body. = ' address: $HomeAddress.» \n » ;

    $email_body. = ' city: $HomeCity.» \n » ;

    $email_body. = ' County: $HomeState.» \n » ;

    $email_body. = "postal code: $HomeZip.» \n » ;

    $email_body. = "country: $HomeCountry.» \n » ;

    $email_body. = "Telephone: $HomePhone.» \n » ;

    $email_body. = ' mob: $CellPhone.» \n » ;

    $email_body. = ' mileage collection: $CAT_Custom_76922. " \n » ;

    $email_body. = ' display: $CAT_Custom_00000. " \n » ;

    $email_body. = ' Coffin: $CAT_Custom_76926. " \n » ;

    $email_body. = ' road: $CAT_Custom_76924. " \n » ;

    $email_body. = ' limousines: $CAT_Custom_76927. " \n » ;

    $email_body. = ' funeral fresh sub: $total.» \n » ;

    $email_body. = "cremation: $CAT_Custom_76928." \n » ;

    $email_body. = "cremation costs: $CAT_Custom_76930." \n » ;

    $email_body. = "wear standby: $CAT_Custom_76923." \n » ;

    $email_body. = ' venue for the service: $CAT_Custom_00006. " \n » ;

    $email_body. = "Minister taxes: $CAT_Custom_00003." \n » ;

    $email_body. = ' doctors fees: $CAT_Custom_76929. " \n » ;

    $email_body. = "total disbursements of cremation: $total_crem_disbursements." \n » ;

    $email_body. = ' funeral: $CAT_Custom_76928. " \n » ;

    $email_body. = "cemetery costs: $CAT_Custom_76931." \n » ;

    $email_body. = "wear standby: $CAT_Custom_00005." \n » ;

    $email_body. = ' venue for the service: $CAT_Custom_00001. " \n » ;

    $email_body. = "Minister taxes: $CAT_Custom_00004." \n » ;

    $email_body. = "total funeral disbursements: $total_burial_disbursements." \n » ;

    $email_body. = ' funeral total cost: $grand_total. ". \n » ;

    $to = " [email protected] ";// < == update the email address .

    $headers = ' from: '. $EmailAddress. » \r\n » ;

    $headers. = "reply-To:". $EmailAddress. » \r\n » ;

    Send the email!

    mail($to,$email_subject,$email_body,$headers);

    fact.  Redirect to the payment page.

    Header ('Location: thankyou_estimate.html "");

    Function to validate against any attempt to electronic fuel injection

    function IsInjected ($str)

    {

    $injections = array ('(\n+)',

    '(\r+)',

    '(\t+)',

    "(% 0 A +) »,

    ' (0 % D +)',

    '(% 08 +) »,

    « (% 09 +) »

    );

    $inject = join ('|) (', $injections);

    $inject = ' / $injecter / I ";

    If (preg_match ($Inject, $STR))

    {

    Returns true;

    }

    on the other

    {

    Returns false;

    }

    }

    }

    ? >

    Here is what I use to validate emails:

    If (! $visitormail == "" & (!)) strstr($visitormail,"@") | ! strstr($visitormail,".")))

    {

    ECHO '.

    Use Back - enter a valid e-mail

    \n » ;

    $badinput ="

    Your message has NOT been submitted.

    \n » ;

    echo $badinput;

    Die ("Go back!");

    }

    I also don't use uppercase characters in the fields for the first letter, but it's a habit I picked up with HTML

    Basically, the enamel must be XXX@YYY. ZZZ Greenvvooei I do validation.

    You could try that.

  • How to trigger the F6 KEY to a single form, the default behavior for others?

    We use Forms 10g Release 2. Our client has a requirement like this: in the form only one , they want the entire form to clear (i.e. the clear form) when they press F6 (clear instruction).

    Now, in our forms, we use the default fmrweb.res. So, because of what happens when we press F8 on the keyboard now noting.

    To clear the form when the user press F6 key keyboard I did the following to the fmrweb.res .
    # Commented this line 
    #117  : 0 : "F6"             : 62 : "Clear Record"
    
    # Added these 2 lines to the bottom 
    
    117 : 0  : "F6"  : 88  : "Function 6"
    117 : 8  : ""    : 62  : ""
    Now, I create a level trigger and shape KEY - F6 and put CLEAR_FORM; in this.

    Now, when I run the form and press the F6 key, the shape is erased. To make it work.

    But the problem is the following. Other forms when we run and press the F6 key, we get
    FRM-41008: Undefined function key....
    What I've discovered, is that when we make meanings (e.g. change the fmrweb.res) We MUST create a trigger of the F6 KEY and put the code.

    Problem is that we have 100s of forms in our application. Since we want that this feature only in this form (i.e. for F6 clear the entire form) and other forms should operate as usual what we can do?

    Any help would be greatly appreciated.

    The trigger for the F6 KEY has nothing to do with the F6 key on your keyboard. The Fn - KEY triggers are triggers defined by the user that you associate with a key or combination of keys. Yes, you can map the KEY - F6 to F6, but this isn't a good idea.

    In your case, it is much easier. In the form where you want to RECORD CLEAR CLEAR form, just redefine KEY-CLRREC:

    Clear_Form (No_Validate);

  • Get the metadata from the images information (CS3, AS, JS)

    I tried using AppleScript and JavaScript to get the photo captions using linkXmp.description.

    This works when the image has been edited in Photoshop, but not when it has just been imported into the page and done nothing for her... The answer is "No metadata information available", a fair enough answer because it don't disagree that the information might be there.

    I got a job AppleScript which goes to Photoshop, opens the picture, gets the information, which is closed without saving changes and returns to InDesign to put an overlay on the image with its legend information. The time delay involved in the image opening is irritating, however.

    I tried initially in AppleScript, and when the offer read in the archives of this forum on the edition vs original problem.

    So, I headed over to the Photoshop Forum where a helpful guy gave me a fragment of AppleScript to get information of legend and a fragment of JavaScript to get the linkXmp.description in InDesign.

    I just finished adapting the JavaScript to work with a selected InDesign page item (learned much in the process). But in the end that I was confronted with the same brick wall I met with AppleScript. If the pic is not changed, no dice.

    My friend Photoshopping was surprised that I did raise my difficulty in the InDesign Forum... which I do now, with apologies to all those who may have read passed me on the road to this topic.

    Yes, there is an InDesign only method to obtain this information from legend?

    In the case that everyone faces in this here is an example that tries to get the legend of the bridge for files that have not given xmp.

    #target indesign
    main(); // Call to the main function
    function main() {
         if (app.documents.length == 0) {
              alert("Please have an 'Indesign' document before running this script.");
              return;
         }
         docRef = app.activeDocument;
         with(docRef) {
              // try reading linkXmp
              var caption = links[0].linkXmp.description;
              if( caption == "" ) getCaptionFromBridge( links[0].filePath );
    
         }
         return caption;
    
         function getCaptionFromBridge( fileName ){
               var cap = undefined;
               function myReturnValue(cap){
                    //do what you want with the results
                     cap = cap;
                    caption = cap;
               }
               var bt = new BridgeTalk;
               bt.target = "bridge";
               var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+fileName.toSource()+");");
               bt.body = myScript;
               bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
               bt.send();
               bt.pump();
              $.sleep( 100 );
              var timeOutAt = ( new Date() ).getTime() + 500;
              var currentTime = ( new Date() ).getTime();
              while ( ( currentTime < timeOutAt ) && ( undefined == cap ) ) {
                   bt.pump();
                   $.sleep( 100 );
                   currentTime = ( new Date() ).getTime();
               }
               function psRemote(fileName){
               var file = new File(fileName);
               var tn= new Thumbnail(file);
               var md = tn.synchronousMetadata;
               var caption = md.read('http://purl.org/dc/elements/1.1/',"description/*[1]");
               return caption;
               }
         }
    }
    

Maybe you are looking for