Using script to automatically arrange timeline and sceneline workspaces.

This is a simple demonstration of using VB Script to adjust panels in PE3.
In PE3, when you adjust the height of the timeline, the height of the sceneline is also adjusted the same amount, and vice versa. You could use script to automatically adjust the height of the sceneline or the timeline whenever you switch respective modes. The script below does that.
This is for those who are familiar with script writing and the Windows Script Host. The vb script below includes properties and methods from the AutoItX library (free download).
Option Explicit
Dim oAutoit, strWinText, strLastTime, lngX, lngY
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
oAutoit.WinWaitActive "Adobe Premiere Elements -"
strLastTime = "start"
Do
' Quit the script if mousepointer put in upper left corner (0,0).
lngX = oAutoIt.MouseGetPosX
lngY = oAutoIt.MouseGetPosY
if lngX = 0 and lngY = 0 then
set oAutoIt = nothing
Wscript.Echo "Your script has ended."
Wscript.Quit
end if
' Read the text of the window so we can determine the workspace setup.
strWinText = oAutoIt.WinGetText("Adobe Premiere Elements -")
' If DVD Menu tab selected, then don't do anything, otherwise
' check if in Sceneline or Timeline mode.
if instr(strWinText, "DVD Menu") = 0 then
if instr(strWinText,"EditTimeControl") <> 0 then
if strLastTime <> "timeline" then
' Reset the Edit Workspace and then adjust the timeline panel height
oAutoit.Send "{alt}wke"
oAutoit.Sleep 250
oAutoit.MouseMove 1078, 646
oAutoit.MouseDown "left"
oAutoit.MouseMove 1078,400
oAutoit.MouseUp "left"
strLastTime = "timeline"
end if
else
if strLastTime <> "sceneline" then
' Reset the Edit Workspace and then adjust the sceneline panel height.
oAutoit.Send "{alt}wke"
oAutoit.Sleep 250
oAutoit.MouseMove 1078, 646
oAutoit.MouseDown "left"
oAutoit.MouseMove 1078,762
oAutoit.MouseUp "left"
strLastTime = "sceneline"
end if
end if
end if
WScript.Sleep 2000
loop
The script might work as-is if your screen is set for 1280 x 1024 and the Premiere Elements 3 window is maximized. Save the script in a text file with a .VBS extension, and then run it. Afterwards click on the Sceneline or Timeline buttons in PE3. It may take up to 2 seconds before the mouse starts moving on it's own. The screen coordinates were ascertained using the AutoIt Info tool.

You shouldn't make assumptions about what the names of the volumes are - both the Finder and System Events have terminology to determine if a disk is the startup volume (or a local volume, for that matter), for example:
tell application "System Events"
  repeat with someDisk in (get disks whose startup is false and local volume is true)
    set someDisk to POSIX path of someDisk
    do shell script "diskutil umount " & quoted form of someDisk & " &> /dev/null &"
  end repeat
end tell
Note that if you are unmounting a disk from a standard account you will be prompted for administrator authentication.

Similar Messages

  • PS Script to Automate NIC Teaming and Configure Static IP Address based off an Existing Physical NIC

    # Retrieve IP Address and Default Gateway from static IP Assigned NIC and assign to variables.
    $wmi = Get-WmiObject Win32_NetworkAdapterConfiguration -Filter "IPEnabled = True" |
    Where-Object { $_.IPAddress -match '192\.' }
    $IPAddress = $wmi.IpAddress[0]
    $DefaultGateway = $wmi.DefaultIPGateway[0]
    # Create Lbfo TEAM1, by binding “Ethernet” and “Ethernet 2” NICs.
    New-NetLbfoTeam -Name TEAM1 -TeamMembers "Ethernet","Ethernet 2" -TeamingMode Lacp -LoadBalancingAlgorithm TransportPorts -Confirm:$false
    # 20 second pause to allow TEAM1 to form and come online.
    Start-Sleep -s 20
    # Configure static IP Address, Subnet, Default Gateway, DNS Server IPs to newly formed TEAM1 interface.
    New-NetIPAddress –InterfaceAlias “TEAM1” –IPAddress $IPAddress –PrefixLength 24 -DefaultGateway $DefaultGateway
    Set-DnsClientServerAddress -InterfaceAlias “TEAM1” -ServerAddresses xx.xx.xx.xx, xx.xx.xx.xx
    Howdy All!
    I was recently presented with the challenge of automating the creation and configuration of a NIC Team on Server 2012 and Server 2012 R2.
    Condition:
    New Team will use static IP Address of an existing NIC (one of two physical NICs to be used in the Team).  Each server has more than one NIC.
    Our environment is pretty static, in the sense that all our servers use the same subnet mask and DNS server IP Addresses, so I really only had
    to worry about the Static IP Address and the Default Gateway.
    1. Retrieve NIC IP Address and Default Gateway:
    I needed a way to query only the NIC with the correct IP Address settings and create required variables based on that query.  For that, I
    leveraged WMI.  For example purposes, let's say the servers in your environment start with 192. and you know the source physical NIC with desired network configurations follows this scheme.  This will retrieve only the network configuration information
    for the NIC that has the IP Address that starts with "192."  Feel free to replace 192 with whatever octet you use.  you can expand the criteria by filling out additional octects... example:
    Where-Object
    $_.IPAddress
    -match'192\.168.' } This would search for NICs with IP Addresses 192.168.xx.xx.
    $wmi
    = Get-WmiObject
    Win32_NetworkAdapterConfiguration
    -Filter "IPEnabled = True"
    |
    Where-Object {
    $_.IPAddress
    -match '192\.' }
    $IPAddress
    = $wmi.IpAddress[0]
    $DefaultGateway
    = $wmi.DefaultIPGateway[0]
    2. Create Lbfo TEAM1
    This is a straight forward command based off of New-NetLbfoTeam.  I used  "-Confirm:$false" to suppress prompts. 
    Our NICs are named “Ethernet” and “Ethernet 2” by default, so I was able to keep –TeamMembers as a static entry. 
    Also added start-sleep command to give the new Team time to build and come online before moving on to network configurations. 
    New-NetLbfoTeam
    -Name TEAM1
    -TeamMembers "Ethernet","Ethernet 2"
    -TeamingMode SwitchIndependent
    -LoadBalancingAlgorithm
    Dynamic -Confirm:$false
    # 20 second pause to allow TEAM1 to form and come online.
    Start-Sleep
    -s 20
    3. Configure network settings for interface "TEAM1".
    Now it's time to pipe the previous physical NICs configurations to the newly built team.  Here is where I will leverage
    the variables I created earlier.
    There are two separate commands used to fully configure network settings,
    New-NetIPAddress : Here is where you assign the IP Address, Subnet Mask, and Default Gateway.
    Set-DnsClientServerAddress: Here is where you assign any DNS Servers.  In my case, I have 2, just replace x's with your
    desired DNS IP Addresses.
    New-NetIPAddress
    –InterfaceAlias “TEAM1”
    –IPAddress $IPAddress
    –PrefixLength 24
    -DefaultGateway $DefaultGateway
    Set-DnsClientServerAddress
    -InterfaceAlias “TEAM1”
    -ServerAddresses xx.xx.xx.xx, xx.xx.xx.xx
    Hope this helps and cheers!

    I've done this before, and because of that I've run into something you may find valuable. 
    Namely two challenges:
    There are "n" number of adapters in the server.
    Adapters with multiple ports should be labeled in order.
    MS only supports making a LBFO Team out of "like speed" adapters.
    To solve both of these challenges I standardized the name based on link speed for each adapter before creating hte team.  Pretty simple really!  FIrst I created to variables to store the 10g and 1g adapters.  I went ahead and told it to skip
    any "hyper-V" ports for obvious reasons, and sorted by MAC address as servers tend to put all thier onboard NICs in sequentially by MAC:
    $All10GAdapters = (Get-NetAdapter |where{$_.LinkSpeed -eq "10 Gbps" -and $_.InterfaceDesription -notmatch 'Hyper-V*'}|sort-object MacAddress)
    $All1GAdapters = (Get-NetAdapter |where{$_.LinkSpeed -eq "1 Gbps" -and $_.InterfaceDesription -notmatch 'Hyper-V*'}|sort-object MacAddress)
    Sweet ... now that I have my adapters I can rename them into something standardized:
    $i=0
    $All10GAdapters | ForEach-Object {
    Rename-NetAdapter -Name $_.Name -NewName "Ethernet_10g_$i"
    $i++
    $i = 0
    $All1GAdapters | ForEach-Object {
    Rename-NetAdapter -Name $_.Name -NewName "Ethernet_1g_$i"
    $i++
    Once that's done Now i can return to your team command but use a wildcard sense I know the standardized name!
    New-NetLbfoTeam -Name TEAM1G -TeamMembers Ethernet_1g_* -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false
    New-NetLbfoTeam -Name TEAM10G -TeamMembers Ethernet_10g_* -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false

  • Using ext monitor for timeline and laptop screen as preview?

    is it possible that when i connect my external monitor to my macbook pro i can use the external for the timeline and the laptop screen for the previewing?
    cheers

    I'm trying to do this exact same thing and am coming to the conclusion that it is not possible given my setup. I have a MacBook Pro 2.2 Intel Core 2 Duo with 4GB of RAM and a NIVIDIA GeForce 8600M GT Graphics Card. I'm running FCS 3 and all media is read from a 1TB Seagate 7200 SATA drive read through a SeriTek 2SM2 PCI card in the Express Slot.
    You can easily arrange your monitors to do what you're asking (as outlined above), but the problem is the Graphics Card is not powerful enough to run both monitors and you will experience dropped frames with any HD codecs. I've tried XDCAM, DVCPROHD and ProRes 422 -- all dropped frames immediately. In fact, even if I use the "closed clamshell" mode, so the graphics card is powering ONLY the external monitor, I still get the same dropped frames issue. The only way I can edit or play back without dropped frames is by using NO external monitor whatsoever.
    Is this a unique problem for me? Is there a solution to this? Would the new 17 inch i5's with a NVIDIA GeForce GT 330M (512MB) be able to power an external monitor?
    EDIT: And the External Monitor is a Dell 2408WFP connected through the DVI port.
    Message was edited by: Mr. Landers

  • Using scripting with networking equipment under Windows

    It can be a challenge to use scripting to automate working with Cisco devices. The Cisco IOS does not seem to directly provide a command line interface. You are forced to find a way to automate interaction with a telnet or ssh session.
    The PERL language provides a number of object-oriented methods to help manage an interactive session, most notably Net::SSH::Expect and Net::Appliance::Session. These options can work well in a Unix environment, but not under MS Windows.
    There are PERL for Windows options, the best probably being Strawberry PERL. There is also a Unix under Windows option known as CYGWIN that is freely available. Unfortunately none of these will work well with the way Windows manages low-level terminal I/O. The curious can google "windows pseudo terminal" to see all the technical details.
    One way that does work under Windows is Tcl.  It was initially named Tool Command Language. It is sometimes shown as Tcl/Tk.
    Interestingly enough, Tcl is included within Cisco IOS as tclsh. There is no interaction with the tclsh and this example. It is just a bit of a curious coincidence.
    A Tcl port to Windows can be downloaded from http://www.activestate.com/activetcl/downloads. Select Download ActiveTCL for Windows. A direct link to the download that worked at the time of writing is Download ActiveTcl 8.5.14 for Windows (x86)
    Once base Tcl has been downloaded and installed there is one other component that will need to be installed from the Tcl Extension Archive, the expect package.
    The teacup program that is installed with the base Tcl package makes this easy. The teacup program will work with a proxy.
    You can set these Windows environment variables to specify proxy details:
    set http_proxy=
    set http_proxy_user=
    set http_proxy_pass=
    Then run teacup install expect
    The plink tool from the PuTTY download is also needed. It can be obtained from http://www.putty.org/.
    The sample that follows assumes that the data files, script and plink.exe executable all reside in the same directory.
    A sample Tcl script follows that reads a file of devices and a file of commands. It will run the list of commands against each device in the device file. It has some basic error checking, but should best be considered a ‘beta’ version. You could do more complex interactions in the Tcl script by adding exp_send and expect command statements. In short, if you can type it you could script it!
    Change directory to where your script, plink.exe  and data is stored and run with  tclsh <script_name>
    devices.list
    # Comment lines are allowed if they start with a hash mark
    # <IP_Addr> <userid> <password> <ssh|telnet> <timeout_in_secs>
    nnn.nnn.nnn.nnn    <userid>    <password>  ssh         <timeout_in_secs>
    nnn.nnn.nnn.nnn    <userid>    <password>  telnet      30
    commands.list
    # term length 0 needed or else IOS will wait for an enter to be pressed at the  --More-- prompts
    term length 0
    show run
    exit
    Script:
    # Run batch commands against one or more devices
    package require Expect
    exp_log_user 0
    set exp_internal 0
    set exp::nt_debug 0
    set prompt "(#\s*$|>\s*$)"
    set env(TERM) dumb
    set file_channel  [open "devices.list" r]
    set DEVICES      [read $file_channel]
    close $file_channel
    set file_channel  [open "commands.list" r]
    set COMMANDS      [read $file_channel]
    close $file_channel
    set command_entries [split $COMMANDS "\n"]
    set device_entries  [split $DEVICES "\n"]
    proc timedout {{msg {none}}} {
          send_user "Timed out (reason: $msg)\n"
          if {[info exists ::expect_out]} { parray ::expect_out }
          exit 1
    foreach device_entry $device_entries {
          if {[string length $device_entry] == 0 || [regexp {[ \t]*#} $device_entry]} { continue }
          set device  [lindex $device_entry 0]
          set user    [lindex $device_entry 1]
          set pass    [lindex $device_entry 2]
          set mode    [lindex $device_entry 3]
          set wait    [lindex $device_entry 4]
          set serial  [lindex $device_entry 5]
          # puts "Device=$device"
          # puts "User=$user"
          # puts "Mode=$mode"
          # puts "Wait=$wait"
          set timeout $wait
          # Spawning the Session
          # If you are logging on to the remote machine using "ssh", "slogin" or "rlogin", the information
          # gets processed in a slightly different manner. With any of these methods, it is necessary to
          # include an additional -l option to specify a username.
          # Next, the $spawn_id variable is captured, storing information about this spawn session in
          # memory for future reference.
          # If you are logging in via Telnet, the final code block in this section is required to pass the
          # username to Telnet. If the login is completed before the script times out, the exp_send command
          # passes the username.
          switch -exact $mode {
                "telnet" { set pid [spawn plink -telnet -l $user $device] }
                "ssh"   { set pid [spawn plink -ssh -l $user -pw $pass $device] }
                "serial" { set pid [spawn plink -serial $serial -l $user -pw $pass $device] }
          set id $spawn_id
          if {$mode == "telnet"} {
                expect -i $id timeout {
                timedout "in user login"
                } eof {
                timedout "spawn failed with eof on login"
                } -re "(login|Username):.*" {
                exp_send -i $id -- "$user\r"
          # Handling Errors
          # The error-handling section of the script is a while loop that anticipates a number of problems
          # that could occur during login. This section is not exhaustive. For example, you could also add
          # provisions for invalid usernames and passwords.
          # If the login is not completed during the allotted time frame, which is set from the devices.list file
          # and specified with expect -i $id timeout, the program displays an appropriate error message.
          # The remainder of this loop makes use of the exp_send command to allow for other scenarios, such
          # as the user typing "yes" when prompted to proceed with the connection, entering a password, or
          # resetting the terminal mode.
          set logged_in 0
          while {!$logged_in} {
                expect -i $id timeout {
                timedout "in while loop"
                break
                } eof {
                timedout "spawn failed with eof"
                break
                } "Store key in cache? (y/n)" {
                exp_send -i $id -- "y\r"
                } -re "\[Pp\]assword:.*" {
                exp_send -i $id -- "$pass\r"
                } "TERM = (*) " {
                exp_send -i $id -- "$env(TERM)\r"
                } -re $prompt {
                set logged_in 1
          foreach command $command_entries {
                if {[string length $command] == 0 || [regexp {[ \t]*#} $command]} { continue }
                # Sending the Request
                # If the login is successful, the code in the if statement below is used to send the "cmd" request
                # to display files and directories. After the request is sent with exp_send, the resulting output
                # is captured in the dir variable, which is set on the fourth line of the code shown below.
                if {$logged_in} {
                      exp_send -i $id -- "$command\r"
                      expect -i $id timeout {timedout "on prompt"} -re $prompt
                      puts "$expect_out(buffer)"
                # Closing the Spawned Session
                # The exp_close command ends the session spawned earlier. Just to be sure that session
                # does indeed close, the exp_wait command causes the script to continue running until a result is
                # obtained from the system processes. If the system hangs, it is likely because exp_close was not
                # able to close the spawned process, and you may need to kill it manually.
          catch { exp_close -i $id }
          exp_wait -i $id
          set logged_in 0
    *** End of Document ***

    Your friend will have to save the templates as CS6, which he can do.

  • Adobe After Effects Multiple instances does not working parallel using Scripting

    Hi all,
    i am uploading after effects template to my site, user came and upload his desired contents.
    i update the template using scripting with user's contents and then render video so user get video with his uploaded text/images etc.
    its working perfectly when i update a single template at a time but when multiple users come at the same time then they need multiple instances of after effects
    so i open multiple instances of after effects by using "-m" with after effects shortcut
    after looking at windows task manager there are both instances but the problem is
    only once instance continue and the second one stop, after completion of first instance the second one still in pause status
    i need 2,3 4 or whatever instances to work parallel without pause/stop
    i am using windows server 2008 R2 with XAMP installed

    Hi Lal XaDa,
    Would you please post your script to help us to troubleshoot?
    In addition, if you can use Windows Powershell, please try these ways:
    If a script needs some speed-up, you might find background jobs helpful, you can use the cmdlet "start-job", for more detailed information, please go through this article:
    Parallel Processing in PowerShell
    You can also use the cmdlet ForEach -Parallel in powershell workflow to handle script in parallel.
    For more detailed information, please check this article:
    about_Foreach-Parallel
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Is there a script available for arranging elements for optimal use of the printable area?

    I'm starting a sticker printing business using Illustrator as my main layout and illustration too. I was wondering if there's a script available for automatically arranging a set of elements on a page so that they optimally take up the available space. I figured this would save me some on material costs.
    If I were to create a script from scratch, can someone give me pointers? I'm a casual AI user but I have Javascript experience.
    Thanks.

    The below image shows the 4 different die sizes, the artwork fits inside the dotted box so make sure that we have room around the die and the drill holes are assigned as well.
    The name of each die is listed above it, and the size is listed below it.
    The script is set to take each die and place it on the template until it is full, then it will save it and move it to the folder where it will be grabbed and preped for printing.
    Everything below the **** is the script.
    #target illustrator   
        var tempDoc = app.activeDocument;
        copy();
        if (tempDoc.selection.length > 0)
            var myFile = File("S:/TEMPLATES/IN USE/DB_TEMPLATE.ai");
            app.open(myFile);
            var thisDoc = app.activeDocument;
                thisDoc.views[0].centerPoint = [324,503];
                thisDoc.views[0].zoom = .65;
            var allGroups;
            var horizontalCords = [0,180,360,540,0,180,360,540,0,180,360,540,0,180,360,540,0,180,360,540,0];
            var verticalCords = [1012.5,1012.5,1012.5,1012.5,810,810,810,810,607.5,607.5,607.5,607.5,405,405,405,405,202. 5,202.5,202.5,202.5,202.5];
            var oneGroups = new Array();
            var twoGroups = new Array();
            var oneAGroups = new Array();
            var twoAGroups = new Array();
            var makeNew1 = new Array();
            var makeNew2 = new Array();
            var twoACounter = 0;
            var layerRemainder = [4,4,4,4];
            var totalDies = 0;
            var noGo = 0;
            var caseTest;
        if (thisDoc.pageItems.length == 0)
            drawTemplate();
        var newLayer = thisDoc.layers.add();
        newLayer.name = "Die Layer";
        paste();
    allGroups = thisDoc.groupItems;
        for (i=0;i<allGroups.length;i++){// determine what dies are present
            if (allGroups[i].name == "1"){
                oneGroups.push(allGroups[i]);
            else
        if (allGroups[i].name == "1A"){
                oneAGroups.push(allGroups[i]);
        if (allGroups[i].name == "2") {
            twoGroups.push(allGroups[i]);
        else
        if (allGroups[i].name == "2A"){
            twoAGroups.push(allGroups[i]);
        }// end FOR
    if (oneAGroups.length == 1)
        oneAGroups[0].position = [540,101.5];   
    if (twoAGroups.length == 1)
        twoAGroups[0].position = [360.25,101.25];
    if (oneAGroups.length == 1 && twoAGroups.length == 1)
        oneAGroups[0].position = [360,203.5];   
        if(oneAGroups.length == 2){
        var add1Group = thisDoc.groupItems.add();
            add1Group.name = "1";
            oneAGroups[0].name = "1A changed";
            oneAGroups[1].name = "1A changed";
            oneAGroups[0].position = [0,0];
            oneAGroups[1].position = [0,-100.75];
            oneAGroups[0].moveToBeginning(add1Group);
            oneAGroups[1].moveToBeginning(add1Group);       
            oneGroups.push(add1Group);
            oneAGroups.length = 0;
            redraw();
        if(twoAGroups.length == 2){
        var add2Group = thisDoc.groupItems.add();
            add2Group.name = "2";
            twoAGroups[0].name = "2A changed";
            twoAGroups[1].name = "2A changed";
            twoAGroups[0].position = [0,0];
            twoAGroups[1].position = [0,-100.75];
            twoAGroups[0].moveToBeginning(add2Group);
            twoAGroups[1].moveToBeginning(add2Group);
            twoGroups.push(add2Group);
            twoAGroups.length = 0;
            redraw();
        if (twoGroups.length > 0){
                var h = 0;
                var v = 0;
                var dieCount = 0;
                for (i = 0; i < twoGroups.length; i++) {
                    twoGroups[i].position = [horizontalCords[h],verticalCords[v]];
                    h = h + 2;
                    v = v + 2;
                    dieCount++
                    }//end FOR
            }// end twoGroups length IF
            if (oneGroups.length > 0){
            var h = 0+(twoGroups.length*2);
            var v = 0 + (twoGroups.length*2);
             for (i = 0; i < oneGroups.length; i++){
               oneGroups[i].position = [horizontalCords[h],verticalCords[v]];
                  h = h +1;
                    v = v + 1;
                 }//  end FOR
             }//  end onGroups IF
              redraw();//  redraws template so it updates changes on the page
           //thisDoc.close(SaveOptions.SAVECHANGES);
            }//  end noGo
    else
    alert("You have nothing selected...");
        totalDies = (oneGroups.length + (twoGroups.length*2) + (twoAGroups.length/2) + (oneAGroups.length/2));
    if (totalDies < 20)
        caseTest = 0
        else if (totalDies > 20)
        caseTest = 1
        else if (totalDies == 20)
        caseTest = 2;
    switch (caseTest)
            case 0:
                thisDoc.close(SaveOptions.SAVECHANGES);
                break;
            case 1:
                alert ("Die will not fit on the Template at this time.  Try again later.");
                thisDoc.close(SaveOptions.DONOTSAVECHANGES);
                break;
            case 2:
                    var answer = confirm ("The Template is full.  Do you want to clear it?");
                        if (answer == true)
                            printTheTemplate();
                            break;
    function drawTemplate(){  //draws the template if the page is empty
            var tempDoc = app.activeDocument;
        tempDoc.rulerOrigin = [0,0];
        tempDoc.pageOrigin = [0,0];
        var newLayer = tempDoc.layers.add();
        newLayer.name = "Template Layer";
        var templateGroup = tempDoc.groupItems.add();
        templateGroup.name = "Template Build";
        var vertLoc = .25;
        var horzLoc = -.25;
        var topTemp = new Array();
        var botTemp = new Array();
        var leftTemp = new Array();
        var rightTemp = new Array();
        for (i=0;i<5;i++){
            botTemp[i] = thisDoc.pathItems.rectangle(0,vertLoc,.5,21);
            topTemp[i] = thisDoc.pathItems.rectangle(1033,vertLoc,.5,21);
             botTemp[i].moveToBeginning(templateGroup);
             topTemp[i].moveToBeginning(templateGroup);
            vertLoc = vertLoc + 180;
        for (j=0; j<6;j++){
            leftTemp[j] = thisDoc.pathItems.rectangle(horzLoc,-21,21,.5);
            rightTemp[j] = thisDoc.pathItems.rectangle(horzLoc,720,21,.5);
             leftTemp[j].moveToBeginning(templateGroup);
             rightTemp[j].moveToBeginning(templateGroup);
            horzLoc = horzLoc +202.5;
    return
    }//  end function drawTemplate
    function printTheTemplate()
              // October 16, 2012  Henry J. Klementovich
            //var TemplatePath = File("C:/Users/henryk/Desktop/Illustrator Test Files/HS_TEMPLATE.ai");
            //open(TemplatePath)
            //open(myFile);
            var thisDoc = app.activeDocument;
                thisDoc.rulerOrigin = [0,0];
                thisDoc.pageOrigin = [0,0]; 
            var thePath = ("S:/TEMPLATES/PRINTED");
            //  Will only continue if the artist has selected the art.  This step saved a lengthy FOR loop that would have had to select each page or path item of the
            //  document.  Some of the templates had over 5,000 items, resulting in an un-exceptable wait-time for the loop to select them.
            for (x=0;x<thisDoc.groupItems.length;x++)
                thisDoc.groupItems[x].selected = true;
            if (thisDoc.selection.length > 0)
            //  This section pulls the date from the system for two purposes:  the date shown on the template and the date used to save the file to the ArtShare.
            //  They are different b/c system filenames cannot include the  ":" char, which is used on the template for the time object.
            var  theDate = new Date();
                    var day = theDate.getDate();
                    var month = theDate.getMonth() + 1;
                    var year = theDate.getFullYear();
                    var hours = theDate.getHours();
                    var min = theDate.getMinutes();
                        if (min < 10)
                            min = ("0" + min);
                    var morn;
                        if (hours >= 12)
                                hours = hours - 12;
                                morn = " PM";
                        else
                            morn = " AM"
            var saveDate = (month + "-" + day + "-" + year + "    " + hours + min + morn );
            var tempDate = thisDoc.textFrames.add();
                    tempDate.name = theDate;
                    tempDate.contents = (month+ "/" + day + "/ " + year + "    " + hours + ":" + min );
                    tempDate.top = 1026;
                    tempDate.left =40;
                    tempDate.filled = true;
            var actGroups = thisDoc.selection;
            var artGroup = thisDoc.groupItems.add();
                  artGroup.name = "Art Group";
            for (i=0;i<actGroups.length;i++)
                  actGroups[i].moveToEnd(artGroup);
            tempDate.moveToEnd(artGroup);
            artGroup.selected = true;
            copy();
            thisDoc.pageItems.removeAll();//  copies everything from the current template into the clipboard, clears the template, saves it and closes it.
            var layLen = app.activeDocument.layers.length;
            //alert(layLen);
            for (i=0;i<layLen;i++)
            app.activeDocument.layers[0].remove();
            thisDoc.close(SaveOptions.SAVECHANGES);
            app.documents.add();//  adds new document for the template to be saved in the Printed folder.
            paste();
            var thisDoc = app.activeDocument;  
            var saveName = new File (thePath + "/" + saveDate);
                  saveOpts = new IllustratorSaveOptions();
                  saveOpts.compatibility = Compatibility.ILLUSTRATOR13;
                  saveOpts.generateThumbnails = true;
                  saveOpts.preserveEditability = true;
                  thisDoc.saveAs( saveName, saveOpts );
            var actGroups = thisDoc.selection;
            copy();
            thisDoc.close(SaveOptions.SAVECHANGES);
            $.sleep(10);
            app.documents.add();
            paste();
            var nexDoc = app.activeDocument; 
            var actGroups = nexDoc.selection;
            var artGroup =nexDoc.groupItems.add();
                  artGroup.name = "Art Group";
            for (i=0;i<actGroups.length;i++)
                    actGroups[i].moveToEnd(artGroup);
                    //artGroup.selected = true;
                    artGroup.resize(70,70);
                    alert("The current template has been saved to the Printed Templates folder.  This page is to be printed and sent to editing.")
    Hope this helps someone get one created because if they can make one that doesn't depend on the premade dies that would help me out quite a bit because some of the dies that we make are an odd size so we have to place them manually.

  • Using a script to automate UNC definition updates for FEP 2010

    Hi all,
    I tested the script mentioned in this article
    http://blogs.technet.com/b/clientsecurity/archive/2010/09/16/using-a-script-to-automate-unc-definition-updates.aspx with no success. I am getting the following error:
    Line: 11
    Char: 5
    Error: The operation timed out
    Code: 80072EE2
    Source: WinHttp.WinHttpRequest
    the script content is as follows:
    strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86"
    strMSEx86Location = "D:\defs\Updates\x86\mpam-fe.exe" 
    strNISX86URL = "http://go.microsoft.com/fwlink/?LinkId=197095" 
    strNISX86Location = "D:\defs\Updates\x86\nis_full.exe" 
    strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64" 
    strMSEx64Location = "D:\defs\Updates\x64\mpam-fe.exe" 
    strNISX64URL = "http://go.microsoft.com/fwlink/?LinkId=197094" 
    strNISX64Location = "D:\defs\Updates\x64\nis_full.exe"
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then
    Set objADOStream = CreateObject("ADODB.Stream")
       objADOStream.Open
      objADOStream.Type = 1 'adTypeBinary
    objADOStream.Write objWINHTTP.ResponseBody
    objADOStream.Position = 0 'Set the stream position to the Start
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile strMSEx86Location
    objADOStream.SaveToFile strMSEx86Location 
    objADOStream.Close
    end if
    Anybody can help?

    This is the script that I use and it works:
    strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86" 
    strMSEx86Location = "C:\defs\Updates\x86\mpam-fe.exe" 
    strNISX86URL = "http://download.microsoft.com/download/DefinitionUpdates/x86/nis_full.exe" 
    strNISX86Location = "C:\defs\Updates\x86\nis_full.exe" 
    strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64" 
    strMSEx64Location = "C:\defs\Updates\x64\mpam-fe.exe" 
    strNISX64URL = "http://download.microsoft.com/download/DefinitionUpdates/amd64/nis_full.exe" 
    strNISX64Location = "C:\defs\Updates\x64\nis_full.exe"
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile(strMSEx86Location)
    objADOStream.SaveToFile strMSEx86Location 
    objADOStream.Close
    End IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strNISx86URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strNISx86Location) Then objFSO.DeleteFile (strNISx86Location)
    objADOStream.SaveToFile strNISx86Location 
    objADOStream.Close
    END IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strNISx64URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strNISx64Location) Then objFSO.DeleteFile (strNISx64Location)
    objADOStream.SaveToFile strNISx64Location 
    objADOStream.Close
    END IF
    Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")  
        objWINHTTP.open "GET", strMSEx64URL, false  
        objWINHTTP.send
    If objWINHTTP.Status = 200 Then 
    Set objADOStream = CreateObject("ADODB.Stream") 
        objADOStream.Open 
        objADOStream.Type = 1 'adTypeBinary 
        objADOStream.Write objWINHTTP.ResponseBody 
        objADOStream.Position = 0 'Set the stream position to
    Set objFSO = Createobject("Scripting.FileSystemObject") 
        'check if file exists if so delete 
        If objFSO.Fileexists(strMSEx64Location) Then objFSO.DeleteFile(strMSEx64Location)
    objADOStream.SaveToFile strMSEx64Location 
    objADOStream.Close
    END IF

  • HT5457 Help! I used to upload photos via ios and it was always published up to my 5th photos, but on the 6th, it just go to ios photos album and was not published on my fb's timeline...

    Help! I used to upload photos via ios and it was always published up to my 5th photos, but on the 6th, it just go to ios photos album and was not published on my fb's timeline...

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Automate the Cube loading process using script

    Hi,
    I have created the Essbase cube using Hyperion Essbase Studio 11.1.1 and my data source is Oracle.
    How can I automate the data loading process into the Essbase cubes using .bat scripts?
    I am very new to Essbase. Can anyone help me on this in detail?
    Regards
    Karthi

    You could automate the dimension building and dataloading using Esscmd/ Maxl scripts and then call them via .bat scripts.
    Various threads available related to this post. Anyways, you could follow the following steps.
    For any script provide the login credentials and select the database.
    LOGIN server username password ;
    SELECT Applic_name DB_name;
    To build dimension:
    BUILDDIM location rulobjName dataLoc sourceName fileType errorLog
    Eg: BUILDDIM 2 rulfile 4 username password 4 err_file;
    For Dataload
    IMPORT numeric dataFile fileType y/n ruleLoc rulobjName y/n [ErrorFile]
    Eg: IMPORT 4 username password 2 "rulfile_name" "Y";
    Regards,
    Cnee

  • Automatic Login using Script

    How do i automate logging into a server using script.
    i want to retrieve a specific data from a number of servers. the number of servers is too large for that to be done manually. Please find a solution for this

    Trusted RSH (using .rhosts file), trusted SSH (using .shosts and known_hosts files), or SSH with the expect utility to provide passwords. Each have their benefits and drawbacks.
    Information regarding each of these solutions is available en masse on the Internet. Google is a friend to all system administrators.

  • HT204053 I set up one apple id for icloud on my iphone and another apple id for ipad.  I cannot use icloud to automatically sync the two.

    I set up one apple id for icloud on my iphone and another apple id for ipad.  I cannot use icloud to automatically sync the two.

    How can I delete the incorrect apple id?

  • I am using a web hosted email site and I am unable to use the clipboard/cut/paste functions? I already tried to create a user.js file with script but its still not working. What else can I do?

    I have double, triple checked to script and I can't find any errors.
    The only thing I might be unsure of is the actual site that I am listing. I tried https://www.webmail.????.com and I tried https://www.????.com. Is it that its a secure site? HELP

    Did you try to use the keyboard instead (Cmd+V and Cmd+X and Cmd+C)?
    Maybe Shift + Insert works as well on Mac (does work on Windows and Linux).
    *http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
    *https://addons.mozilla.org/firefox/addon/allowclipboard-helper/ - AllowClipboard Helper

  • When using program RFDM3000/Automatic creation of dispute cases what is the difference with the option of Automatic incoming payment and Open items?

    We currently have a batch jobs running for each, automatic incoming payment and open items.  This was set up in the past and we are trying to determine what the difference is for each of these functions?  Do you need to have the automatic incoming run prior to the open items for residuals and payments on accounts?

    Hi Chris,
    Program RFDM3000 creates dispute cases for residual items arising during automatic incoming payments (account statement, lockbox), during check presentation, or in postprocessing.
    Alternatively, you can use the program to create dispute cases for open receivables items. You can use the selection criteria to restrict the quantity of open items (for example, using the document type and posting key for residual items from incoming payment postings).
    You will find more information in the link below
    http://help.sap.com/saphelp_erp2004/helpdata/en/0b/e07340b0c6980ae10000000a155106/content.htm
    Regards,
    Jose

  • I'm trying to record only part of my screen using my Quicktime 10.0, but once I press record in the "Screen recording" feature it automatically starts recording and doesn't give me the option to choose what part of the screen to capture. What gives?

    I'm trying to record only part of my screen using my Quicktime 10.0, but once I press record in the "Screen recording" feature it automatically starts recording and doesn't give me the option to choose what part of the screen to capture. What gives?

    QuickTime version 10 can only record the entire screen.
    10.1, 10.2 and 10.3 offer part of the screen recording.

  • Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts Layer Comps to PDF"? And how do I get them to look the same?

    Why do vector lines appear different in my Photoshop document compared to the PDF that was created using "Scripts > Layer Comps to PDF"? And how do I get them to look the same?

    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • Easy way to put black border around cropped video.

    Hi I was wondering if anyone knows of an easy way to put a 2-3 pixel black border around a cropped, shrunk video clip. Its kind of a picture-in-picture deal, but the "simple border" filter doesn't take into account the cropped edges. I've also tried

  • Notes not syncing between iOS devices and MacBook Pro

    Notes created on my MacBook Pro and iPad Air are not showing up on my iPhone6 and notes created on my iPhone6 are not showing up on the MacBook and iPad unless I restart my iPhone. The iPad and MacBook are syncing fine just not the iPhone.... all thr

  • Reocords keeping system for hits on the resulltant queries....

    Hi Everyone, I am new to EndecaTechnology. In terms of Endeca consider the scenario ,"When Indexed data properly present inside the application" (Server) and at that time whatever request we are doing for any search term from different locations(clie

  • ESB unable to connect to existing Web Service

    Use Case: We have an existing webservice which is RPC encoded and that had to be invoked from Oracle ESB. Version used : oracle soa suite 10.1.3.1.0. This service had to be deployed in ESB for common platform across the enterprise, where other servic

  • Pls explain this

    Hi response.setHeader("Expires","-1"); response.setHeader("Cache-Control","no-store, no-cache"); response.setHeader("Pragma","no-cache");So many times i heard about the above lines. But I cannot understand the meaning of these lines correctly. Can an