What is the best way to manage the result variable? (IF THEN GOTO)

I want to ask a question and then use the response on the position of my result, in a very old language and is no longer used, it would be IF a = 1 THEN GOTO 20, SO a = 2 THEN GOTO 30

I did experiment with switch, case

but its not really give me the results that I'm at the end, the conclusion is i do not use the syntax correctly or I use the right method.

var docRef = app.activeDocument;

var items = docRef.selection;

var abRef = docRef.artboards;

var swatchBoxX =-71.5

var swatchBoxY = 372.518

var swatchBoxSize = 22.04

var totalSelected = items.length;

newGroup var = docRef.groupItems.add ();

newGroup.name = "ArtworkGroup";

app.coordinateSystem = CoordinateSystem.ARTBOARDCOORDINATESYSTEM;

abRef.setActiveArtboardIndex (0);

position var prompt = ("Please enter the Position (1) front, (2) = back, (3) = left channel, (4)" = right channel ', '1', 'Print Position' ");

switch (position) {}

case 1: swatchBoxX =-71.5.

break;

case 2: swatchBoxX =-490;

break;

box 3: swatchBoxY = 840 & & swatchBoxX =-490;

break;

}

If (totalSelected > 0) / / check selected objects

{

for (var j = 0; j < totalSelected; j ++) //loop through selection

{

var tpBox = swatchBoxX +-34.2

var currentObject = items [j];

var color = currentObject.fillColor.spot;

myText = docRef.textFrames.add ();

myText.contents = color;

myText.position = [401, swatchBoxX];

Rect = docRef.pathItems.rectangle (swatchBoxX, swatchBoxY, swatchBoxSize, swatchBoxSize) var;

swatchBoxX = tpBox

rect.fillColor = colour.color;

Rect.stroked = true

items [j] .duplicate (newGroup, ElementPlacement.PLACEATEND);

} //end for

} //end if

else {}

Alert ("Please select at least one object");

}

newGroup.resize (20,20,true,true,true,true,20,Transformation.CENTER)

newGroup.position = [160, -130];

I just need some advice please

Yep, put your more likely to use the first option, and more add an option 'default' in the end, in the case where a person enters a key out of reach

default:
     swatchBoxX='whatever you want';

Tags: Illustrator

Similar Questions

  • What is the best way to manage applications so that they do not fill a space of memory?

    I have an iPad Air Os9, 64 g

    However, I am already up to 39 g mem.

    What is the best way to manage applications if tat I can use them, but no pork then my mem space?

    y at - it an app that manages the apps?  should I delete and re-download a few apps later?

    I would like to take advantage of many more applications that I believe I have space for.

    You can see how much storage resumes via the settings app > general > Manage Storage - this screen lists each app space (the application and its content), total by selecting an app on this screen should tell you how much space the application content (files, documents, etc.) resumes.

    y at - it an app that manages the apps?

    No, iOS is a sandbox environment, apps can control or manage other applications.

    should I delete and re-download a few apps later?

    Depends on the app. deletion of an app will also delete its content, if it is an application where its content is important (such as documents), and that content is not stored elsewhere (e.g.)  Dropbox or cloud server), you may lose this content by deleting the app.

  • Best way to manage databases 8i and 9i?

    Hello
    I'm looking for the best way to manage databases 8i, 9i, 10 g and 11 g with EM (of course, the upgrade from 8i databases is not an option). I installed SGD 12 c successfully, but the 12.1 agent does not connect to the 8i databases. What are the alternatives?
    -L'agent 10g can handle 8i, but he will be able to connect to 12.1 SGD?
    -If this does not work, I guess I need a SGC 12.1 for 9i, 10g and 11g databases and a 10g SGD for 8i databases. Is that a viable solution? Box 10g and 12.1 SGD coexists in the same environment?

    I'm looking for the best script that actually works, I understand everything that connects to 8i is not supported.

    Thank you.

    Hello.
    I'm afraid that you have understood.

    We will distinguish MONITORING that is done by the management agent (administration, maintenance, performance management etc) - which is made directly from the WHO.

    According to my experience:
    OEM 10 G is the latest version that can totally HANDLE 8i databases.
    OEM 11 G can MONITOR 8i (via an agent 10 G) databases, but cannot MANAGE them (or in other words, the 11 G SGD cannot connect to the 8i databases).
    OEM 12 c cannot CONTROL or MANAGE 8i databases.

    If you use OEM to manage your 8i databases (and intend to continue this way) I advised to retain a dedicated OEM 10G installation for the databases.
    There is no problem using 2 different installations of the WHO and several organizations choose to do for various reasons.
    The disadvantages are that you will need to duplicate your configurations OEM (patterns, rules etc.) and of course you will not be able to manage all the databases in a single console...

    If you use OEM to monitor 8i databases, you can create a set of parameters defined by the user that will run on a 9i database and connects to the 8i DB link databases.
    This solution is less than ideal, but it could eliminate the need to maintain another facility of SGD if all you need to watch the 8i databases.

    Erez.

  • What are the ENVIRONMENT VARIABLES?

    What are the ENVIRONMENT VARIABLES?

    Hello

    Environment variables
    http://vistaonwindows.com/environment_variables.html

    Create your own Environment Variables
    http://Lifehacker.com/259018/create-your-own-environment-variables-for-quick-folder-navigation

    Change a path of users in Windows Vista: Vista Path Environment Variable
    http://www.question-defense.com/2009/06/22/modify-a-users-path-in-Windows-Vista-Vista-path-environment-variable

    Environment variable
    http://en.Wikipedia.org/wiki/Environment_variable

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • What is the best way to manage Muse 2 accounts on one computer?

    I have a staff and an account of work adobe. I am currently only able to use my personal version of Muse on this computer, but really need to have access to both. What is the best way to switch between these two account on a single computer?

    Found. For anyone else that has this issue, simply go to Adobe Muse > preferences > publish with account > switch account

  • What is the best way to manage logging in vCO?

    We are trying to find a good way to manage journaling in vCO and have not found a good way and I'm looking for suggestions. We have relied on non-persistent logs in the vCO Client that are created with the System.log statements (). I know the Server.log statements () will be displayed in the events tab of the vCO Client and will be permanent, but that fills the database and he will have to serve frequently. Persistent logs which is placed on the server of vCO are not readable in other. We are curious about using Logstash or Splunk.

    If someone has a good method of logging vCO? Thanks for your suggestions!

    I worked with a customer who has implemented an action to open a session to drop that splunk powered by using fleWriter. It works well enough.

  • What is the best way to copy a static variable of C in LabVIEW?

    As an interesting project / fun, I'm trying to implement the bcrypt algorithm in some native G, without using libraries (for example, no link DLL, all of the native code G). Everything is going well so far, with the exception of a minor roadblock I ran into. The bcrypt algorithm involves initialization of a state variable with a range of 4 x 256 of hex codes derived the decimals of pi. In C code, it looks like:

    unsigned int BF_init_state = {}
    {
    {
    Initial state of the line 1s
    }, {
    Initial state of the line 2 S
    }, {
    Initial state of the 3 S-line
    }, {
    Initial state of the line 4S
    }
    }, {
    State initial P goes here
    }
    };

    I know that this should be in favour of some sort of import JSON, or perhaps directly via the menu data operations, but I'm not 100% sure on the best way to do it. Any ideas?

    I truncated lines, so if you are interested in getting the complete code, see crypt_blowfish.c on GitHub.

    This will make only a row/column at a time, but I think that's what you're looking for.

  • The best way to manage two GUI

    I have two classes using java swings. The first Panel is where all the calculations will be made and the result will appear in a JList (in the 1st Panel). After that, the next button will show a 2nd Panel where the JList of the 1st group results are transferred. I need a back button in the 2nd Panel to return to the Panel 1. After you click the back button, I need the previous results on the 1st Panel to always be there for extra change (add / change / delete data). If I changed something and click the next button again, I want the 2nd Panel show a set results to date from the 1st Panel.

    What is the best way to do it? I spent two days trying to apply this using the presentation of the card, but it does not work as I want. All the examples I found use only one category. Even if I break down for separate classes, I face problem where when I click the back button, all the data in the 1st Panel disappeared. I'm out of my mind right now. It would be great if anyone can share some ideas in this. Any suggestions are welcome.

    Yes. I already tried several times to break it down into categories before posting here again. I am new to Java, that's why I found quite difficult and decided to post my problem here after he tried for two days. In any case, I thought about it already. I share the codes so that anyone who has problems like me can be useful if not much.

    Presentation of the main card:

    import java.awt.CardLayout;
    
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    
    public class CardCard {
      private static final String FIRST_PANEL = "firstPanel";
      public static JPanel mainPanel;
      private JFrame frame;
      public static CardPanel_1 cp1 = null;
      public static final CardLayout cardLayout = new CardLayout();
    
      public CardCard (){
      frame = new JFrame("Test");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setLocationByPlatform(true);
      mainPanel = new JPanel(cardLayout);
      cp1 = new CardPanel_1();
      mainPanel.add(cp1, FIRST_PANEL);
      frame.getContentPane().add(mainPanel);
      frame.pack();
      frame.setVisible(true);
      }
    
      public static void main(String... args) {
      SwingUtilities.invokeLater(new Runnable()
      {
      public void run()
      {
      new CardCard();
      }
      });
      }
    
    }
    

    First card:

    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Observable;
    import java.util.Random;
    
    import javax.swing.JButton;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    
    public class CardPanel_1 extends JPanel {
      public static JTextField textField, textField3;
      private static final String SECOND_PANEL = "secondPanel";
      private CardPanel_2 observer;
      private JButton btnNext, btnRandom;
      private String show;
      public CardPanel_2 cp2 = null;
      private List numList;
      private String numResult;
    
      /**
      * Create the panel.
      */
      public CardPanel_1() {
      setLayout(new FlowLayout());
    
      textField = new JTextField();
      textField.setBounds(64, 5, 134, 28);
      add(textField);
      textField.setColumns(10);
    
      textField3 = new JTextField();
      textField3.setBounds(64, 5, 134, 28);
      add(textField3);
      textField3.setColumns(10);
    
      btnRandom = new JButton("Randomise");
      btnRandom.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
      String str = textField.getText();
      int num = Integer.parseInt(str);
      numList = new ArrayList();
      for (int i =0;i
    

    2nd map:

    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Observable;
    import java.util.Observer;
    
    import javax.swing.JButton;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    
    public class CardPanel_2 extends JPanel implements Observer {
     private static JTextField textField2;
      private JButton btnBack;
     private static final String FIRST_PANEL = "firstPanel";
    
     /**
      * Create the panel.
      */
      public CardPanel_2() {
      System.out.println("PANEL 2");
      textField2 = new JTextField();
      add(textField2);
      textField2.setColumns(10);
      btnBack = new JButton("Back");
      btnBack.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
      CardCard.cardLayout.show(CardCard.mainPanel, FIRST_PANEL);
      System.out.println("BACK");
      }
      });
      add(btnBack);
      }
    
      public void update(Observable o, Object arg) {
      System.out.println("Updated: " + CardCard.cp1.textField3.getText());
      textField2.setText(CardCard.cp1.textField3.getText());
      }
    }
    
  • What is the best practice for managing for results in doubles because of several sessions

    I work with PowerCLI 5.0.  I quite often find that I have a few sessions open at the same time connected to a server that hosts a particular virtual machine and vCenter.  I ran into a problem when I tried the cmdlet Add-USBController of VMware vSphere PowerCLI Reference book.

    The following lines are (roughly) in the extract cmdlet of the book:

    $vmView get - vm 'test ' | Get-View

    $vmView.ReconfigVM_Task ($spec)

    I got the following error "method call failed because [System.Object []] contains a method named"ReconfigVM_Task"" etc.

    It turns out that I was getting an array of vmViews for 'test' (instead of one), because I had a connection to the host and vCenter.  Once I deleted the host sessions, the script worked well.

    So now my question - what is the best way to mitigate this in my scripts? At least, I guess I need to make sure that I received only an object in the view of the GET. should I remove all duplicates? kill all other sessions when I run the script?

    Thank you

    Maureen

    The best method is to use the server parameter on cmdlets where it is available, in this way, you can limit the objects returned to this server for vSphere.

    If you have multiple sessions on the same server from vSphere open, you could direct the result of a Select-Object cmdlet.

    Like this

    Get-VM-name MyVM-Server $vcenter | Select - 1 first

  • Best way to manage the accessible host check after restart

    vCO newbie here...

    I'm building a workflow for (a) take an array of clusters, (b) the loop through a cluster and take a picture of the armed forces, (c) using the table of the host, in Maint Mode on first host... run a script, restart (d) check host reconnects and move then to the next host... until all hosts have been completed.  I'm looking for the best way or an example of verification of accessibility of the host and to wait for the host is accessible before you continue.  Any help is greatly appreciated!

    Hello Carlos, you certainly came to the right place for this question vCO is ideal for this kind of thing... I got to play a little before I restart something that resembled what you're asking for is basically a host and wait for it to be reconnected.

    Well, the workflow "Reboot Host" indicates indeed vCenter API to restart a host, but it does not wait for the host to come back to the top, she finished just all right because that's what indicates the API... Therefore, we must introduce a timer to wait a few minutes and to give a chance of him having turned off as part of resetting to the host. Then we check the connectionState of the host to see if it is 'connected' - otherwise, wait a few minutes and repeat the loop until the host is connected again. See example attached workflow. I recommend a MINIMUM of 3 minutes for the wait time. Test this several times in your environment to see what still works for you and adjust as necessary.

  • The best way to manage email with two computers?

    Hello. My wife and I shared a single hotmail address and it played back on Windows Live Mail for years. We got a second computer, ahe will use one and I'll use a new one. What are the options on how to handle our email? We would both keep our shared email address, and we both like to show emails via windows live mail on our separate computers. However, what are the suggestions from the community for how to manage our email here on out. Thank you.

    I do not use WLM (you can ask in the forum here: www.windowslivehelp.com), but you should have a setting somewhere (in OE its under Tools |) Accounts | Mail | Properties | Advanced) and then you check the box to leave messages on the server when you download the messages instead of remove them (which is default) and while the two computers can read the messages.  However, on one of them to be removed after a number of days defined, otherwise they accumulate on the server and possibly the block on the account.  I'm sure that WLM has a similar setting, but you can ask in this forum.

    Steve

  • Best way to manage multiple windows help

    Hi all:

    I work with X 5 to create help for a large modular application. I have a single aid project, but want to deliver content for help only for the specific modules used by clients. I am attemtping to create multiple windows help with a window main containing helps for deliverables standard and other windows containing help for specific modules. What is the best way to achieve this using a single project. Or do I have to maintain several projects?

    I tried to use custom windows, but there are some limitations. I created a new file for a custom hhc window manually and it works fine. But I can't open the custom window by clicking on a book in the table of contents (which are what I want) the main window, but can do so by clicking on a subject. Also, I can't assign topics by separate default for each custom window. In addition, when I click a hyperlink in a custom window that links to a topic in the main window, the theme of the main window display in the custom window but it is not in the table of contents of the custom window, it's awkward.

    Help, please!
    Romeo Coutinho

    From the point of view of the user a merged set of help files is probably the best solution. Use global windows of the comprehensive help system is displayed in a window and displays only the topics for modules installed (if you can get your installation meets your wishes people that is ;-)).

    Several projects handling is more complicated to manage a large. Each help topic only stops in a single project; If you want to create or update the help for the XYZ_1 module, you open the project XYZ_1. If you want to change something in the master project, you open the master project. After the edition of a project, you simply compile this module and nothing else.

    The only thing you need to learn are the peculiarities of the help compiler about merged projects. See http://www.helpware.net/htmlhelp/how_to_merge.htm for a good description of these folds.

    -Dirk Bock

  • Best way to manage documents several pages?

    Hello

    I'm creating a multiple page on top of TLF editor and I would like to hear some opinions on the best way to process documents multi-pade.

    I'm basically looking at two options:

    (1.) A unique RichEditableText and several ContainerControllers.

    2.) RichEditableText several.

    TKS.

    Sorry, I gave you the wrong title to search. See "new and updated examples, http://blogs.adobe.com/tlf/2009/12/new-and-updated-tlf-samples.html.

    Apologies,

    -robin

  • What are the system variables in oracle

    Hai All

    In oracle, what is called the system variable and the types of system variables

    Good answer hepls me


    Thanks and greetings

    Srikkanth.M

    System of SETTING Variable summary
    Source: http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm

    Oracle environment variables
    The following environment variables are valid for Oracle:
    ORACLE_HOME
    ORACLE_BASE (optional)
    ORA_NLS (optional)
    NLS_LANG (optional)
    TNS_ADMIN (optional)
    Source: http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.websphere.ii.foundation.conn.fw.orc.doc/configuring/iiylsorcenvvars.html

    ORACLE_SID is the name of the database instance that you are using.

    T2KDEV is set to the type of terminal you are using. If you are using openwindows; Xsun if you use X windows.

    Is defined on the type of terminal you are using. Note: If you are using openwindows, you may need to redefine the variable TERM to the Sun (instead of cmd-Sun) and you must run a shelltool ORACLE.

    TWO_TASK is located where the ORACLE Server can be found, and will normally be the name of the database instance. This variable allows to simplify the command line to start the ORACLE tools.
    Source: http://ugweb.cs.ualberta.ca/~c391/manual/chapt3.html

    HTH
    Girish Sharma

    Published by: Girish Sharma on March 3, 2010 09:16
    Link and text added.

  • What is the interface variable in a method of eating EJB initiated?

    Hello

    the bellows of code is part of a simple example of EE 6 of the book of Yuri Vasilievs focused on the database from the beginning...

    Can somone tell me when the bellows of the customerSession variable will be initiated in the bellows of class CustomerSessionClient.

    When I run theCustomerSessionClient (main method) in my environment of netbeans, the customerSession is always null?

    Below first class of the interface, then the CustomerSessionClient class



    package ejbjpa.client;


    Import javax.ejb.Remote;

    /**
    *
    * @author xxx
    */
    @Remote
    public interface {CustomerSession}
    public String getCustomerAddress (Integer customer_no);

    }







    Import ejbjpa.ejb.CustomerSession;
    Import javax.ejb.EJB;

    /**
    *
    * @author xxx
    */
    public class CustomerSessionClient {}
    @EJB
    Private Shared CustomerSession customerSession;

    Public Shared Sub main (String [] args) {}

    System.out.println ("billing address of the customer whose id is:" + customerSession.getCustomerAddress (1));

    }

    BRG

    Javanalle

    Published by: 873848 on July 20, 2011 20:56

    Can somone tell me when the variable customerSession below will be initiated in the CustomerSessionClient class below.

    It will never be initialized.

    When I run theCustomerSessionClient (main method) in my netbeans environment customerSession is always null?

    I agree.

    It is just a command line client. It does not execute in an EJB container, so the @EJB annotation never takes effect.

Maybe you are looking for