Using simple script (script noob)

Hello

could someone help me to write a script to do a simple task?
I would like to than the scipt to:

Closing machine has

Check if A computer is turned off, and then turn on the Machine B

Thank you

don't use stop-vm-kill. because of this HA restarts first VM.

Use the command shutdown-VMGuest, at the stop, what computer guest OS virtual, this VM tools necessary to run will.

Also, you will need to wait a few minutes before you for the next order as first stop of the VM will take time.

Tags: VMware

Similar Questions

  • using simple script

    Anyone know of a script that auto registration replaces the text in a form with a different text. inputing example 'z' and it auto with the word "tomorrow".

    You can use something like this as the custom validation script:

    If (event.value == "z") event.value = "tomorrow."

  • Conversion of underlined text of the word by using a script

    Hello

    When you place a Word document, I want to use a script to convert the text underlined italic character Style (which I have already created). Which should read the line of app.findGrepPreferences to find the underlined text?

    Thank you.

    It's as simple as that:

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.underline = true;
    app.changeTextPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item("italic");
    app.changeTextPreferences.underline = false;
    app.activeDocument.changeText();
    

    unless she needs deep integration into your current script.

    Related issues of script can better ask in the forum script: InDesign Scripting

  • color fill by using a script.

    I'm trying to create a script in CS5 mac os10.6.8 that will change the fill color of selected pathItems. I need a simple script that will change a selected pathItem 2,3,15,0 CMYK values. I have then select this script and to implement the action in a batch of 600 cases.

    I wish that this process could be saved as an action, but when I record the action "Add new nuance" I must manually enter the CMYK values, who will take an eternity for a lot more than 600 files.

    This works in CS6.

    var app.activeDocument = docRef;

    var col;

    neck of var = new CMYKColor();

    Col.cyan = 2;

    Col.Magenta = 3;

    Col.Yellow = 15;

    Col.Black = 0;

    Create the new shade using the color above

    Swatch var = docRef.swatches.add ();

    Swatch.Color = col;

    Swatch.Name = "col";

    Apply the nuance to a new path item

    var pathRef = docRef.pathItems [0];

    pathRef.filled = true;

    pathRef.fillColor = swatch.color;

  • Help: apply different styles of Pará to several consecutive paragraphs using the script

    Hi all

    I need to apply different styles of Pará to several consecutive paragraphs using the script, something like this (found somewhere on the net):

    myDoc = app.documents var [0];

    mySel var = app.selection [0];

    var myPStyle1 = "A";

    var myPStyle2 = 'B ';.

    you need to add 6 styles here:

    var myPStyle3 = 'C ';

    var myPStyle4 = "D";

    var myPStyle5 = 'E ';

    var myPStyle6 = 'F';

    var myPStyle7 = "G";

    var myPStyle8 = 'H ';

    the last style is not necessary in the script?

    apply style 1 paragraph 1

    mySel.appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle1);

    apply styles to the paragraphs after selection

    style 2

    mySel.paragraphs [-1] .insertionPoints [-1] .appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle2);

    next style

    mySel.paragraphs [-1] .insertionPoints [-1] .paragraphs [0] .insertionPoints [-1] .appliedParagrap hStyle = .nextStyle myDoc.paragraphStyles.item (myPStyle2);

    I tried a lot, but could not find the way to extend the sequence

    Sorry, no skills in the scripts still...

    all styles have "Next Style" option enabled, but I can't use ' apply style, then next style "or object styles, because I need four different sequences of these paragraph styles:

    A-B-C-D-E-F-G-H

    A-B-D-E-G-H

    A-C-D-F-G-H

    A-D-G-H

    and I don't really want to create special clones of the same style for each sequence (Keep It Simple, they say ).

    I think that this can be done through four slightly adjusted scripts...

    any suggestions would be greatly appreciated...

    Sorry to be late to the party, I usually take up such things immediately.

    How about this one?

    1. no separate necessary script, it uses a small dialog box where you can choose what style to use. If I'm not mistaken, you can press a digit key on Windows to immediately select one of the items.

    2. it works down in the paragraph in that your cursor is located. It has nothing to do with the blocks of text, even if - consecutive paragraphs within a story always ignore the text frames.

    3. extensible: you can easily change the names of the styles in the table at the top of the page and the number of groups of style in the list.

    var styleLists = [
              [ "A", "B", "C", "D", "E", "F", "G", "H" ],
              [ "A", "B", "D", "E", "G", "H" ],
              [ "A", "C", "D", "F", "G", "H" ],
              [ "A", "D", "G", "H" ]
    ];
    
    var radiobutts = [];
    
    styleDialog = app.dialogs.add ({name:"Set Multiple Styles",canCancel:true});
    with (styleDialog)
    {
              with (dialogColumns.add())
              {
                        with (radiobuttonGroups.add())
                        {
                                  for (i=0; i		   
  • Simple scripts: on the thumb (45) frame to the first frame... ??

    I'm doing a simple script and I'll have a PET huge brain.

    When I get to coach the 45 I want the playhead back to frame 1.  I have the code below, but I'm getting errors.  Can someone point my head in the right direction?

    <><><>

    {onFrame (45)
    this.gotoAndPlay (1);
    }

    <><><>

    An error that says that "expected semicolon before or after the first brace...

    second possible mistake is ' call to onFrame possible undefined method... ".

    Need help.

    If this is the first scene, in the last picture (45) simply by putting...

    gotoAndPlay (1);

    should work.

    If it is not the first scene, then you the first image of the label and use the label instead of the chassis number...

    gotoAndPlay ("firstFrameLabel");

  • simple script, does not. Help, please!

    Hi all

    I wrote a simple script to take the active layer in the current document, copy, paste in all open documents, and set the 'Color Dodge' blend mode:

    var docRef = activeDocument;
    var layerRef = docRef.activeLayer;
    var Sindocs = documents.length;

    layerRef.copy ();


    for (i = 0; i < = Sindocs-1; i ++)
    {

    activeDocument = documents [i];
    activeDocument.paste ();
    activeDocument.activeLayer.blendMode.COLORDODGE;

    }

    the script works, except for the change in merge mode. I tried to split the single command into components (for example, assign activeDocument.activeLayer to a temporary variable, then setting the blendMode on this variable). I guess I'm missing something stupid and simple, since this is my first Java script.  Any help would be appreciated!

    Oh, I use CS2 under WinXP.

    Thanks again,

    EPH

    You can try this...

    var docRef = activeDocument;
    var Sindocs = documents.length;
    docRef.selection.selectAll ();
    docRef.selection.copy ();

    for (var i = 0; i)< ndocs;="">
    activeDocument = documents [i];
    activeDocument.paste ();
    activeDocument.activeLayer.blendMode = BlendMode.COLORDODGE;
    }

  • How to use the script "click menu item" command on a menu item for an application that runs under another user?

    Hey everyone, quick question...

    I am trying to run this script:

    say application "System events".

    say process of "iTunes."

    click on menu item "Start Station" from the menu 'Song' to menu bar item 'Song' in the menu bar 1

    end say

    end say



    The idea behind this is to start a song selected currently playing station. I know, it's not hard to do it manually, but I want to be able to do it without having to call the iTunes app to the front. Now, this script works for my own iTunes app, but I have a second instance of iTunes connecting the second user on my computer at home (User2), with its own separate library and account and all. script I have works fine for an instance of iTunes under my user account, but I can't figure out how to specify which instance of iTunes, I'd like the script to work on.




    I want to emphasize as an FYI that i use.


    the shell script "connection f User2 /Applications/iTunes.app/Contents/MacOS/iTunes > & - 2 > & - &" with administrator privileges

    -to open my second instance of iTunes as User2



    is there a way to change the "process"iTunes"to say" something like 'process 'unix ID' say' and have the ID for each respective instance of iTunes unix?


    Let me know if I do not make sense... Thanks in advance to anyone who can help






    You can target a process of application using various properties of system events, for example:

    tell application "System Events"
      tell first item of (get application processes whose unix id is 15174) -- or whatever id
        activate --> needed when using GUI scripting
        get properties
      end tell
    end tell
    
  • Name of access to case / battery inside the case using VI scripts

    Hello everyone. I have a script that finds all instances of a specific under vi. All instances of this subroutine VI will be contained in a box structure. Using VI scripts, I want to be able to cross back and determine the name of the case that the sub vi is in. Is attached an image of the code that I currently have, however he mistakes in the part where I cast the reference to a case structure. Anyone know what I am doing wrong? Thank you.


  • How can I put a digital indicator in a box structure using VI scripts

    I am using VI scripts and I try to add a digital indicator within a box structure.  I'm able to add the structure of the case and the digital display fine, but as soon as I determine the structure of the case as the 'owner' of the digital (rather than the pattern-block being owner) I get error 1060.  Is there a way to get around this?

    Note: I am doing this is because this particular (indicator in a case structure) provision will prevent a VI to be inline when it is built.  This model will provide no functionality itself, it prevents only inlining.  It is added to a larger VI which is used to initialize objects in a simulation, and there are many of them in the total simulation.  If they are inlined, it takes a long time to generate the C code and a performance on this VI is not a problem because it is run only once at the beginning of the simulation.  The rest of the screw must be inline for performance reasons.  Therefore, I am open to other options to avoid a screw of Inline if 'the indicator in a structure of the case' can be done via the script.

    If this is not clear, please let me know and I can clarify.  Thank you.

    Sorry for the mess, it works for me.

    Don't mind the empty cluster constants.

  • How to detect programmatically something dirty in labview vi using labview scripts

    Hi people,

    I'm trying to write a code that passes by a few screws and check if they have a dirty point using labview scripting but have a moment difficult trying to find a way to do this. is it possible that I can do this? any help is greatly appreciated!

    S

    Have you tried this VI property?

    http://zone.NI.com/reference/en-XX/help/371361K-01/lvprop/vi_modvi_modificat_bitset/

  • We will use a script that allows users to connect only once.

    We will use a script that allows users to connect only once. 
    However some users need a second possibility of connection.
    How is - this can be handled in a script?

    The users in question are members of the same group secuity.

    Where the use of Windows server 2003 with xp clients.

    Hello

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in Windows 7 IT Pro Technet Forums network.

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

    I hope this helps.

  • How to use the Script TCL EEM in router?

    Dear all,

    I have a TCl Script (it's 1 to test and understand).

    ********************************************** TEST.tcl *******************************************

    : model cisco::eem:event_register_syslog "Interface FastEthernet0/0, changed State to.

    import namespace: cisco::eem: *.
    import namespace: cisco::lib: *.

    Table game arr_einfo [event_reqinfo]

    action_script enable status

    If {[catch result {cli_exec $cli_fd (fd) 'enable'}]} {error $result $errorInfo}

    If {[catch result {cli_exec $cli_fd (fd) 'int fa0/1'}]} {error $result $errorInfo}

    If {[catch result {cli_exec $cli_fd (fd) 'shut'}]} {error $result $errorInfo}

    action_syslog msg "New Port is now"

    If {[catch result {cli_close $cli_fd (fd) $cli_fd (tty_id)}]} {error $result $errorInfo}

    ********************************************** TEST.tcl *******************************************

    Can someone tell me how to use this script in router that will be used every time my interface fa0/0 he'll fa0/1 in stop mode?

    Can you give me the steps to follow in the router?

    Wharton are the sine qua non for the use of this?

    Concerning

    Concerning

    Virtually any command, Yes.  You can't do "?" as you can from an interactive session, but you can run all the commands EXEC and config otherwise.

  • Using java script with QML, save a text in a variable of java script and showing in a label

    I'm trying to find a way to take a text entered by the user into a text field and display it in a label using java script. The trickiest part is I want to be seen in the label after restarting the application.
    Any idea?
    Should I use a JS file with functions. If so, what are best practices?

    Thanks in advance!

    This example uses a little bit of C++, I'm not sure if this can be done with purely JS

    in your text box or label apply onTextChanged you probably want to have a Setup button to activate & deactivate the area of text, or if they delete it, the text of the label would be erased

    . QML

    TextArea {
        id: myTextArea
        onTextChanged: {
            myTextArea.text = myLabel.text;
            //you could also apply ^ to a button's onClicked function etc
            App.saveValueFor("mySavedText" myTextArea.text);
        }
    }
    Label {
        id: myLabel
        text: App.getValueFor("mySavedText", "");
    }
    

    App.saveValueFor (); QSettings uses will have to be reset in your ApplicationUI.cpp & .h

    .cpp

    App is obtained by setting a context property

    qml->setContextProperty("App", this);
    
    QString App::getValueFor(const QString &objectName, const QString &defaultValue)
    {
        QSettings settings;
    
        // If no value has been saved, return the default value.
        if (settings.value(objectName).isNull()) {
            return defaultValue;
        }
    
        // Otherwise, return the value stored in the settings object.
        return settings.value(objectName).toString();
    }
    
    void App::saveValueFor(const QString &objectName, const QString &inputValue)
    {
        // A new value is saved to the application settings object.
        QSettings settings;
        settings.setValue(objectName, QVariant(inputValue));
    
    }
    

    all

    public:
    
        Q_INVOKABLE
        QString getValueFor(const QString &objectName, const QString &defaultValue);
    
        Q_INVOKABLE
        void saveValueFor(const QString &objectName, const QString &inputValue);
    

    You'll also need to slect the permission of files shared in the descriptor for QSettings bar to work

  • Cannot access a Web site using Java Script

    Cannot access a Web site using Java Script. I'm not sure what it blocks I use Win 7, Avast free, AntimalwareBytes.
    I get a pop up window with
    Name: mcs
    Location: http://myspeedtest02.windstream.net  
    say "application blocked by security settings, blocking the untrusted application.
    I don't know what it blocks, but suspect it is related to the security of Windows.
    I think that the Java Applet is blocked, but I would like to run this test of speed from my ISP.  I tried to access the website of Google Chrome and IE, with the same result. Nobody knows what this block and how to unlock it?

    This is actually not JavaScript, it's Java.  Despite the name, they are really very very different.

    Java itself can be dangerous, especially if it is not a trusted application.  It is my sincere recommendation that you do not continue.

    If you want anyway, you can go into your control panel, open the Java settings and set it to allow untrusted applications.

Maybe you are looking for