New To Scripting and stuck on first task

thanks

they have asked me to create a powershell script to run the above daily.....
Is it possible to do that
Yes but you need to follow my recommendations.  You need the components installed and you need to learn how to use them.  Each product has its own forum for questions.
You will learn a lot.  You will need to learn IIS and Cognos at a technical level and not just at the GUI level.
¯\_(ツ)_/¯

Similar Messages

  • New to AS and stuck on IF statements

    I am trying to make a currency converter and Im using IFs to determine the from and to currency and then make the appropriate calculation. So far, I cant get anything to work. Here is the original code that I was using (but didnt work):
                   var a:String=String (OriginCurrenyCode.text)
                   var b:String=String (DestinationCurrencyCode.text)
                   var c:Number=Number (AmountToBeConverted.text)
                   if (a == "USD"){
                        if (b == "GBP"){
                             var ab:Number=Number (c*0.60)
                             ConvertedAmount.text = String(ab)
                        else if (b == "EUR"){
                             var ac:Number=Number (c*0.71)
                             ConvertedAmount.text = String(ac)
    Obviously there is much more, and the conversion rates arent completely accurate but thats the basis. I've tried every possible change I can think of but have no idea how to make this work.
    I am new to Actionscript and dont have any programming experience so any help is much appreciated.
    Thanks!!!
    Dave

    I agree that the switch statement would make the code easier - and perhaps faster as well. But, I personally never use switch statements in any code I write ever. When I first began programming, an experienced programmer told me that switch statements are frowned upon.
    Here's why (from wikipedia): "When implemented with fall-through as the default path, switch/case statements are a frequent source of bugs among even experienced programmers, given that, in practice, the "break" is almost always the desired path, but not the default behavior of the switch/case construct (at least in C and Java)."
    So, I've always stuck with if, then, else type statements even though they are harder to read and can be more painful to write and have serveral other disadvantages.

  • I need to delete old apple ID and password and assign new apple ID and password.  FIrst Apple ID was Compromised

    I need to delete the name of my old apple ID and password since it was hacked.  I created a new Apple ID, and password they work fine getting in and out of account however Apple has kept my old hacked account in their record for updates.  I also can not use ITunes applications because Apple has kept old hacked email in their system and they are matching it up to my IPAD and my IPOD touch serial numbers I believe.  Any Idea how I can fix this my self without buying their phone warranty plan?   I have gone into settings and tried updating info their and with apple on phone once before they said they fixed it and now the latest IOS 6 update won 't load to IPOD TOUCH due to this.
    HELP !!!!!! PLEASE!!!!!!!!!!?????????????AT A LOSS ON THIS ONE???????
    Any suggestions would be appreciated?

    First, if you still have access to the hacked account, rename it if you can and change the password for it.
    How to change the name you use for your Apple ID
    If needed, change the email linked to it as well.  Get control of that account back.
    As all iTunes purchases are linked to the account that purchased them (music, apps, etc) it is best to rename an account rather than creat a new account.  Apple ID's can't be deleted or merged either.
    From Frequently asked questions about Apple ID
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you need further Apple ID help, you will want to contact Apple, Apple ID Support
    or maybe iTunes Support
    ivan

  • New to Java and stuck on alert ticker issue

    Hi, I'm a newbee so go easy on me. Here's the issue. The company I am interning for monitors its networks using a console called WhatsUp Gold. The program creates alerts to inform of any issues on the network or when thresholds are close to being reached. This is done using some form of Java which I can view by opening the source files. They have asked me to try and create a scrolling ticker that automatically updates in real time along with the WhatsUp program. I have downloaded INSCRO (a ticker creator) but when I try to direct the feed to the URL on WhatsUp, the ticker scrolls the Java script and not the text that I need it to. Any ideas on how to get it to pull the text vs the source file?
    Thanks in advance!

    First, you need to get straight the difference between Java and JavaScript. They're related only by having similar names. If you're doing "View Source" in a web browser, what you're seeing is JavaScript, NOT Java. If this is where your question lies, you need to find a JavaScript forum.

  • Create New User Script and Change Home Dir

    I am working on creating a portable user for my usb flash drive so that I can take my desktop anywhere. I was wondering if there was a way that I could make a shell script to:
    1. Create a user account named acnt with the password pswd
    2. Change the NetInfo link of the accounts home directory to /Volumes/Users/User/acount
    I know how to do this in gui, but I would like a more stream lined aproach to doing this. Thank you.

    Dear Dominic,
    There are a number of ways to do this deppending on exactly what you want to do.
    The easy way is to create a file called .profile. .profile will change directories when you login. But this only works as far as terminal login is concerned. To do this type.
    cat>.profile
    cd /Volumes/Users/User/account
    <control D>
    Another way to do this is to use netinfo to adjust the values in the netinfor equivalent of /etc/password. You just set the home directory to where ever you want to login. But as I understand it, This has problems if you try to use Micro$oft software. I have NOT tried this, I just recall seeing a message to this effect in this fine forum.
    I am on the road, so I do NOT have my library and note books. If you need more details on how to use netinfo, just post more questions. Someone else will figure out the details or I will see them when I return to my notes and library.
    Your humble unix geek,
    Kurt

  • I just got a new iPhone 4 and when I first plugged it in to activate it, I cancelled it, now I can't activate it - help.

    iPhone 4 won't activate

    How did it make you create a  new id and update?
    You don't have to update unlesss you choose to update.

  • I bought a new airport extreme and on the first day, it worked well but the apple tv is lagging behind

    When I got this and hooked it up. it was so easy to connect it to the puter and all but apple tv is lagging behind, so slow and had to wait to catch up to be able to watch movie(s) What can I do about it? ( the previous airport extreme had no problem with the apple tv, never lags behind.
    H.E.L.P.

    Dear LaPastenague,
    many thanks for your ultra response...I have revisited my earlier  thoughtsi / question...I possibly may have not mentioned, the whole intention was to add another device which is in my kitchen and cabling to it could prove time consuming....
    Just came back from Maplins with a NetGear universal wireless adaptor for my Win XP machine which will be located in the kitchen.
    I was balancing future swap arounds with the AE if my TC [ 2nd Gen] decides to pack up on me.
    Good evening
    Regards

  • Brand New Apple TV and Stuck on Connectivity - Won't Let me Go Back and Re-Enter PW or Setup

    I plugged in my Apple TV and just got past the language selection. Then to wifi - found my network - entered my password, which I suspect I entered incorrect - and I get a message that I can't connect to the internet. I am right at the beginning stage of starting up from factory settings and have not even seen a screen with the set up selection. When I try to go back to see if I can re-enter my password, it won't let me - and keeps using the wrong password. I tried re-setting and it didn't work. Very frustating. Not user friendly at all. Why doesn't set up menu show? This should be easy - and its not.

    When I try to go back to see if I can re-enter my password, it won't let me
    Go back where?  What won't let you?  Does the network menu under settings show you are connected?
    Why doesn't set up menu show?
    The settings menu is always on the main screen.

  • New to Scripting

    Hi all, I'm new to scripting and wondered if there was a way to select a certain layer out of three that were present?
    Any info would be great,
    Cheers,
    -Ford

    Ok, Just to make my question a little clearer, Can anyone tell me a way to add to a script a way to select a layer and everything in that layer by using the current layer selected as a reference, Select the next or previous layer basically.

  • My brother purchased new ipad 4, 5 days ago and the sim tray stuck very first day. I gave it to jaipur service centre for repair and they are asking for 20000 Rs (price of ipad mini for just sim tray repair). What should i do?

    Dear All,
    My brother just purchased an ipad4, 5 days ago and the very first day sim tray stuck. When i sent it to jaipur (rajasthan) service centre, they asked Rs 20,000 for repair and issuing new tray. This is the cost of new ipad mini, and they are giving me just one tray. It is also approx. half of the price of new ipad4. Even the new ipad is just 5 days old and should be repaired for free. If not free, is Rs 20,000 is fair?
    Please tell me what should i do?
    Thanks!
    [email protected]

    If the service center determined that the SIM socket was damaged by your brother, as would appear to be the case, and not due to a factory defect, they will charge for replacing the entire iPad, not just for the SIM tray. Apple at this time replaces the iPad for just about any problem, and charges a flat fee for doing so.
    If this service center is one authorized by Apple, your brother can try calling Apple Support India at (91) 1800 4250 744 and discussing the situation with them. Ultimately, though, it is the technician's judgement as to what caused the problem, and Apple will usually take the word of the technician when it comes to determination of user-caused damage.
    Regards.

  • Errors and more, my first illustrator script

    First, I should mention that I started scripting for Photoshop about a month ago and have had some really motivating successes there. It led me to this one task we have that is just incredibly repetitive and boring in Illustrator that I want to script.
    I haven't gotten all the pieces in here that I need so far, and any form of help would be greatly appreciated, whether just suggestion, or really whatever. I don't mind doing research and trying things out myself.
    The purpose of this script is to open a template file we have on our network drive, ask for a folder with a collection of files (these are files provided to us that contain the info we need to make labels), place one, save with a specific name, and start over, placing the next file, till they are all on the template. We do this before we can create labels for our products. There are weeks when it has to be done 50+ times and that's pretty mind-numbing.
    The steps I think I need are:
    ask where the provided files are that need to be placed
    open template file
    make sure the folder chosen has the right type of stuff in it (PDFs)
    place the first file at specified coordinates
    embed the link
    lock the embedded link
    ask user to proof information on screen (ok to continue, cancel to stop and let user interact with file on their own) (95% of the time, there are no errors)
    use the embedded link's name as the name of the file and save it to a specific network location
    repeat until all the files in the chosen folder have been done
    I've been lurking around here for a couple days, reading up on how Illustrator works with scripting and have broken off bits and pieces of different scripts to adapt for my purposes. So far, this is what I've come up with:
    function getLabelRequests() {
         return Folder.selectDialog('Please select the folder containing label requests:', Folder('~/Desktop'));
         function placeLabelRequests(selectedFolder) {
              var myDoc;
              if (selectedFolder) {
              var fileRef = File("/Volumes/myNetworkLocation/myTemplateFile.ai")
              open(fileRef);
              myDoc = app.activeDocument;
              var firstImageLayer = true;
              var thisPlacedItem;
              // create document list from files in selected folder
              var fileList = selectedFolder.getFiles();
              for (var i = 0; i < fileList.length; i++) {
              // open each document in file list
              if (fileList[i] instanceof File) {
              // get the file name
              var fName = fileList[i].name;
              // check for supported file formats
              if( (fName.indexOf(".pdf") == -1)) {
                   // skip unsupported formats
                   continue;
                   } else {
                        // Give the file the name of the image file
                        File.name = fName.substring(0, fName.indexOf(".") );
                        // Place the label request on the artboard
                        thisPlacedItem = myDoc.layers['Job Form'].placedItems.add();
                        thisPlacedItem.file = fileList[i];
                        thisPlacedItem.position = [15,-45];
                        thisPlacedItem.embed();
         if( firstImageLayer ) {
         // display error message
         alert("Sorry, but the designated folder does not contain any recognized image formats.\n\nPlease choose another folder.");
         myDoc.close();
         getLabelRequests (placeLabelRequests());
         else {
         // display error message
         alert("Rerun the script and choose a folder with label requests, if you please.");
    // Start the script off
    placeLabelRequests (getLabelRequests ());
    So obviously there's no loop in there, which is one of my problems at this point. I know what each of these chunks of code do, but can't necessarily understand all the syntax. Particularly things like
    for (var i = 0; i < fileList.length; i++) {
    I know it's saying that the variable i is zero, and while the list of files is greater than i, do whatever that last bit means, but I don't really know why it works or how it was constructed originally.
    I haven't specified the save either, which might be why I'm running another of my problems, but I don't know how to get the name of the link to be the name of the file when it's saved. I also haven't given it a confirm to let the user proof either.
    Here's my list of problems:
    Running the script returns the image format error, even though the folder selected contains PDFs (I suppose I don't need to confirm the files are PDFs, that could just be incumbent upon the user)
    Running the script places all the files into one iteration of the template (this may be because I haven't gotten the save or the loop in there, but I think it has more to do with the function being set up the way it is)
    Obviously, it doesn't save with the link name as the file name
    I don't seem to be able to figure out how to lock the link after it's embedded.
    I also wonder if there's a way to, rather than opening-placing-saving-closing-repeat, to open-place-save, delete-placenext-save, delete-placenext-save.
    Phew, sorry for the short novel.
    Here is a copy of the template … or not. Can I not embed files in the post that aren't images?
    Here's a JPG of the AI file that I use as a template
    This document has two layers in this order normally:
    Artwork
    Job Form
    And here are the blocks I'm using as placement for the information we are provided. These are taking the place of the files that need to be placed, and again, were PDF files, but I'm uploading as JPGs because I either don't know what I'm doing, or you can't upoad those file types.

    I worked around the place options for the PDF by adding in a function I found on this forum. It detects clipping masks and deletes them.
    There's one line in here that doesn't do anything, and I'm figuring out if it needs to be changed. After the clipScan function runs, I'm telling Illustrator to place a variable at a specific position, but because clipScan modifies the variable, it no longer recognizes that group of page items as the variable. Temporarily, I've used the original place position to make sure the link sits right where I want it to, but I have to make sure that the files we are provided never look any different.
    If they do, I'll need to asign a new variable and set the position after clipScan runs, I think. If it's necessary, I'll update with the fix, otherwise I think this is the final script.
    #target Illustrator
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    function getLabelRequests() {
        return Folder.selectDialog('Please select the folder containing label requests:', Folder('~/Desktop'));
    function placeLabelRequests(selectedFolder) {
        var myDoc;
        if (selectedFolder) {
            var fileRef = File("/Volumes/graphics/Standards/Job Forms/Label Job Form-5C.ai")
            var thisPlacedItem;
            // create document list from files in selected folder
            var fileList = selectedFolder.getFiles("*.pdf");
            for (var i = 0; i < fileList.length; i++) {
                // open each document in file list
                if (fileList[i] instanceof File) {
                    //open job form
                    open(fileRef);
                    myDoc = app.activeDocument;
                    // Place the label request on the artboard
                    thisPlacedItem = myDoc.layers['Job Form'].placedItems.add();
                    thisPlacedItem.file = fileList[i];
                    thisPlacedItem.position = [-50,10];
                    var myLinkName = myDoc.placedItems[0].file.name
                    thisPlacedItem.locked=true
                    thisPlacedItem.embed();
                    var clippingCount = 0
                    clipScan(myDoc)
                    thisPlacedItem.position = [15,-45];//this is the line that isn't doing anything right now.
                    redraw()               
                    //make sure the placed job form has the correct information
                    var proof = confirm ("Does the job form have the correct information?", true)//needs the redraw step above or nothing shows when the alert happens. Redraw forces Illustrator to display the actions performed so far.
                    if (proof) {
                        IllustratorSaveOptions = new IllustratorSaveOptions()
                        IllustratorSaveOptions.compatibility.ILLUSTRATOR15 //some of our printers have yet to upgrade
                        var onPO = Folder ('/Volumes/graphics/ •••Drafts•••/ • Draft Labels/ •On PO')
                        var saveFile = File(onPO + '/' + myLinkName);
                        myDoc.saveAs (saveFile, IllustratorSaveOptions)
                else alert ('Make note of the file with an error. This file will not be saved.')
                app.activeDocument.close (SaveOptions.DONOTSAVECHANGES)
        else {
            // if user cancels action, display message
            alert("Rerun the script and choose a folder with label requests.");
    // run the script
    placeLabelRequests (getLabelRequests ());
    //////////////////////////function to remove clipping paths from placed item, thanks to KennethWebb, Muppet Mark and CarlosCanto on the Adobe Illustrator Scripting forum.
    function clipScan (container) {
        for (i=container.pathItems.length-1;i>=0;i--) {
    var item = container.pathItems[i];
            if (item.clipping == true){ //screens for locked or hidden items (removed this after true:  && item.editable == true       so it no longer screens for locked or hidden items
                container.pathItems[i].remove();
                clippingCount++;

  • HT201210 my new iphone 4 is stuck with "USB connect to itunes".  I put it in recovery mode last night, but it doesn't change.  Itunes recognizes the phone and says it's in recovery mode, but when I do a restore, nothing changes.

    my new iphone 4 is stuck with "USB connect to itunes".  I put it in recovery mode last night.  Itunes recognizes the phone and says it's in recovery mode, but when I do a restore, nothing changes.

    it says "itunes has detected an iphone in recovery mode.  you must restore this iphone before it can be used with itunes."  I click OK
    then I click the restore button
    Then the box says "Are you sure you want to restore the iphone to it's factory settings?  all of your.....etc."  I click Restore and Update
    then it goes into software update
    at the end of the software update it says "Itunes has detected an iphone in recovery mode...."
    All this time, the screen of the iphone stays on with USB to Itunes
    I might add that while the phone was in it's first attempt at recovery mode, it was accidentally unplugged.
    any suggestions?

  • So, I have just about had it. For nine days now,  I have valiantly tried to move my library to an external drive. At first, I attempted to move it to my 2TB Time capsule, iTunes didn't like its new home though and moved home without telling me.

    So, I have just about had it. For nine days now,  I have valiantly tried to move my library to an external drive. At first, I attempted to move it to my 2TB Time capsule. iTunes didn't like its new home though and moved home without telling me. So then there were two libraries. I meshed them back together reluctantly and iTunes in a silent revolt, absolutely refused to use its own 'Keep Library Organized' criteria and may as well have thrown my music against the wall. Seriously, my 5 year old nephew has his computer files better managed. Then I bought a 3TB Time Capsule and you may ask yourself why??? Well, iTunes doubled in size- although when I ran apps that are designed to find duplicate iTunes files, it deleted the music I actually bought from iTunes. So then I watched as iTunes got it back. How you ask; I run a MacBook Air, iMac and Mac mini in my house - as soon as one powered up it hit the net like a sailor on leave and re-downloaded it all without abandon. I tried to keep the libraries separate, no success there. I tried to keep them unified; iTunes response was to ask me if I wanted to join iTunes Match every time I logged on to my computer and on any computer - my iTunes match song number has been as high as 24,367 and as low as 11,112. And I can't simply refuse iTunes. No one refuses iTunes. Refusal to allow iTunes Match to run through all 24000 songs again was to revoke my rights to the songs that were once part of my library. If I took a long time to decide or was visibly impatient while iTunes did its little 3 hour scan it would arbitrarily decide that music I bought from iTunes was ineligible for iTunes Match. How could that possibly be??? I am missing music, or at least iTunes tells me so by showing me that lovely exclamation point. I have tried backing up my computer to do a full system restore and start all over. Time Capsule claims I have 979 GB of data and takes its sweet time to even back up one gig (about 18 minutes) even though I can transfer files to my Time Capsule at about 1 GB every 40 seconds. I guess though performing back-ups are somewhat like government jobs; it will get done, when it gets done. The back up requirement of 979 GB is surprising though, my Mac claims that I currently occupy just about 25% of my 2TB drive. The discrepancy, who knows, but I think the solution lies somewhere in iTunes. But maybe iPhoto. But that is for another time.

    After admittedly only a quick read the one thing you don't say is how you are trying to make this move.  Most people with moving library issues do it the wrong way.  Plenty of web sites tell you how to do it the wrong way.
    If the iTunes application is started before the drive with the library is fully mounted and awake iTunes will revert back to the internal drive.

  • I got a new laptop and downloaded iTunes, when I put new music on it for the first time, my entire music library disappeared, leaving me with only newly downloaded music in my library. My iPod still has all my old music.

    Recently, I bought a new laptop (a Lenovo), so I downloaded iTunes to it. When I bought new music from iTunes for the first time on the new computer, I went to my music library and there was no music, except for the new songs I had just bought. I have no idea what happened, I've had hundreds of songs I've bought from iTunes or downloaded from bought CDs over the years, which are all still on my iPod (nano, from 2008), and suddenly they just didn't seem to exist. I have yet to access the iTunes account on my previous laptop to see if my music is still there, but I would assume yes. When I went to sync my iPod to my iTunes to at least get the new songs to the iPod (so that my complete library can be on at least one device), I realized that in order to sync my iPod to my iTunes, I would be deleting all my old music and replacing it with the new. So now, I only have a few new songs on my laptop's iTunes, and only my old songs on my iPod. In both cases I paid for all the music, so I don't want to just delete any of it. Is there any way to fix this?

    Also-I tried to use my backup hard drive, but I wasn't able to drag/transfer/send/move any of my muic files onto my iTouch when the iTouch was connected to my computer.  I can't figure out why it won't let me do that. 
    The only thing I can see when I open my iTouch on my computer is my file with photos.  I can't see videos, music, or anything else.  What's going on?

  • Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,change remotes, no change.Help please.

    Purchased a new Apple TV and the remote double clicks each time I press the button. It worked fine during set up and for the first two days.  I have since moved it and this problem started. Restarted,reset,unplugged,changed remotes, no change. Latest software update. This is really annoying.  iPhone remote app works just fine.  Any suggestions?

    That's one of the weird things.. it recognizes it maybe 10% of the time. And usually, only after I do the two-button reset. Problem is.. since it won't charge above 2%, anytime I try to do a restore or anything like that using iTunes, my device shuts off and I lose whatever progress I'd made.
    So, an update... after reading through a bunch of similar complaints (there are literally 1000's of them so there's NO WAY this isn't somehow ios7 related, thanks a lot APPLE ) I decided to try a restore in recovery mode. After 3 hours and several disconnections... I ended up having to just set it up as a new iPad, as the restore did nothing. Weirdly though... as I was doing the restore in recovery mode.. I noticed I'd gotten up to a 10% charge.. higher than it's been since September, so after setting it up as a new device, I turned it off and plugged it in using the wall charger. 2 hours later and I was up to 38%. Still not great, as my iPad, before ios7 could've fully charged twice in the amount of time it took for me to now get 28% more of a charge. And that's with a fully cleaned out device.. so that really ***** and I'm now more confused than ever.
    But I'm gonna leave it overnight charging and see what I come up with tomorrow. Sadly, when I paid $600 for it in February, I never expected to have to play "wait and see" with it...

Maybe you are looking for