Re: VBS Script for automatic integration of multiple channels

Hi brad,

Thanks for the reply.

I've attached an example of data to analyze.

Auto steps as follows:

Select Auto would have all channels starting by ' or a message box to manually select.

divide the channel by 3600000, then integrate - store the result in a new string with the name of the original but added channel with "_Ah".

Auto maxvalue for each new channel and maxvalues sum all together...

I want to auto select a range of values to analyze, but I'll try to do what I'm learning!

Concerning

Karoline

Hi Albert,

Here is a VBScript script that does what I understood you ask: it includes all the "D *" channels, appoint new channels with a suffix "_Ah" and each divides by 3600000, finally in summary all the maxima of the built-in channels.  Note that some integral chains have a maximum negative, so there are some positives and negatives cancel past in this amount.

Sun Group, chains, TimeChannel, DataChannel, NewChannel, sum
Set Group = Data.Root.ChannelGroups (1)
Set TimeChannel = Group.Channels (1)
Presets = Data.GetChannels (Group.Name & "/ D *")
Call Group.Activate
For each DataChannel in channels
Call ChnIntegrate (TimeChannel, DataChannel, DataChannel.Name & "_Ah")
Set NewChannel = Group.Channels (DataChannel.Name & "_Ah")
Call ChnLinScale (NewChannel, NewChannel, 1/3600000, 0)
Sum = sum + CMax (NewChannel)
Next ' DataChannel
Sum of MsgBox

Brad Turpin

Tiara Product Support Engineer

National Instruments

Tags: NI Software

Similar Questions

  • Script for automatic placement of several text files?

    An editor I work with is slowed by a change to their workflow. Maybe there's a whole script for help? I looked but can not find, so I post here.

    Old workflow: Designers would be "automatic formatting" a single Word doc with all the preliminary pages (sometimes > 10 sections of diff.) and chapters and endnotes in a model book.

    New workflow: The Word doc is now divided into 30-40 InCopy files, always destined to a single InDesign layout doc (The InCopy files were created from a Word doc marked by a different system, so that they are all new to the InDesign user.)

    Y at - it a script which, according designers load a square slider with 30-40 (in the right order) files, which will allow them to simple-click on page 1, and InDesign will place one after the other files, autoflowing necessary? They still need them to be placed in individual InCopy files (so would not help concatenate Prime). I don't think that there is never a case of 2 stories being on the same page.

    Thank you

    AM

    Hey AnneMarie,

    This script allows you to select a bunch of files and will try to place them, one by one, in your InDesign document. It will be auto-flux them according to the needs (but be careful because standing in excess of problems - because the script does not test for this).

    I tested with a lot of property, but not with InCopy files because I did not. If they are adjustable as Word documents, the script must run end.

    Let us know if everything works correctly for you.

    // BS"D
    // Multi-file auto-place
    // An InDesign Script by Ariel, (c) Id-Extras.com, 2014
    // This script will allow the user to select a bunch of placeable files (Word docs, etc.)
    // It will then attempt to place and auto-flow all the selected files.
    // The script will start from page 1 of the active document
    // and keep adding pages as needed.
    // It will add text frames as needed, within the margins of the page.
    // IMPORTANT: There is no error-checking for perpetual overflow!!!
    // So, if something you're trying to place cannot fit within the margins,
    // The script will continue adding pages to InDesign until it crashes.
    // To quit the script, press ESC.
    var myDoc = app.activeDocument,
     myFiles = File.openDialog("Select files to place...", undefined, true),
     i,
     currentPage = myDoc.pages[0],
     prevFrame,
     myFrame;
    
    for (i = 0; i < myFiles.length; i++){
     myFrame = addFrame(currentPage);
     myFile = myFiles[i];
     try{
      myFrame.place(myFile, false);
     }
     catch(e){
      alert("Unable to place file: "+myFile, "Multi-file auto-place");
      continue;
     }
     while (myFrame.overflows){
      currentPage = addPageAfter(currentPage);
      prevFrame = myFrame;
      myFrame = addFrame(currentPage);
      prevFrame.nextTextFrame = myFrame;
     }
     currentPage = addPageAfter(currentPage);
    }
    function addFrame(aPage){
     var pageMargins = aPage.marginPreferences,
      aFrame = aPage.textFrames.add(),
      areFacing = app.activeDocument.documentPreferences.facingPages,
      myTop = aPage.bounds[0]+pageMargins.top,
      myBottom = aPage.bounds[2]-pageMargins.bottom,
      myLeft = aPage.bounds[1]+pageMargins.left,
      myRight = aPage.bounds[3]-pageMargins.right;
     //When document.documentPreferences.facingPages == true,
     //"left" means inside; "right" means outside.
     if (areFacing && aPage.side == PageSideOptions.LEFT_HAND){
       myLeft = aPage.bounds[1]+pageMargins.right;
       myRight = aPage.bounds[3]-pageMargins.left;
     }
     aFrame.geometricBounds = [myTop, myLeft, myBottom, myRight];
     return aFrame;
    }
    
    function addPageAfter(aPage){
     return myDoc.pages.add(LocationOptions.AFTER, aPage);
    }
    
  • Question in regards to the script for automatic filling check box

    Hello everyone.  First of all, let me say a big thank you to all the users, but also the admins of this forum.  As a user of LiveCycle newbie, I learned an incredible amount of research on the forum and reading of others.  Now, to my current question...

    I use a custom form created in LiveCycle ES 8.2 and wonder how to empower a checkbox to fill automatically (IE. 'on') based on a number entered in a numeric field by using a range of criteria.  To be more precise, I have (5) checkboxes that will be labeled as follows:

    Name: CheckBox1 < 500

    Name: CheckBox2 500-999

    Name: CheckBox3 1 000-1 499

    Name: CheckBox4 > 1 500

    Name: Checkbox5 no

    I don't want only a SINGLE checkbox auto fill based on a certain number I enter the numeric field (called "NumericField1").  For example, if I enter "889" number, I want only CheckBox2 AutoComplete in.  Not sure what script to use in the Script Editor for this.  Any help would be greatly appreciated.  Thank you very much in advance.

    MJ

    You are welcome. I added a second numeric field. NF1 is entered by the user option. NF2 is calculated field read-only to mimic your form. NF2 simply takes the value of nf1. I moved the logic of radio button in the radio button exclusion group calculate event to produce the results below. I think that's what you're after. The updated form is attached.

    Steve

  • script for automatic export daily

    Hello
    I need a script under linux for autamatic export everyday.pls someone send the script to do this.


    Thanks and greetings
    Srinivas

    Create an export.sh file and put it in the file using the vi editor and save it

    "Export DD ='date + %m %d hour %M"
    Export DMP_DIR = / u01/export
    Export EXP_DMP_DIR = / u01/export/expdump
    Export EXP_LOG_DIR = / u01/export/explogs

    file name of user and password exp = ${ORACLE_SID} EXP_DMP_DIR/full_$ _export_$ {DD} full .dmp = log y = $EXP_LOG_DIR/full_$ {ORACLE_SID} _export_$ {DD} .log statistics = none filesize = 1048560000 direct = y

    This script will create new dump file every day with the date added in the name of the file

    You can schedule this script using crontab

  • How to create a script for the name of the channel to take and insert text on profile in CS5

    I am a silkscreen and I print my Photoshop starts. I regularly work with multi channel files or RGB files with additional color channels. I created actions to place check marks, resize images, etc. to be ready to print manually but I create for each display text labels, if they are absent from the original work.


    The files I work with have named pipes as "basic white, red, green, blue 284" etc. which indicates the color of the ink. I want to be able to do is create a script that copies the text of the channel name and insert it into a separate or each/all channels to the top of the file, so that when I print every positive there is a label corresponding to the color of the ink.


    I don't know if this is even possible, and I am limited in my knowledge when it comes stock and no experience with scripting and have had pretty good luck in the past for actions to do what I want without unnecessary steps.


    On my target action registration, it creates a new channel with each individual reg mark then combined in a separate channel in which I just copy the contents and select all channels of ink and fill with black to make them appear, I am happy with the steps that must be that it is not too complicated and if it could do the same with labels I would be happy with that.


    Thanks in advance!

    Something like that?

    // the color used for the text
    var black = new SolidColor();
    black.rgb.hexValue = '000000';
    // set this to space the labels
    var horizontalOffest = new UnitValue(20,'pt');
    var doc = app.activeDocument;
    var currentLayer = doc.activeLayer;
    var textLayer = doc.artLayers.add();
    textLayer.kind = LayerKind.TEXT;
    // font requires the postscript name of the font
    textLayer.font = "ArialMT";
    textLayer.textItem.size = new UnitValue(9,'pt');
    textLayer.textItem.justification = Justification.RIGHT;
    // set the position for the text. this sets to top right corner of the channel
    // here it is set so the text baseline ends  40pts from the right edge, 15pts down
    textLayer.textItem.position = [new UnitValue(doc.width.as('pt')-50,'pt'),new UnitValue(15,'pt')];
    textLayer.textItem.contents = 'label';// temp label string
    
    for(var channelIndex = 0; channelIndex		   
  • Script engine "VBScrip' for the 'C:\Windows\System32\OEM\_NowIntoDT.vbs' script is not found.

    Hi guys, I have a new desktop computer (a month) under window 7 Home Premium, 64-bit operating system.  A few hours ago, when I turned on the computer, it boots up to the usual bright but the strange message below appears and continues to appear on the screen every time that the computer starts. Of course I can delete the message by closing (by clicking the X)

    Script engine "VBScrip' for the 'C:\Windows\System32\OEM\_NowIntoDT.vbs' script is not found.

    So far, it does not appear to affect the operation of the computer, maybe because I haven't downloaded all the programs. Yet, I am uncomfortable with this message. Can someone please tell me what does this message mean and what should I do to solve the problem?

    I forgot to mention that I removed the eve of 60 day trial of McAfee Internet Security.

    Thanks for your kind suggestion.

    FrozenRiver

    Hi guys, I have a new desktop computer (a month) under window 7 Home Premium, 64-bit operating system.  A few hours ago, when I turned on the computer, it boots up to the usual bright but the strange message below appears and continues to appear on the screen every time that the computer starts. Of course I can delete the message by closing (by clicking the X)

    Script engine "VBScrip' for the 'C:\Windows\System32\OEM\_NowIntoDT.vbs' script is not found.

    So far, it does not appear to affect the operation of the computer, maybe because I haven't downloaded all the programs. Yet, I am uncomfortable with this message. Can someone please tell me what does this message mean and what should I do to solve the problem?

    I forgot to mention that I removed the eve of 60 day trial of McAfee Internet Security.

    Thanks for your kind suggestion.

    FrozenRiver

    Hello

    Usually when you see messages like this when you start the computer, this means that a file has been uninstalled, but the reference to this file in the startup list remains intact.

    When the Start Up of the list (the programs that start when the computer starts) is read the system searches for this file and of course can't find it, you see the "not found" error message

    Press the Windows Logo key + R to start the box run.

    Type msconfig.exe in the Open box, and then click OK.

    Click the Startup tab.

    Expand the command column and look for the line with the same name of _NowIntoDT.vbs .

    Remove the check mark from this line.

    Click apply/OK.

    Restart the computer.

    Let us know the result.

    Thank you for using Windows 7

    Ronnie Vernon MVP
  • Need help to create a Script for the labelling of Finder of Indesign files

    Try to find a way to have a script run in InDesign CS4, who tagged a RED text file once it's been imported into InDesign.

    Import multiple text files in an InDesign template. Since there are several text files in the same folder, it must somehow 'delineate' that we have imported this file and move to the next import. I created a 'service' with a keyboard shortcut Automator to label the Red file in the finder, but it would be great if we could have this occurs automatically after we imported in InDesign.

    If import us the text wrong by accident and it gets missed in fermentation, it costs us a lot of money with the printer.

    Thanks for all the ideas.

    Jim

    At its heart, it's what you want to do.

    tell application "Adobe InDesign CS4"
         set placeFile to choose file
         tell active document
              tell selection
                   --Assumes you have preselected the picture or textbox to place file in
                   place placeFile
              end tell
         end tell
    end tell
    tell application "Finder"
         set label index of placeFile to 2
    end tell
    

    You can expand on it pretty easily. The script for InDesign dictionary must be in the Library palette in the Applescript editor and the docs for Applescript are all online.

    If you need further assistance, you may wish to ask someone to write a complete script for you to spec for real moneyz.

    Best o ' luck!

    Eric.

  • How can I check the disc for physical integrity on Satellite P305?

    I have P305-S8838.

    I had some freezing problems earlier this month, and on the notice here, I nu start-up and reduced services a little at a time.
    Now, I have a few more crash but don't know if it's a physical disk problem.

    For example... I have run CHKDSK and does many things and happens at the exact same spot and hangs at step 4 file 5 3498 or 421168 processed.

    I tried to run CHKDSK in SafeMode but tells me drive is locked and it will run when I restart. But the restart put back me in normal mode and get the same hang.

    Now, for more suspicion of a physical problem. I tried to make a disk image with ACronis and same problem occurs because he says impossible to reading data 226 964, 072 sector and ask if I want to ignore and continue. I say yes to everything. Log shows he made about three of these attempts and crashes.

    I ran sfc/scannow and it says found problems that he was unable to fix. The newspaper isn't so long and complex course that all means. I could send these log files if someone can help me understand.

    I ran the test of memory OK.

    I if I could put in DVD Toshiba and certain diagnoses, but when I put in the disk I get this big warning I'll crush, etc and I have chicken.

    This didn't stop me to use the computer, but its all irritating.

    How can I check the disc for physical integrity?

    Bob

    Hello

    He idea goo to check the HARD disk and run some diagnostic procedures.
    For this, I recommend the freeware tool called Drive Fitness Test.
    It allows you to check the HARD disk for certain physical defects.

    Google for this tool. You can get it from multiple pages download

  • Cannot debug a VBS Script in tiara 2012

    Hello, I'm trying to run the DIADem Advanced self-training, and I cannot debug any script in the exercises of.  I already unchecked read-only, so that they can be changed.  If I go to the menu bar and go to the Script, all debugging options (Debug VBS Script, point to stop on / off, breakpoints off) are grayed out, as well as the icons are also grayed out.  Y at - there a step I'm missing or an option I have not installed?  Thanks for the help.

    Too bad.  I thought about it.  I had to install the Microsoft Script Debugger.  It works now.

    http://www.Microsoft.com/en-us/download/confirmation.aspx?ID=22185

  • DLLSurrogate on Server 2008 STANDARD (NOT R2) does not not a COM 32 bits of the 64-bit VBS script object.

    I can't get DLLSurrogate on Server 2008 STANDARD (NOT R2) to load a 32-bit to 64-bit VBS script COM object.

    Yes, I tried the Wow6432Node "redirects" and THAT runs on Server 2008 R2, but NOT under the STANDARD!

    The PROBLEM is that the VBS Script is called from SCOM (which is 64 bit [SCOM 32-bit on a 64 bit OS is "unsupported"]), who, in turn, must run the application Code to 32-bit (return MOMScriptAPI.PropertyBag [64-bit, in this case])!

    Under Server 2008 R2, the technique to create entries of DLLSurrogate under HKCR\Wow6432Node...  Works PERFECTLY, the PROBLEM, this is the verion of the 32-bit code we (still) lack in Production does not support running on R2.

    I can't seem to find a way (once again, on Server 2008 R2 (x 64)) interact in a 64-bit environment / 32-bit mixed!

    Anyone have this working?

    Hello

    Your question about Windows Server 2008 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the public on the TechNet Forums. Please post your question in the following link for assistance:

    Link to the forum:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • VBS script does not have command line parameters

    Suddenly the VBS scripts that I use for several years is no longer work correctly on Windows 7.  By "suddenly" I mean they worked Wednesday and do not work on Friday, two days later.  There were / are two incidents:

    First of all, the program default for the extension VBS WScript to CScript changed.  CScript would scripts pretty well, except that my scripts are designed to run in debug mode under CScript, with many calls MsgBox, and I need them to run unattended.

    So I re-associated .vbs WScript.  Now the question is that WScript.Arguments.Count always returns 0 even when the script is invoked with command-line parameters.  I checked with the command FTYPE that Windows is configured to pass arguments to WScript:

    C:\>Assoc .vbs
    .vbs = VBSFile

    C:\>ftype VBSFile
    VBSFile="%SystemRoot%\System32\WScript.exe" "%1" % *.

    It's as if a Windows Update has suddenly dropped support for the %

    If anyone else has noticed this?  I can't go to CScript - I wrote dozens of scripts that I designed to behave differently under CScript or WScript.

    OS = Win 7 Pro 64-bit SP1

    In the meantime, I'm going to see events in the event viewer to see if this box received updates, MS or otherwise.

    Thank you for responding.  The content of the registry that you have provided is almost identical to one that I exported from a work computer.  The only difference was in the placement of the @= line "VBScript Script file", so I tried to import them both.  No one changed the behavior.

    Fortunately, this isn't a problem only when I need to type command-line parameters.  So I also tape "WScript" before the name of the script before you press Enter.

    I don't think I'll do more to solve problems, but I'll keep trying all the answers in this thread that look promising.

    Hello
    Check this key?

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.vbs

    You can export and send the content here. The value under "UserChoice" is most likely the culprit. And remove "UserChoice" key should straighten this issue.

  • Script for "fill with pattern" - "use a last used.

    Hello guys, I need a bit of help to automate my work.

    I work with patterns (such as a Model Designer), but I need to automate my work a little.

    There's this great function now 'fill with... model' and then you have scripts for those.

    That said what I usually do, it of that I'm working on a few models, proceed to the design then their test on a file empty large format.

    so

    1. I do my drawing, then

    2. click on "set as a new ground" then

    3. I opened a new charge fbig large file and

    4. use "fill... with reason" and

    5. Select the last one, I created...

    Then I tried to create an action / script so I can you know, batch job, having to decide which of the grounds are good on large format later.

    AND HERE IS THE BUG!

    When I added exactly the same steps in the macro in action - it will work for the first file, but for the second, it will always use the same model used previously, as stocks macro sees it as "fill with pattern XXX" (i.e., not as "last used"), so I land upward with all the photos in large format filled with the same model instead of different.

    I thought then modify the macro so when I g oto step 4

    4. use "fill... with reason" and

    Add "use script" among loading scripts, which would have set something like 'use the last defined pattern' - can be both a code like "use the newer model defined" or "new model added to the batch.

    I understand the logic, but I have no idea how to do to modify the scripts in this area.

    This will save me hours of work, for all your help will be most appreciated.

    Here is a link for the jsx file...

    ExpireBox

  • Scripts for indesign

    Hi all.  I wonder if there is a script for indesign that allow me to put the file name / and identifiers of color at the bottom of the Document.  Also, who will all place me information where I want.  For ex...   I want to send a task to plates and rather than manually enter the name of the file - Date and time - and colors on the bottom of the plate/file.  I know that when I go to export a file or print a file it is check box to put the information on the file page and it does what I want however he put the information too low on the plate.  He added the information down into the corner of the plate area and receiving not Burnt or processed in this area.  I need a script to back up the information, if we read.

    Hi cbishop01,

    First of all, I would not recommend research by sending your files to Indesign as postscript, if your normal process is a PDF workflow. PostScript does not support some features on various output devices. When the postscript from Indesign, you can run into CMYK printing issues when dealing with PDF files and other works of art that contain some transparency effects and mixing modes that cannot be interpreted by the postscript or cannot flatten properly.

    My employer uses a script Indesign, we have developed which can be something similar to what you are looking to accomplish. If your plate is always the same size, you can create a model of tax file in Indesign with job info, color chart, date and time, and you want to integrate the model tax. You can use a script Indesign to automatically update the model every time that you print in PDF format (which can be done by adding a custom ease menu item).

    Plate files vary from a file in a file, you can convert the file name, time, blocks of color name text in an Indesign library item and drop it right in the position desired on each individual plate installation. You will not have to change these items, you will only place a group element where you want to go.

    Is this something that will work for you?

    (example of a model of plate file)

    (example of slug color library item)

  • Running scripts for hours in saved state?

    I hope you don't mind a little dreamy logic...

    is it possible to simulate the operation of a script for hours, without really leaving the virtual machine on for hours.

    In my case, I have some code which according to Core Java Volume 1 (8th edition), should run in a stalemate, however, because of the intermittent nature of the bug, we can't predict under what circumstances, the deadlock will cause the machine to stop.

    Therefore, it would be ideal to have scripts run in the virtual machine (development environment) and somehow automatically have the dump script results, screenshots, and save the State of the environment at the same time the bug occurs.  The source code that run in the JDK 1.6 are attached and are compressed in rar . format

    Additional information can be found by reading Core Java Volume 1 (8th edition http://www.amazon.com/Core-Java-I-Fundamentals-8th-Horstmann/dp/0132354764) and Oracle tutorial on blocks to http://download.oracle.com/javase/tutorial/essential/concurrency/deadlock.html.

    Without the virtual machine must be running in order to run the script-

  • Script for layer redundant batch delet

    I have thousands of files in different folders, each file has the same layer named "job Info". Can someone help me to write a script for led this layer per-folder?

    layerInfo.jpg

    I expected, the script tells me that I need to select a folder, then it can automatically open files, del layer "job info" then save the file, rewrite, close file

    Hello

    Try this.

    var folder = Folder.selectDialog ("Select the root folder");
    var myfiles = [];
    getsubfolderfiles(folder);
    for(var i =0;i -1){
                    myfiles.push(filelist[i]);
                }
            }
        }
    }
    

    Kind regards

    Cognet

Maybe you are looking for