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

Similar Messages

  • Passing value from a program to sap script ?

    Hello Friends,
    While defining the header,footer or address window to assign a text we goto text element and assign it.
    Now is there any way where we can pass the value from the program.
    Eg : I want to pass the value for address from the abap editor to the address window in a sap script instead of assigning the address using the text element in sap script. Is it possible?
    Regards,
    Ranjith

    You can have subroutines in script.
    if you have any fields used to get address then using that fileds you can retrieve the address by defining subroutines in your form
    Reward points if useful.
    Regards,
    Nageswar

  • Passing value from one program to another

    Dear All,
    I have to pass one value from one program to the standard selection screen .But there is no paramter id .how can i pass the value.
    Regards,
    Magesh

    Hi Magesh,
    See the help for these
    - EXPORT obj1 ... objn TO DATA BUFFER f.
    - EXPORT obj1 ... objn TO MEMORY.
    - EXPORT (itab) TO ... .
    - IMPORT obj1 ... objn FROM DATA BUFFER f.
    - IMPORT obj1 ... objn FROM MEMORY.
    - IMPORT (itab) FROM ... .
    Important thing is that these work correct in same session only.
    awrd points if useful
    Bhupal

  • Line Breaks missing in captions from other programs...

    I've spent the last few hours searching around, and I've been unable to find any solution to a weird thing I noticed.
    I've recently purchased LR 3.4.1 and when I imported a handful of older pics that had had the captions set using Bridge, the line breaks were now gone.
    I then went to Bridge and tested it, and sure enough, it can read line breaks from LR, but the opposite doesn't seem to be true. As part of my work, I get a bunch of photos that other photogs have shot and added captions to via Bridge, but I can't seem to find any check box or setting on how to get LR to read the line breaks.
    Any one have any advice on how to get LR to read line breaks from other programs? I'd hate to have to go through and re-caption each and every single photo, especially when adding the older ones into LR to use it as a DAM.
    Thanks!

    This is a long-standing, annoying bug in Windows LR that has been acknowledged by Adobe:
    http://feedback.photoshop.com/photoshop_family/topics/newline_bug_in_caption_text
    Please go to the feedback site and vote for that issue to get fixed.
    It is just a display problem in LR -- the line breaks in the metadata are preserved, and if you enter line breaks in the metadata, they are preserved too.

  • Firefox 3.6 doesn't open links clicked from other programs (IM, etc.,)

    Whenever I try to open a link from either my IM or an IRC program like mIRC it won't open in firefox. I have to copy and paste the link.

    I now have FireFox 32.0.2 no joy. I have loaded ThunderBrowse which took care of Thunderbird but still can't load links from other programs. I fixed this before (other backups, I crashed my windows C drive and have been trying to restore), but can't remember how. I think it required reloading IE (I had deleted IE on my latest restore), but I have now done that with no joy.
    When I click on a link from another program, nothing happens, and when I right click and am offered "open in browser" nothing happens, and when offered " copy browser link" it doesn't copy.
    I tried resetting FireFox, no joy.
    Noticed control panel "set program access" doesn't hold, always goes back to custom, and defaults to "uses default browser"!
    Please help!

  • Links from other programs won't open in Firefox

    This has been asked a number of times before, but none of the answers worked for me. I have Firefox 26.0 (the most stable for me) and Thunderbird 24.6.0. After a computer crash and reloading both programs, I first noticed the problem with links from Thunderbird, both clicking and right clicking with "open in browser". But then I remembered trying to open help in MS word and Frontpage which are supposed to open from the internet.
    I have checked that Firefox is the default browser, changed the file (none) file transfer protocol, then deleted it, etc. Nothing helps.

    I now have FireFox 32.0.2 no joy. I have loaded ThunderBrowse which took care of Thunderbird but still can't load links from other programs. I fixed this before (other backups, I crashed my windows C drive and have been trying to restore), but can't remember how. I think it required reloading IE (I had deleted IE on my latest restore), but I have now done that with no joy.
    When I click on a link from another program, nothing happens, and when I right click and am offered "open in browser" nothing happens, and when offered " copy browser link" it doesn't copy.
    I tried resetting FireFox, no joy.
    Noticed control panel "set program access" doesn't hold, always goes back to custom, and defaults to "uses default browser"!
    Please help!

  • HT5958 This new closed Library system stinks. Now you can't access media from other programs. Any work around?

    Let me start by saying I have been using FCP X for a year now and really love it.  We produce a half hour weekly TV series so I put it through its paces on a weekly bases.
    I was horrified to return from the holidays to find out that an automatic update yielded a whole new file system.  By packaging all of the Final Cut Event and Project folders into a single library file you can no longer access the original media from other programs such as Photoshop and After Effects without making two copies of all of the media.  This really cuts into the pipeline.  In the past we were able to recreate new show opens and transitions quickly from within After Effects by linking to the original media in the event folders to use them as source files in compositions.  The same was true of grabbing frames from Original movies for use in Photoshop for promotional materials.  With the use of the Libraries, ALL OF THE LINKS ARE BROKEN.  Yes I know you can right click on a library and still view the files, yes they are still there, but you can't do that from within another program. 
    This Library system doesn't make any sense.  Its a step back from the old system.  It was much easier, quicker, and efficient to move large event libraries and projects off and on the system and backup using Finder.  Now you have to open up Final Cut to do everything and its a lot slower.
    I want to appeal to any Apple developers who monitor this to return to the old system of file management. 

    Media does not have to be stored inside the library. Use the Consolidate library or event to move it to an external location.

  • I can't print in Adobe 11.0, I can print from other programs?

    I have confirmed that I can print from other programs.
    I have uninstalled Adobe and reinstalled to make sure the programs was the most up todate.
    I have installed a new printer just today and confirmed the drivers are up todate.
    I have confirmed there are no security issues with the document - documents.
    I have tried printing the document as an image and it still will not print.
    I don't get any errors, just nothing happens.  It doesn't even go into the print que
    Help!

    I tried printing a simple PDF.
    We couldn't print PDF's prior to the replacment of the printer, but I thought replacing the printer might help.
    I have pulled some tech people here at the office to see if there is a common denominator between the computers and or the issues arising and nothing is coming up.
    This is just so odd.

  • I can't paste text from other programs

    For some strange reason, PE12 wont let me past text from other programs and Idk why?!

    What happens when you try? Any error message?

  • Can I share files from other programs or just Adobe apps files. I work with Final Cut and Premiere X

    Can I share files from other programs or just Adobe apps files. I work with Final Cut and Premiere X.? Need to share files up to 6GB.
    I need to know if the 20 gb limit is about all that I share, or if it's just about whatis in the clouds. If I take, recover my limit?
    The speed of upload e download is good?

    The Creative Cloud file storage could be used for video assets but speed and performance might vary based on location. I would suggest you testing it out yourself using your Adobe ID before subscribing. Performance would not change after you joined.
    -Dave

  • Outlook 2010 paste from other programs not working.

    Hi,
    Win 7 SP1 x86 w latest patches. Win lang. ENG
    Outlook 2010 SP1 x86 w latest patches. Office lang. ENG
    Regional (date/time and so on) settings EE (Estonia)
    I have about 6 users with same conditions.
    When I'm trying to copy - paste from other programs like IE9, Word, Excel I'm unable to paste into Outlook message body.
    It just wont paste.
    Typically, Outlook shows me "thniking circle" for a millisecond or rarely just hangs.
    There are some exceptions:
    1. I'm able to paste into To: field
    2. I'm able to paste into Subject: field
    3. I'm able to paste even into body if I copied text from Notepad.
    4. I'm able to paste into body when I copied text from another email.
    Additional information:
    Outlook default message format "Plain text" (Rich text, HTML - does'nt matter)
    What I'v tried so far and results:
    1. Repair Office installation trough "Programs and features" - NO LUCK
    2. Changed default paste behaviour from other programs to "keep text only" - NO LUCK
    3. Used SAFE MODE - this helps, paste SEEMS WORKING correctly. Based on my knowledge, SAFE mode mainly disables Add-ins. OK.
    Disabled all Add-ins in normal mode so Outlook shows that "No Active Application Add-Ins" - NO LUCK
    So, I'm out of ideas. I think that this problem starts after installing Office 2010 SP1
    I don't want to uninstall SP1 because for me it's not a solution (SP1 won't dissapear from the list of updates), ok.. agree, it may be
    temporary solution but at the end of the day, there must be something else.
    Any ideas?
    rgds Sven

    Rename normailemail.dotm to .old when Outlook is closed and see if it works now.
    You can find the file here;
    C:\Users\%username%\AppData\Roaming\Microsoft\Templates
    Robert Sparnaaij
    [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info
    Thanx, NormalEmail.dotm did not do anything for me but the renaming the Normal.dotm in the same folder did the trick for me. I can paste links again into outlook :)
    Win7 SP1 and Outlook 2010 32bit

  • How to get the layout values in F4 help from Other program ?

    Hello All,
           I have a program P1which calls other program P2 .
    When I execute P1 I have a parameter for Layout with F4.
    When I press  F4 I want the help values which are there in the lay out of the other program P2.
    For this I'm using the following code :-
    DATA  spec_layout        TYPE  disvariant.  "specific layout
    DATA  v_save             TYPE  c.           "Save mode
    DATA  gs_variant         TYPE  disvariant.  "for parameter IS_VARIANT
    DATA  gv_exit            TYPE  c.
    PARAMETERS:  p_vari  TYPE disvariant-variant.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
    *  gs_variant-report  = sy-repid.
    *  gs_variant-variant = p_vari.
      CLEAR gs_variant.
      MOVE  '/BSHP/FP_CALL_OF_PLAN' TO gs_variant-report. "Report von Original CALL_OF_PLAN
      gs_variant-variant = p_vari.
      CALL FUNCTION 'LVC_VARIANT_F4'
        EXPORTING
          is_variant = gs_variant
          i_save     = v_save
        IMPORTING
          e_exit     = gv_exit
          es_variant = spec_layout
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF gv_exit NE 'X'.
    *     set name of layout on selection screen
          p_vari    = spec_layout-variant.
        ENDIF.
      ENDIF.
    But still I'm not able to get the values.
    Can anyone help me out ?
    Regards,
    Deepu.K
    null

    This question has been asked and answered many times before.  Please read the following blog for a good start:
    /people/yohan.kariyawasan/blog/2009/03/18/ui-framework-news-f4-help
    Before posting further please do a search in this forum and also read the rules of engagement listed here:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
    I'm now locking this thread as it is a duplicate of an already answered question.
    Thank you,
    Stephen
    CRM Forum Moderator

  • 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

  • Selection screen when regarding from other program

    Hi all
    i am passing one input to selection screen of zreport from my module pool program.
    I have to enter another input at the selection screen as one input is retrieved from module pool.
    my problem,
    the user can still change the input that has been retrieved from module pool which i don't want to change.
    You can say that to remove that field from selection screen but the problem is that sometimes the zreport is run directly in that case the user
    has to enter two input fields in selection screen.
    Is there a way that when i come to zreport from module pool the field for which i am bringing value from module pool can be greyed out.
    pls let me know the solution.
    Thanks

    Sure,  all you need to do is set up a selection-screen flag,  then you can set this flag when SUBMITing the program,  then check this flag and then turn the field to output only.  HEre is what I mean.
    report zrich_0001.
    parameters: p_fld1(10) type c,
                p_fld2(10) type c.
    parameters: p_flg type c no-display.
    at selection-screen.
      if p_flg = 'X'.
         loop at screen.
            if screen-name = 'P_FLD2'.
               screen-input = '0'.
               modify screen.
            endif.
        endloop.
      endif.
    See here that P_FLG is the flag which is NO-DISPLAY,  when it is "X", we will deactivate the P_FLD2.  So when you submit it,  set the flag.
      submit zrich_0001 via selection-screen
                with p_fld1 = 'Value1'
                with p_fld2 = 'Value2'
                with p_flg  = 'X'.
    Regards,
    Rich Heilman

  • Getting an exit value from a program called thru a shell script

    how do i get the correct exit value always from a program called thru a shell script
    the getExitValue of the process works fine someitmes but not always ...
    Ex: write a pgm which sleeps for 5 secs & returns with exit(100).try to invoke this thru a script & try to run this script from Runtime.getRuntime.exec(..)
    ...the exit value is not same as 100.(it works if the sleep is not given though !!)
    can nebody help??

    ive done that ...see the sample code for ex..
    public void execute()
                   try{
                             Process program=Runtime.getRuntime().exec(cmd);
                             printOutput(program.getInputStream());
                             try
                                  program.waitFor();
                             catch(InterruptedException e)
                                  System.out.println("Command Interrupted: " + e);
              System.out.println("Error status : "+program.exitValue());
                        catch(SecurityException e)
                             System.out.println("Error executing program "+e);
                        catch(IOException e)
                             System.out.println("Error executing program "+e);
    ....

Maybe you are looking for