Exchange value from a running sequence teststand and an independent vi LabView.

I have a teststand sequence, which runs with a local variable.
I want to read this local variable in a independent vi.
Are you an Idea ?

Sebus,
I'm not sure what you mean by an "independent vi".
If you have a VI that TestStand calls, the post entitled In TestStand, how to pass data to LabVIEW will probably be very helpful. In addition, there are Getting Started guides that explain this concept and with TestStand 3.0, there is a whole manual called "Using TestStand with LabVIEW" that walks you through step by step how to use TestStand and LabVIEW together.
If you have a VI that executes your test, this VI would be considered an Operator Interface. For this situation, you can use the TestStand concept of UIMessages to pass data from your sequence to the operator interface. This is described in more detail in the TestStand help. UIMessages are a TestStand object that you can pass from your sequence to your operator interface. Since the engine actually executes the sequence, you do not have access to the internal sequence characteristics mid-execution. By using the UIMessages, you can have your sequence automatically send data, and then your Operator Interface will retrieve these messages.
The third scenario is where your VI is not connected to TestStand at all. In this case, if you truly have no connection to TestStand, this is not possible. However, if there is a common shared application then you can use that to pass data. For instance, you could use Datasocket (see DataSocket Overview
for a brief synopsis) and have TestStand pass the value of the local variable and have LabVIEW read from Datasocket. There is also an ActiveX server that TestStand has called the Synchronization server. This is used internally with the Synchronization step types. However, since it is based upon ActiveX you can use each of the methods and properties that are available; the functions just are not documented. You could use the queue synchronization type to pass data from TestStand to your independent LabVIEW VI.
If this does not answer your question, please let us know and clarify what you mean by an independent VI. Also, the versions of TestStand and LabVIEW would be helpful.
Regards,
Shannon R
Applications Engineer
National Instruments

Similar Messages

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How to get value from Thread Run Method

    I want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that it seems that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get Inside the run method::: But I get only Inside */
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";

    I think this is what you're looking for. I hold up main(), waiting for the results to be concatenated to the String.
    public class sampsynch
        class SampleThread extends Thread
         String x = "Inside";
         public void run() {
             x+="the run method";
             synchronized(this) {
              notify();
        public static void main(String[] args) throws InterruptedException {
         SampleThread t = new sampsynch().new SampleThread();
         t.start();
         synchronized(t) {
             t.wait();
         System.out.println(t.x);
    }

  • Getting values from a running window

    has anyone ever used a program that could retrieve values from an opened window? I have this poker calculator program that can get values from an open poker window. It has a list of about 50 different types of windows (exes, iexplorer, different sites etc.).
    Is there any simple way in java of doing something like this?

    its not done by a screenshot, because you just give
    it the window's title. It works even if its
    minimized.At least in Windows, if you have the window's title then you can get a link to the application and you can find out all sorts of information about it. So your conclusion that screenshots aren't involved isn't correct. They may or may not be involved. But this access is done by a native Windows API and Java doesn't support that.

  • How to get a value from User's AD attribute and Display it on a SharePoint page ?

    Forum,
    We have a specific attribute in Active Directory for every single user. Meaning: In our Active Directory we have an attribute e.g. "UserType" and the value of this attribute is different from user to another.
    Requirement: I need to display the value of this attribute on the SharePoint page - How to do so?
    I don't think using the User Profile properties is the way to go. So, Could you please guide me on how to use C# or JavaScript to retrieve the value from AD attribute of each user and show it on the SharePoint site?
    Thanks for your inputs !

    Using C# or javascript to authenticate the user to AD to read the property directly will be very difficult. Creating a custom user profile property and adding a sync from AD to that property is definitely the easiest way to do what you are describing.
     Once its in User Profiles there are lots of samples on how to add it to the page.  
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Passing values from CVI dll to TestStand gives wrong values

    Initially I wanted to pass an array of booleans from CVI to TestStand.  I read that this was not possible because you cannot set Boolean as a parameter.
    So I declared it as unsigned intin CVI.
    Strangely enough, TestStand does receive it as an arrayof Booleans.  However the values are still wrong.  I wonder if it actually is possible to pass an array of Booleans.
    Using TestStand 3.1 and CVI ver 7.1 (no impact)
    Here is how I declare the parameters in CVI:
    void __declspec(dllexport) __stdcall MemTest
        CAObjHandle     thisContext,
        unsigned char *    apbResult,
        int             alComport,
        int                alSocketNum,
        UINT32            aulHostAddr,
        BOOL        *    apbTestOutcome,
        UINT32             testSize,
        UINT32          startAddress
    The other functions within CVI use an array of booleans.
    Here is how I declare the parameters in TestStand:
    Here are the results I get.  They should match...
    The obvious question is:
    How do I get the results in TestStand to match those from CVI?
    The printout >>  no. 1 Passed << etc..  are the values of the array apbResult in CVI.  bSippResuls should match.
    Message Edited by Ray.R on 10-16-2009 10:41 AM
    Attachments:
    TS_prms.PNG ‏29 KB
    TSwrongValues.PNG ‏12 KB

    Ray,
    Try this:
    void __declspec(dllexport) GetResults(unsigned char arg1[16])
     //Insert function body here.
     arg1[0] = (unsigned char)0;
     arg1[1] = (unsigned char)1;
     arg1[2] = (unsigned char)0;
     arg1[3] = (unsigned char)1;
     arg1[4] = (unsigned char)1;
     arg1[5] = (unsigned char)0;
     arg1[6] = (unsigned char)1;
     arg1[7] = (unsigned char)1;
     arg1[8] = (unsigned char)1;
     arg1[9] = (unsigned char)0;
     arg1[10] = (unsigned char)1;
     arg1[11] = (unsigned char)1;
     arg1[12] = (unsigned char)1;
     arg1[13] = (unsigned char)1;
     arg1[14] = (unsigned char)0;
     arg1[15] = (unsigned char)1;
    Regards
    Ray
    Regards
    Ray Farmer

  • Pass Value From One Form to Another and Populate Join Table

    I have a table “std_controls” and a table “actual_controls”.  The standard controls table is updated with the expected business control or process.  The actual controls table is updated with the control or business process the company actually
    has in place.  These two tables may be updated at different times by different individuals.  Later I need to be able to map the actual controls to the standard controls.  I have done this before using a join query which then matched the primary
    keys and populates a new table with the joined keys.  What I would like to be able to do is this:  Have a form open, “form1” (which is where the standard controls are entered).  The user could then click a button which would open another form,
    “form2”, that listed all actual controls at that time from which they could choose.  The user could then select the actual control on “form2” they wanted to map to the current standard control on “form1”.  The user could select the actual control
    on “form2” by selecting a check box.  The effect of this mapping would populate my join table.
    I have seen other posts that describe doing something similar, but I need more help on how to actually set it up.  Thanks for your help.

    Hi jdmcleod,
    According to your description, I don’t understand clearly about your requirement.
    But I think you could access “form1”/”form2”’s control in either of “form1” or “form2”, so you could have a button in “form1” or “form2”, then in the click event get these forms control’s value (e.g. checkbox) and update the database.
    For example to access other form’s checkbox value:
    Dim f As Form
    Set f = Forms!OtherFrom
    MsgBox f.Controls("Check11").Value
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Retrieving column value from multiselect managed metadata column and updating metadat column in list.

    I have Library having metadata column when a document is uploaded i need update another list with metadata column of
    library in list.I have an event reciever to do that,Code is given below
    public override void ItemUpdated(SPItemEventProperties properties)
                base.ItemUpdated(properties);
                    SPList saList = properties.Web.Lists["mylist"];
                    SPListItem item = saList.AddItem();
                    item["Department"] = properties.ListItem["Department"].ToString();
                    EventFiringEnabled = false;
                    item.Update();
                    EventFiringEnabled = true;   
    my elements.xml file is as below
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <Receivers ListUrl="Documents">
          <Receiver>
            <Name>DocumentItemUpdated</Name>
            <Type> ItemUpdated</Type>
            <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
            <Class>MyDocuments.Documents.Documents</Class>
            <SequenceNumber>10000</SequenceNumber>
          </Receiver>
      </Receivers>
    </Elements>
    but i did not see the the List column getting updated.But when i use the code to update a column of single line of text
    it works fine.But when i do it for multi select metadata column in debug mode i could see its giving null value even though Library had column value.
    Any pointers on how to update Multiselect metadata column programatically on itemeadding event in library to a list will
    be helpful.

    You need to use the TaxonomyFieldValueCollection class. The following code is from SP2010 but should still apply in SP2013. It is an example of updating multivalued taxonomy fields.
    public static void SetListItemMultiMetaDataColumn(Int32 id)
    using (SPSite site = new SPSite("http://basesmc2008"))
    using (SPWeb web = site.OpenWeb())
    TermSet termSet = null;
    TaxonomySession txs = new TaxonomySession(site);
    SPList list = web.Lists["Shared Documents"] as SPList;
    SPListItem item = list.GetItemById(id);
    TaxonomyField field = item.Fields["multimanage"] as TaxonomyField;
    if (field != null)
    termSet = txs.DefaultSiteCollectionTermStore.GetTermSet(field.TermSetId);
    Term term = termSet.GetTerms("sts", false).FirstOrDefault();
    if (field.AllowMultipleValues)
    TaxonomyFieldValueCollection currentCollection = item[field.Id] as TaxonomyFieldValueCollection;
    TaxonomyFieldValue tfv = new TaxonomyFieldValue(field);
    tfv.TermGuid = term.Id.ToString();
    tfv.Label = term.GetPath();
    tfv.WssId = TaxonomyField.GetWssIdsOfTerm(site, txs.DefaultSiteCollectionTermStore.Id, termSet.Id, term.Id, false, 1).First();
    currentCollection.Add(tfv);
    field.SetFieldValue(item, currentCollection);
    item.Update();
    Blog |SharePoint Field Notes Dev Tool |
    SPFastDeploy

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • How to derive value from another variable and use it to read master data?

    Hi,
    I have following case:
    First I need to read the value from Cost Center -variable (ZIPCC) and then I need to use that value to determine the home currency of that cost center from the cost center master data table (field: OBJ_CURR).
    I know to basic idea on how to do this, but don't seem to get the syntax correct. Could someone point me in the right direction?
    So the objects in play are:
    ZIPCC = Cost center selection variable (mandatory, single value)
    ZIPCUR = Cost Center Currency variable (customer exit, single value)
    0COSTCENTER
    0OBJ_CURR = Field in cost center master data
    Help will be greatly appreciated!
    -m

    Hi,
    Thank you very much for your example I can see that this logic works! However I'm experiencing trouble in selecting the 0OBJ_CURR
    This kind of declaration isn't working: "D1 Like /BIC/0OBJ_CURR."
    And the same goes for the Selection:
    "Select single OBJ_CURR into D1 from /BI0/PCOSTCENTER where COSTCENTER = i_t_var_range-low."
    This is where my syntax also went wrong.
    0OBJ_CURR is a unit, is there a special way to declare it and use it in the code?
    (and 0CURRENCY is a reference unit for 0OBJ_CURR).
    Do you have adivce on this?
    -miikka

  • From any running subvi('s), read controls and choose the ones you want to save to file

    Hi all,
    I now want to read controls from any running subvi('s) and save the data into a single file. I'm using subpanel to display the running subvi and use control reference to collect all the string-typed control and save the data to a single file. While that's cheating and ugly, because the host vi usually doesn't know what controls will be there in the subvi('s).
    I'm wondering if there is a way to dynamically read controls from any running subvi and display all the avalible controls depends on what subvi is running, and let the user decide which data are to be saved. I attached the vi I have now, please give any comment and I thank you very much in advanced.
    -chen
    Attachments:
    logger folder.zip ‏86 KB

    Hi thitchen,
    without looking at your code:
    with the VI reference you can get references of all controls on the VI's frontpanel. With that reference array you can collect all string controls in that subVI. The you should display a list to the user with the names/contents of those string controls so she/he may select which ones to save...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Unable to get parameter values from a remote database

    I am linking to a remote database view via a synonym in Oracle and trying to retrieve parameter values from it.  The username and password are the same for the local and remote database and I can run the SQL query using SQL plus against the database and values are returned.  However, when I try and run the same query in Crystal Reports (XI) I receive an Oracle error:
    "An attempt was made to connect or log in to a remote database using a connection description that could not be found.
    Action: 
    Specify an existing database link. Query the data dictionary to see all existing database links. See your operating system-specific Net8 documentation for valid connection descriptors. "
    How can it be that Crystal cannot run the query when it is valid in SQL plus?
    Any tips/info would be appreciated.
    many thanks
    Claire
    Oracle is version 10

    When running one of the reports in VS.Net this is the error I receive:
    "A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in crystaldecisions.crystalreports.engine.dll
    Additional information: Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2019 ]
    Failed to retrieve data from the database.
    Error in File C:\DOCUME1\CLAIRE1.REE\LOCALS~1\Temp\{0C6C6DD5-B958-4E10-A2AA-928C58E1B7CE}.rpt:
    Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2019 ]"
    When running the same report in Crystal Reports designer I receive this error message:
    "Prompting failed with the following error message: 'List of Values failure: fail to get values. [Cause of error: Failed to retrieve data from the database.  Details: [Database Vendor Code: 2019].  Failure to retrieve data from the database.  Error in File UNKNOWN.RPT.  Failure to retrieve data from the database.  Details: [Database Vendor Code: 2019]]'.
    Error source: prompt.dll Error code: 0x8004380D"
    So this one is also failing in the designer.
    All the parameters in the main report are static and the ones in the subreport are passed in from the main report.

  • To obtain values from fields in a web page.

    Hi everyone,
    I am in the process of developing a web based application. I am able to
    successfully convert my windows to web page documents.
    I have sincerely followed the prescribed steps to be adopted in building
    methods for validations and processes, so as to utilise them for my web
    pages too.
    But the problem that I am facing is to obtain values back from the web
    page fields (user entered values) for performing validations.
    Unfortunately the explanations provided in the Forte Web SDK Manual
    for obtaining the values from the web page fields and load it on to the
    source window through LoadParameters() method (a method in the window
    converter class of HTMLWindow project) seems to be inadequate.
    If some one can site the steps that Iam probably missing or some
    examples, it will be of great help.
    Thanks in advance.
    Pamella.
    Get Your Private, Free Email at http://www.hotmail.com

    Hi Dan,
    Thanks for your assistance.
    But as regards to my application, I have an existing forte application
    which Iam trying to web enable.
    To summarize my problem let me just consider the openning window (logon
    screen) which I have converted to web page using WindowConverter Class
    in the HTMLWindow project (obviously, it is my supplier project). The
    functionality of this window class has to just accept the user name and
    validate it. If the user name is valid then proceed further else
    display an error message. I have a separate validation method for the
    user name, which I can utilise to validate the user name typed by the
    user on the web page, if Iam browsing or on the window, if Iam directly
    running the application.
    The widgets on the window are <UserId> and <ProceedButton> with
    window attribute names as UserId and ProceedButton respectively.
    Now my handle request method goes like this :
    -- This method is the entry point from the Internet to my
    -- application. It is automatically called when a request
    -- from the Web arrives.
    response : HTTPResponse = new;
    -- Find the page name.
    pageName : TextData = new;
    pageName.SetValue(request.PageName);
    -- Generate response pages.
    if pageName.IsEqual('processquery',IgnoreCase=TRUE) then
    -- Please note that I have not write any HTML to build my web page.
    -- Instead Iam using the WindowConverter Class to convert my existing
    -- windows on the fly to web pages during run time.
    w : LogonWindow = new;
    -- my logon window class
    Converter : WindowConverter = new(sourceWindow=w);
    Converter.AssignButton(sourceField = w.<ProceedButton>,type =
    'submit');
    loginURL : TextData = self.CGIURL.Clone(deep=TRUE);
    loginURL.Concat('?serviceName=').concat('appweb');
    loginURL.Concat('&pageName=PwdPage');
    w.<ProceedButton>.HTMLLink = loginURL.value;
    -- Proceed button is on my window to which
    -- I have associated the above HTMLLink
    -- This link does not submit the User Name typed by the
    -- User browsing my web page, but this User Name has to
    -- come as part of the request from the browser to perform the
    -- validation, as Iam not sure about obtaining the User name
    -- from the web page.
    -- My problem is how to get this user name????????
    html : HTHtml = new;
    head : HTHead = new;
    body : HTBody = new;
    -- Give the page a title.
    head.Add(HTTitle(Text='Application For The Web'));
    html.Add(head);
    form : HTForm = New();
    body.Add(Converter.WindowToForm(Action=self.CGIURL,HTMethod='POST'));
    html.Add(body);
    response.AssignResponse(html.ConvertToString());
    elseif pageName.IsEqual('PwdPage',IgnoreCase=TRUE) then
    w : LogonWindow = new;
    Conv : WindowConverter = new(sourceWindow=w);
    button : PushButton = new();
    button = Conv.LoadParameters(request,w.<UserId>);
    -- This will fail because the 'Request' has no user Id.
    -- Here, the explanation provided in the Forte Web SDK manual for
    -- LoadParameters method (method from WindowConverter Class) seems to
    -- be inadequate.
    If w.UserId <> Nil And w.UserId.Value <> '' And w.UserId.LengthToEnd()
    0 ThenIf SQLsSO.IsValidUserId(w.UserId) Then
    -- Method to validate the user Name.
    w1 : PasswordWindow = new;
    Converter : WindowConverter = new(sourceWindow=w1);
    Converter.AssignButton(sourceField = w1.<ProceedButton>,type =
    'submit');
    pwdURL : TextData = self.CGIURL.Clone(deep=TRUE);
    pwdURL.Concat('?serviceName=').concat('appweb');
    pwdURL.Concat('&pageName=MessagesPage');
    -- and here I will have to get the password typed in by the User.
    -- once again my same problem?????
    w1.<ProceedButton>.HTMLLink = pwdURL.value;
    html : HTHtml = new;
    head : HTHead = new;
    body : HTBody = new;
    -- Give the page a title.
    head.Add(HTTitle(Text='Application For The Web'));
    html.Add(head);
    form : HTForm = New();
    body.Add(Converter.WindowToForm(Action=self.CGIURL,HTMethod='POST'));
    html.Add(body);
    response.AssignResponse(html.ConvertToString());
    Else
    -- Generate an exception for unknown page.
    .............. and etc.
    In your example, you had sighted about the 'Junktxt'. How does it comes
    as part of the request from the browser and what is the reference
    associated with the submit button?
    If you need further clarifications, please write to me. Iam also still
    working on it.
    Thanks in advance,
    Pamella.
    You Wrote :
    Hi, Pamella --
    It might be easier to help if you could be a little more specific about
    what went wrong (ie, the problematic code snippet and the resulting error
    message), or what exactly you were trying to do. In any event, it is very
    easy in WebEnterprise to pass values up to Forte from web pages. You can
    embed them in HTML "hidden" tags or they can accompany standard form
    elements.
    For instance, say you have the following HTML code ...
    <form method="POST" action="$$FORTE.ExecURL">
    <input type="hidden" name="ServiceName" value="TestService">
    <input type="hidden" name="TemplateName" value="nextpage.htm">
    <input type="hidden" name="hiddenParam" value="dog">
    <div align="center"><center>
    <p>
    Type some junk here: <input type="text" name="junkTxt" size="20">
    </p>
    </center></div>
    <div align="center"><center>
    <p>
    <input type="submit" value="Submit" name="submitBtn">
    <input type="reset" value="Reset" name="resetBtn">
    </p>
    </center></div>
    </form>
    In addition to what the user types into the text box (junkTxt), say you want
    to pass "dog" up to Forte as a hidden parameter (hiddenParam) (hey, done't
    ask me why!). You can retrieve these values up in Forte in the HandleTag
    method of your scanner service by invoking "FindNameValue" on
    request:HTTPRequest, ie
    firstItem:TextData = request.FindNameValue('junkTxt');
    secondItem:TextData = request.FindNameValue('hiddenParam');
    firstItem now contains the value of "junkTxt" and secondItem contains
    "dog." You can now do whatever you like with these guys, including putting
    them in a ResultSet to be displayed on "nextpage.htm"
    Hope this helps,
    Dan______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com

  • Obtaining values from other programs

    I seen where you can use Spy ++ to get values from other running programs, how do you do it? I found the values un Spy ++ from the window, so where from I go from here?
    Regards, Carter Humphreys

    Here's some more.
    Option Strict On
    Imports System.Collections.Generic
    Imports System.Runtime.InteropServices
    Imports System.Text
    Public Class Form1
    <DllImport("User32.dll")> _
    Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
    End Function
    Private Declare Auto Function IsIconic Lib "user32.dll" (ByVal hwnd As IntPtr) As Boolean
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    ListView1.AllowColumnReorder = True
    ListView1.GridLines = True
    ListView1.View = View.Details
    ListView1.Sorting = SortOrder.Ascending
    ListView1.Columns.Add("Main Window Title", 150, HorizontalAlignment.Left)
    ListView1.Columns.Add("Child Class Name", 300, HorizontalAlignment.Left)
    ListView1.Columns.Add("Child hWnd", 100, HorizontalAlignment.Left)
    ListView1.Columns.Add("Child Main Window Title", 300, HorizontalAlignment.Left)
    ListView1.Columns.Add("Is Application Minimized", 300, HorizontalAlignment.Left)
    Timer1.Interval = 5000
    End Sub
    Private Sub ListView1_Click(sender As Object, e As EventArgs) Handles ListView1.Click
    TextBox1.Text = ""
    TextBox1.Text = "Main Window Title = " & ListView1.FocusedItem.SubItems.Item(0).Text.ToString & vbCrLf & _
    "Child Class Name = " & ListView1.FocusedItem.SubItems.Item(1).Text.ToString & vbCrLf & _
    "Child hWnd = " & ListView1.FocusedItem.SubItems.Item(2).Text.ToString & vbCrLf & _
    "Child Main Window Title = " & ListView1.FocusedItem.SubItems.Item(3).Text.ToString & vbCrLf & _
    "Is Application Minimized = " & ListView1.FocusedItem.SubItems.Item(4).Text.ToString
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    ListView1.Items.Clear()
    Dim enumerator As New WindowsEnumerator()
    For Each top As ApiWindow In enumerator.GetTopLevelWindows()
    For Each child As ApiWindow In enumerator.GetChildWindows(top.hWnd)
    Dim item1 As New ListViewItem(top.MainWindowTitle)
    item1.SubItems.Add(child.ClassName)
    item1.SubItems.Add(child.hWnd.ToString)
    item1.SubItems.Add(child.MainWindowTitle)
    If top.MainWindowTitle.Length > 0 Then
    Dim ICONIC As IntPtr = CType(CInt(FindWindow(Nothing, top.MainWindowTitle).ToString), IntPtr)
    item1.SubItems.Add(IsIconic(ICONIC).ToString)
    End If
    ListView1.Items.AddRange(New ListViewItem() {item1})
    Next child
    Next top
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Timer1.Start()
    Using OFD As New OpenFileDialog
    If OFD.ShowDialog = DialogResult.OK Then
    End If
    End Using
    End Sub
    Dim InfoToWrite As New List(Of String)
    Dim CountIt As Integer = 1
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
    InfoToWrite.Clear()
    Timer1.Stop()
    ListView1.Items.Clear()
    Dim enumerator As New WindowsEnumerator()
    For Each top As ApiWindow In enumerator.GetTopLevelWindows()
    For Each child As ApiWindow In enumerator.GetChildWindows(top.hWnd)
    InfoToWrite.Add(top.MainWindowTitle & " - " & child.ClassName & " - " & child.hWnd.ToString & " - " & child.MainWindowTitle)
    Dim item1 As New ListViewItem(top.MainWindowTitle)
    item1.SubItems.Add(child.ClassName)
    item1.SubItems.Add(child.hWnd.ToString)
    item1.SubItems.Add(child.MainWindowTitle)
    If top.MainWindowTitle.Length > 0 Then
    Dim ICONIC As IntPtr = CType(CInt(FindWindow(Nothing, top.MainWindowTitle).ToString), IntPtr)
    item1.SubItems.Add(IsIconic(ICONIC).ToString)
    End If
    ListView1.Items.AddRange(New ListViewItem() {item1})
    Next child
    Next top
    IO.File.WriteAllLines("C:\Users\John\Desktop\Some Info " & CountIt.ToString & ".Txt", InfoToWrite.ToArray)
    CountIt += 1
    End Sub
    End Class
    Public Class ApiWindow
    Public MainWindowTitle As String = ""
    Public ClassName As String = ""
    Public hWnd As Int32
    End Class
    ''' <summary>
    ''' Enumerate top-level and child windows
    ''' </summary>
    ''' <example>
    ''' Dim enumerator As New WindowsEnumerator()
    ''' For Each top As ApiWindow in enumerator.GetTopLevelWindows()
    ''' Console.WriteLine(top.MainWindowTitle)
    ''' For Each child As ApiWindow child in enumerator.GetChildWindows(top.hWnd)
    ''' Console.WriteLine(" " + child.MainWindowTitle)
    ''' Next child
    ''' Next top
    ''' </example>
    Public Class WindowsEnumerator
    Private Delegate Function EnumCallBackDelegate(ByVal hwnd As Integer, ByVal lParam As Integer) As Integer
    ' Top-level windows.
    Private Declare Function EnumWindows Lib "user32" _
    (ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer
    ' Child windows.
    Private Declare Function EnumChildWindows Lib "user32" _
    (ByVal hWndParent As Integer, ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer
    ' Get the window class.
    Private Declare Function GetClassName _
    Lib "user32" Alias "GetClassNameA" _
    (ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer
    ' Test if the window is visible--only get visible ones.
    Private Declare Function IsWindowVisible Lib "user32" _
    (ByVal hwnd As Integer) As Integer
    ' Test if the window's parent--only get the one's without parents.
    Private Declare Function GetParent Lib "user32" _
    (ByVal hwnd As Integer) As Integer
    ' Get window text length signature.
    Private Declare Function SendMessage _
    Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
    ' Get window text signature.
    Private Declare Function SendMessage _
    Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As StringBuilder) As Int32
    Private _listChildren As New List(Of ApiWindow)
    Private _listTopLevel As New List(Of ApiWindow)
    Private _topLevelClass As String = ""
    Private _childClass As String = ""
    ''' <summary>
    ''' Get all top-level window information
    ''' </summary>
    ''' <returns>List of window information objects</returns>
    Public Overloads Function GetTopLevelWindows() As List(Of ApiWindow)
    EnumWindows(AddressOf EnumWindowProc, &H0)
    Return _listTopLevel
    End Function
    Public Overloads Function GetTopLevelWindows(ByVal className As String) As List(Of ApiWindow)
    _topLevelClass = className
    Return Me.GetTopLevelWindows()
    End Function
    ''' <summary>
    ''' Get all child windows for the specific windows handle (hwnd).
    ''' </summary>
    ''' <returns>List of child windows for parent window</returns>
    Public Overloads Function GetChildWindows(ByVal hwnd As Int32) As List(Of ApiWindow)
    ' Clear the window list.
    _listChildren = New List(Of ApiWindow)
    ' Start the enumeration process.
    EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0)
    ' Return the children list when the process is completed.
    Return _listChildren
    End Function
    Public Overloads Function GetChildWindows(ByVal hwnd As Int32, ByVal childClass As String) As List(Of ApiWindow)
    ' Set the search
    _childClass = childClass
    Return Me.GetChildWindows(hwnd)
    End Function
    ''' <summary>
    ''' Callback function that does the work of enumerating top-level windows.
    ''' </summary>
    ''' <param name="hwnd">Discovered Window handle</param>
    ''' <returns>1=keep going, 0=stop</returns>
    Private Function EnumWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32
    ' Eliminate windows that are not top-level.
    If GetParent(hwnd) = 0 AndAlso CBool(IsWindowVisible(hwnd)) Then
    ' Get the window title / class name.
    Dim window As ApiWindow = GetWindowIdentification(hwnd)
    ' Match the class name if searching for a specific window class.
    If _topLevelClass.Length = 0 OrElse window.ClassName.ToLower() = _topLevelClass.ToLower() Then
    _listTopLevel.Add(window)
    End If
    End If
    ' To continue enumeration, return True (1), and to stop enumeration
    ' return False (0).
    ' When 1 is returned, enumeration continues until there are no
    ' more windows left.
    Return 1
    End Function
    ''' <summary>
    ''' Callback function that does the work of enumerating child windows.
    ''' </summary>
    ''' <param name="hwnd">Discovered Window handle</param>
    ''' <returns>1=keep going, 0=stop</returns>
    Private Function EnumChildWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32
    Dim window As ApiWindow = GetWindowIdentification(hwnd)
    ' Attempt to match the child class, if one was specified, otherwise
    ' enumerate all the child windows.
    If _childClass.Length = 0 OrElse window.ClassName.ToLower() = _childClass.ToLower() Then
    _listChildren.Add(window)
    End If
    Return 1
    End Function
    ''' <summary>
    ''' Build the ApiWindow object to hold information about the Window object.
    ''' </summary>
    Private Function GetWindowIdentification(ByVal hwnd As Integer) As ApiWindow
    Const WM_GETTEXT As Int32 = &HD
    Const WM_GETTEXTLENGTH As Int32 = &HE
    Dim window As New ApiWindow()
    Dim title As New StringBuilder()
    ' Get the size of the string required to hold the window title.
    Dim size As Int32 = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0)
    ' If the return is 0, there is no title.
    If size > 0 Then
    title = New StringBuilder(size + 1)
    SendMessage(hwnd, WM_GETTEXT, title.Capacity, title)
    End If
    ' Get the class name for the window.
    Dim classBuilder As New StringBuilder(64)
    GetClassName(hwnd, classBuilder, 64)
    ' Set the properties for the ApiWindow object.
    window.ClassName = classBuilder.ToString()
    window.MainWindowTitle = title.ToString()
    window.hWnd = hwnd
    Return window
    End Function
    End Class
    La vida loca

Maybe you are looking for