Help with my script Please

     This is a script that I am using to batch flatten and rotate(if needed) files. This script is working intermittently and I can't seem to get a handle on why I keep getting the error message:
     - Could not save as "" because the file could not be found.
     Line: 66
     executeAction( idsave, desc64, DialogModes.NO );
Please if anyone could help me that would be great.  It is getting rather annoying that it works sometimes and other times it does not. Thanks in advance.
    Clevadio
//=============Find Current Documents path================//
var CurrentPath = activeDocument.path;
//=============Establish current documents destination===============//
var folder1 = Folder(CurrentPath + '/' + 'Flats');
//=============Check if it exist, if not create it.============//
if(!folder1.exists) folder1.create('Flats');
//=============Establish current documents file name=========//
var CurrentFileName = activeDocument.name;
//=============Modify current file name================//
var modifiedFileName = CurrentFileName.replace( ".psd", "Flat" );
//=============Establish save path====================//
var saveFileCurrentPath = new File(folder1 + '/' + modifiedFileName);
//=============Flatten document ====================//
var idFltI = charIDToTypeID( "FltI" );
executeAction( idFltI, undefined, DialogModes.NO );
//=============Rotate  document if in 'Landscape'====================//
if (app.documents.length > 0) {
     var myDocument = app.activeDocument;
     if (myDocument.width > myDocument.height) RotateToPortrait();
function RotateToPortrait(){
     try{
    var idRtte = charIDToTypeID( "Rtte" );
        var desc2 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref1 = new ActionReference();
            var idDcmn = charIDToTypeID( "Dcmn" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idFrst = charIDToTypeID( "Frst" );
            ref1.putEnumerated( idDcmn, idOrdn, idFrst );
        desc2.putReference( idnull, ref1 );
        var idAngl = charIDToTypeID( "Angl" );
        var idAng = charIDToTypeID( "#Ang" );
        desc2.putUnitDouble( idAngl, idAng, 90.000000 );
    executeAction( idRtte, desc2, DialogModes.NO );
          return activeDocument.activeLayer;
     }catch(e){}
// =======================================================
//=============Now save document ====================//
var idsave = charIDToTypeID( "save" );
    var desc64 = new ActionDescriptor();
    var idAs = charIDToTypeID( "As  " );
        var desc67 = new ActionDescriptor();
        var idmaximizeCompatibility = stringIDToTypeID( "maximizeCompatibility" );
        desc67.putBoolean( idmaximizeCompatibility, false );
    var idPhtthree = charIDToTypeID( "Pht3" );
    desc64.putObject( idAs, idPhtthree, desc67 );
    var idIn = charIDToTypeID( "In  " );
    desc64.putPath( idIn, new File( saveFileCurrentPath ) );
executeAction( idsave, desc64, DialogModes.NO );
activeDocument.close()

You can turn off some of the dialogs with: app.displayDialogs = DialogModes.NO;
#target photoshop
if (app.documents.length > 0) {
//Turn display dialogs off
app.displayDialogs = DialogModes.NO;
//=============Find Current Documents path================//
var CurrentPath = activeDocument.path;
//=============Establish current documents destination===============//
var folder1 = Folder(CurrentPath + '/' + 'Flats');
//=============Check if it exist, if not create it.============//
if(!folder1.exists) folder1.create();
//=============Establish current documents file name=========//
//Current filename without the extension
var CurrentFileName = app.activeDocument.name.replace(/\.[^\.]+$/, '');
//=============Modify current file name================//
var modifiedFileName = CurrentFileName +"Flat.psd";
//=============Establish save path====================//
var saveFileCurrentPath = new File(folder1 + '/' + modifiedFileName);
//=============Flatten document ====================//
activeDocument.flatten();
//=============Rotate  document if in 'Landscape'====================//
var myDocument = app.activeDocument;
if (myDocument.width > myDocument.height) myDocument.rotateCanvas(90);
//============Save File=======================//
psdSaveOptions = new PhotoshopSaveOptions();
activeDocument.saveAs(saveFileCurrentPath, psdSaveOptions, true, Extension.LOWERCASE);
//Close Document
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

Similar Messages

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • Help with action script please

    hay guys, im having trouble with changing my action script to
    allow multiple layers of the same thing in order to show a greater
    sense of depth than the normal application. im using a flash
    toutorial on making a sort of matrix like falling text (
    link)
    and im not completely understanding what to change in order to
    accomplish my goal. i tryed to send them a message using their
    contact page, but its broken, forcing me to find a forum. im sure
    it has something to do with the third group of code where it
    identifies what its using. but whenever i change anything there to
    either match the identifiers or movie clip names the action script
    crashes when i test the movie. any help is appreciated.
    im using flash cs3 and made sure to create it all in action
    script 2.0
    please excuse my spelling, im sure i made a mistake
    somewhere.

    "FlashTastic" <[email protected]> wrote in
    message news:e4ir4t$ru4$[email protected]..
    >I don't think an enterframe will be your best bet.
    >
    > You might want to use something like
    >
    > if(_root._currentframe >= _root.totalframes){
    > loadMovie("myMovie.swf",_root)
    Why in the world would you do that when you can just put a
    keyframe on the last frame and ..
    loadMovie("myMovie.swf");
    tralfaz

  • Help with Report Script please :(

    Hi,
    I'm trying to write a report script with a slight calculation and would really appreciate some help.
    Ideally I want to create a report where I only get the Account and Value. I select all my members but I need a calculation on the Entity dimension. Here's what i am trying to achieve:
    (All selected members for all Entities + All selected members for all Entities in group RIA-IFRS REPORTING ADJS. ) Yes I'm duplicating the members of group RI-IFRS REPORTING ADJS.
    So account 100 for all Entities = 50
    account 100 for all Entities in RI-IFRS REPORTING ADJS. = 25
    I want to display account 100 grouped as 75 without showing a line for each entity.
    This is what I have so far but it doesn't work right:
    ROWREPEAT
    SUPCOLHEADING
    SUPCOMMAS
    SUPHEADING
    SUPBRACKETS
    SUPEMPTYROWS
    TABDELIMIT
    MISSINGTEXT "#mi"
    DECIMAL 2
    NOINDENTGEN
    <PAGE ( Years, Version, Currency, Scenario, InterCompany, "Entity", "Cost Center","Set of Books","Reporting")
    "FY10" "Current" "Currency" "Actual" "InterCompany" "Entity" "Cost Center" "AB_CON_USD" "Reporting"
    <ROW ("Account")
    <LINK(<DESCENDANTS("Total Balance Sheet Accounts","Lev0,Account"))
    { CALCULATE ROW "Entity" = "Entity" + "RI-IFRS REPORTING ADJS."})
    <COL (Period)
    "Dec"
    !

    Dreamscapeuk wrote:
    Hi Robert,  I wasn't getting any data, but I managed to figure that out.  Basically I created 2 columns with the values I needed and then added them up with a calc cloumn.  However I can't get my essbase substitution variables working.  So I created a substitution variable called CurrQtr  and set this to Quarter3.  In my script I'm using this @CurrQtr as  a period however it doesn't use it as it's just giving me the total for the Period dimension.  Any help?
    Here's the script:
    ROWREPEAT
    SUPCOMMAS
    SUPBRACKETS
    SUPEMPTYROWS
    TABDELIMIT
    MISSINGTEXT ""
    DECIMAL 2
    NOINDENTGEN
    <PAGE ( DataSrc, Years, Version, "P&L Type", Currency, Scenario, InterCompany, "Cost Center","Set of Books","Reporting")
         "DataSrc" "FY10" "Current" "No_Type" "USD" "Actual" "InterCompany" "Cost Center" "AB_CON_USD" "No_Cost_Type"
    <COLUMN (Period)
              @CurrQtr
         WWL "RIA-IFRS REPORTING ADJS."
    CALCULATE COLUMN "Gaap" = 1 - 2
    ORDER 0,3,1,2
    <ROW (Account)
    <LINK(<DESCENDANTS("Global Accounts","Lev0,Account"))
    In my script I'm using this @CurrQtr as a period however it doesn't use it as it's just giving me the total for the Period dimension. Any help?
    I don't understand this...
    *<COLUMN (Period)*
    *          Qtr3      WWL "RIA-IFRS REPORTING ADJS."*
    have you tried like this.??
    Edited by: Prabhas on Feb 1, 2011 12:05 AM

  • Help with a script please

    Can anyone suggest a simple script to delete ~Library/Caches/Firefox evey time a user logs out? I want to trial such a script because the proxy is making Firefox act very starnge and deleting this folder gets it going again . . Thanks very much.

    take a look at http://www.bombich.com/mactips/loginhooks.html

  • Help with SQL Script please

    Hi there,
    What I`m trying to accomplish here is the following guys;
    This would be the pseudo code that I`m trying to convert into proper SQL;
    Declare @Parameter varchar(50)
    now I`m trying to find out how to find whatever is in the @Parameter in the values of table column. something like this;
    If @Parameter exists in (select column from table) then do something here else something else....
    Thanks very much in advance for your help.

    do you want some thing like below
    Declare @Parameter varchar(50)
    If exists (select column from table where column = @Parameter)
    begin
    --do something here
    END
    else
    Begin
    --something
    END
    Thanks
    Saravana Kumar C

  • Help with button code please?

    I am a novice and have just completed my first animated movie. I need help with action script.
    The movie is currently looped and I have created and invisible button the size of the frame with the intention that a user can click on the movie image to stop it and on second click continue the movie from where it stopped.
    I have used the AS event handler method to stop the movie. I have tested it and it works. But I cannot figure suitable code to restart the movie.
    Two questions;
    1. am I going about the task the right way? (should I use two buttons, one stop, one start)?
    2. if my approach is feasible, can anyone give me the correct AS to re-start the movie and put me out of my misery please?

    you can use the following after changing "yourbutton" and "yourmovieclip" to use suitable instance names:
    yourbutton.onRelease=function(){
    if(!this.toggle){
    yourmovieclip.stop();
    } else {
    yourmovieclip.play();
    this.toggle=!this.toggle;

  • Help with access control please

    So I'm trying to set up my brother's PSP to the wirless network through MAC address timed access. What I want to do is make it so that he can only access it through certain times in the day. I'm having troubles with actually getting it to work. Everytime I set it up, the PSP only show's up as a DHCP client and not a Wireless client. I tried the option panel with the add wireless clients through the first try access. Could I get some help with this issue please? Thanks!

    Just to calm your fears... There is no conspiracy. If someone had an answer or a suggestion they would post it.

  • Help with Apple Script Code

    Hi,
    I found this Apple script online and here's how it works:
    tell application "QuickTime Player"
    activate
    try
    if not (exists document 1) then display dialog "Please open a QuickTime movie." buttons {"Cancel"} default button 1 with icon 1
    set thefile to (choose file name)
    save document 1 in thefile
    close document 1
    end try
    end tell
    +I run the Apple script+
    *1. It prompts me to open a movie file in Quicktime*
    +I open a movie in Quicktime+
    *2. It prompts me for an name and directory to save the new file in*
    +I enter a name and directory+
    *3. It saves a new reference movie in said directory with said name*
    This is useful if I want to customize every file, but unfortunately, I just want to mass create reference movies for a whole bunch of files.
    What I am looking for is for an Apple script that is a drag and drop application, so I can drop say 100 movie files or so, and have the Apple script create reference movie files with the same name and in the same directory automatically with no prompts.
    Since I am unfamiliar with Apple script I was wondering if someone would be able to edit my existing script to do what I want.
    Thanks so much for your help!

    Use Automator. It's great for repetitious tasks (like the one you've described), and it's very user-friendly. Open Automator, create a new workflow that executes the action you want, and you can apply that action to the resources you wish to edit.
    Good resource here:
    http://bit.ly/

  • Help With dynamic scripting for Dervied Property

    Hi,
    I am trying to get the the list of child nodes and then loopthorugh those nodes to do some calculation in a derived propety using dynamic scripting. I tried with below script.
    var childEnumerator = node.GetChildEnumerator();
    while(childEnumerator.MoveNext())
        var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
        print(propValue);
    While Evaluating this script I am getting below mentioned error. Any idea what i am missing here?
    DRM-16008: There was an error calculating Script property Custom.TotalSalaryExp for EMP_Zone/Emp/PPD1: TypeError: 'GetChildEnumerator' is not a function
    Please help me out. thanks fr your co-operation
    Regards,
    Sudipta

    Try this instead...
    var childEnumerator = node.GetChildEnumerator();
    childEnumerator.MoveNext();
    while(childEnumerator.GetCurrent() != null)
        var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
        print(propValue);
    childEnumerator.MoveNext();

  • Help with Required fields-PLEASE

    I have been attempting to get help with a required field and one of the forum helpers said he got it to work for me but I cannot and I have not been able to get any more responses from him to help me further.
    I am attempting to have a radio box when the YES is selected to require another field to be completed.  The script I was provided with is:
    getField("Location").required = (getField("Group1").value == "Yes");
    Location being the field that I require to be filled in if Group 1 is Yes.  The previous forum helper indicated that I had to have this script in both fields in Group 1 and when I do that, nothing different happens. 
    What am I doing wrong? 
    Please, I need to fix this right away and I will be using this java script on many other forms that I have so I need to get this done soon.
    Thank you in advance.

    Wht you want can get somewhat complicated. One way to prevent subsequent fields from being used is to set them to read-only and/or hidden. You could then use the Validate event of the text field to validate the entry and enable the subsequent fields if it is filled-in adequately. In general, you should also reset the fields whenever you hide them, so they don't contain potentially invalid data from previously being filled-in. So you could initially have the fields set to be hidden, and only unhide them if No is selected, or if Yes is selected and the required text field is filled-in.
    I realize this may not be as helpful as you had hoped for, but I can't suggest specific code without knowing more about the form.

  • Need help with a script applied by GPO

    Hello,
    I need to automate WebFeed insertion for Remote App Users at user logon.
    RDS 2012 R2 in place. Remote Apps are provided to W7 clients.
    Currently, WebFeed link must be inserted manually in each user's Control Panel\RemoteApp and Desktop Connections. There
    is no straight forward way from Microsoft.
    But there is a script and instruction I found on web...
    I followed the instruction... Created GPO. GPO applies to user but nothing happens.
    Can somebody check the script and the instruction that I could wrongly applied.
    In instruction there is no word about changing something in the script but only wcx file that the script should
    use.
    The script is below and here is my .wcx file:
    <?xml version="1.0? encoding="utf-8? standalone="yes"?>
    <workspace name="Enterprise Remote Access" xmlns="http://schemas.microsoft.com/ts/2008/09/tswcx" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <defaultFeed url="https://my_webserver_real_FQDN/rdweb/Feed/webfeed.aspx" />
    </workspace>
    I changed the quotes to vertical (") from (”) that
    were in my wcx when copied the lines from web.
    Still not works.
    I
    checked Application log, PowerShell and RemoteApp in eventviewer under user session
    Everything is clean.
    Were I can check the script execution log?
    When the user with applied script logs in, the icon of Remote
    connection appears for 10 seconds on the task bar and disappears.
    Looks like it's trying...
    Check please if the script really should not be touched and provide some troubleshooting
    steps.
    Thanks!
    INSTRUCTIONS from
    the link:
    http://www.concurrency.com/infrastru...rver-2012-rds/
    "Unfortunately
    Windows 7 clients are out of luck here. If you really want to use GPO to deploy
    RemoteApps to Windows 7 clients, then you have to jump through a few
    hoops.
    Create a new GPO and under User ConfigurationPoliciesWindows
    SettingsScripts, double click Logon and click the
    Show Files
    button. This will open an explorer window where you can copy files that will be
    saved within this GPO. Download the
    Install-RADCConnection.ps1 script from the TechNet gallery and
    save it there. Also create a new Text file named something like feed.wcx,
    open it in Notepad and paste in the following three lines of text:
    <?xml
    version=”1.0″ encoding=”utf-8″ standalone=”yes”?>
    <workspace
    name=”Enterprise Remote Access” xmlns=”http://schemas.microsoft.com/ts/2008/09/tswcx”xmlnss=”http://www.w3.org/2001/XMLSchema”>
    <defaultFeed
    url=”https://rds.domain.com/RDWeb/Feed/webfeed.aspx”
    />
    </workspace>
    Now select the PowerShell Scripts tab and
    click the Add button.
    Click Browse and select the .ps1 file and
    for the parameters enter the name of the wcx file. Click OK twice and you are
    ready to scope that policy to a set of users.   
    <#
    .SYNOPSIS
    Installs a connection in RemoteApp and Desktop Connections.
    .DESCRIPTION
    This script uses a RemoteApp and Desktop Connections bootstrap file(a .wcx file) to set up a connection in Windows 7 workstation. No user interaction is required.It sets up a connection only for the current user. Always run the script in the user's session.
    The necessary credentials must be available either as domain credentials or as cached credentials on the local machine. (You can use Cmdkey.exe to cache the credentials.)
    Error status information is saved in event log: (Applications and Services\Microsoft\Windows\RemoteApp and Desktop Connections).
    .Parameter WCXPath
    Specifies the path to the .wcx file
    .Example
    PS C:\> Install-RADCConnection.ps1 c:\test1\work_apps.wcx
    Installs the connection in RemoteApp and Desktop Connections using information
    in the specified .wcx file.
    #>
    Param(
    [parameter(Mandatory=$true,Position=0)]
    [string]
    $WCXPath
    function CheckForConnection
    Param (
    [parameter(Mandatory=$true,Position=0)]
    [string]
    $URL
    [string] $connectionKey = ""
    [bool] $found = $false
    foreach ($connectionKey in get-item 'HKCU:\Software\Microsoft\Workspaces\Feeds\*' 2> $null)
    if ( ($connectionKey | Get-ItemProperty -Name URL).URL -eq $URL)
    $found = $true
    break
    return $found
    # Process the bootstrap file
    [string] $wcxExpanded = [System.Environment]::ExpandEnvironmentVariables($WCXPath)
    [object[]] $wcxPathResults = @(Get-Item $wcxExpanded 2> $null)
    if ($wcxPathResults.Count -eq 0)
    Write-Host @"
    The .wcx file could not be found.
    exit(1)
    if ($wcxPathResults.Count -gt 1)
    Write-Host @"
    Please specify a single .wcx file.
    exit(1)
    [string] $wcxFile = $wcxPathResults[0].FullName
    [xml] $wcxXml = [string]::Join("", (Get-Content -LiteralPath $wcxFile))
    [string] $connectionUrl = $wcxXml.workspace.defaultFeed.url
    if (-not $connectionUrl)
    Write-Host @"
    The .wcx file is not valid.
    exit(1)
    if ((CheckForConnection $connectionUrl))
    Write-Host @"
    The connection in RemoteApp and Desktop Connections already exists.
    exit(1)
    Start-Process -FilePath rundll32.exe -ArgumentList 'tsworkspace,WorkspaceSilentSetup',$wcxFile -NoNewWindow -Wait
    # check for the Connection in the registry
    if ((CheckForConnection $connectionUrl))
    Write-Host @"
    Connection setup succeeded.
    else
    Write-Host @"
    Connection setup failed.
    Consult the event log for failure information:
    (Applications and Services\Microsoft\Windows\RemoteApp and Desktop Connections).
    exit(1)
    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    Use GPP for this. Do not use a script.  Post your issues in the GP forum.
    You should also visit the RDS forum to get information on how to distribute remote app links.
    ¯\_(ツ)_/¯

  • NEED a java coder to help with a script for a programs of mine.

    I play a game, very competitively, and need someone to make and compile a script for me. I am willing to pay upwards of 100 USD for this script made to MY standards. There will be a lot of work involved...Probably 12 hours studying my game and the purpose of the script(s). I will be buying 2-3 scripts, at roughly 50-100 USD each, depending on the quality. I will transfer the money via paypal, or other means if we can reach an agreement.
    Please IM me at Chadtrapier on AIM or send an email to [email protected]
    Or...Add me on MSN - [email protected]
    We can reach an agreement with these scripts...
    Thank you, I will also check this thread, so reply if you would like.
    ~Chad

    Ummm. Do you think that's a lot of money or something? Think in the range of 40-60 per hour. And if you're talking about warcraft I don't think they java hooks to make bots. I think you need to figure out what your problem is first and maybe learn to code them yourself.

  • Help with photo albums Please

    Hi, i really need some help with my pictures, I've only got a very basic understanding of how my phone works and have somehow put a load of albums on my phone when i plugged it into the computer-I want to delete some of them off the phone but cannot work out how to do it, when i plug my phone in i can find the photo tab but cannot actually see the pictures and can't see any delete button!!! Please can someone help me, basic explanations would be gratefully recieved xxxx

    The photo sync is one way: computer to phone. To remove photos, synced to your phone, remove the check marks next to the albums/folders under the photos tab in itunes & hit the apply/sync button. They will be removed from your phone. You cannot delete photos that were synced to your phone, directly on your phone. The easiest way to manage photos synced to your phone is to create albums or folders on your computer. Move whatever photos you want on your phone into these albums/folders & then select them under the photos tab in itunes to sync to your phone. You can then remove or add photos to these various albums/folders on your computer & the itunes sync process will update your phone every time you sync.

  • Help with Validation Problem Please

    I don't understand this validation and don't know how to fix it. I have checked my other websites and they seem fine. I don't think I have done anything different The link for the website ishttp://www.greenpatchwebsites.com/pow/index.html
    and the validator is http://validator.w3.org/check?uri=www.greenpatchwebsites.com%2Fpow%2Findex.html&charset=%2 8detect+automatically%29&doctype=Inline&group=0
    Please can you help.
    Thank you very much in advance.

    Thanks for that. I have tried it on a new page: http://www.greenpatchwebsites.com/pow/newtest.html and here is the validator :
    http://validator.w3.org/check?uri=www.greenpatchwebsites.com%2Fpow%2Fnewtest.html&charset= %28detect+automatically%29&doctype=Inline&group=0&No200=1- unfortunately loads of errors
    I also tried the recommended template:
    Use the following markup as a template to create a new XHTML 1.0 document using a proper DOCTYPE. See the list below if you wish to use another document type.
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
         <title>An XHTML 1.0 Strict standard template</title>
         <meta http-equiv="content-type"
              content="text/html;charset=utf-8" />
         <meta http-equiv="Content-Style-Type" content="text/css" />
    </head>
    <body>
         <p>… Your HTML content here …</p>
    </body>
    </html>
    but was getting errors with that. As you can tell, I need serious help with this. Which doc type should I be using
    and why doesn't Dreamweaver just do it for you when you select one?
    Thanks very much again in advance.

Maybe you are looking for

  • Optimizing JOIN

    In the process of looking into an application's performance issues with large data sets I found the primary culprit to be a single SQL query in a PL/SQL package. The call CALL MY_PKG.MY_FUNCTION(7) contains the following select statement that takes ~

  • Pages created by other applications

    I have some applications which create html from within them to post on the web. I have my own domain, and have had no issues creating pages with links to these pages. With iWeb, how do I create a dead link, so I can add the pages to the site folder?

  • Firefox crashes on start. Profile manager also crashes. Already reset.

    Firefox crashes before it even fully starts. I tried to do the profile manager trick but profile manager crashes, too. I started in safe mode and did the reset Firefox thing, that didn't help. I deleted the cache while in safe mode. I even uninstalle

  • Open target quantity in ME2N

    Hello, what is open target quantity in ME2n report it is always 0? Regards Senthilnambi

  • Regarding ship to party

    i need to select ship to party ... which table can i use (other than likp)........