Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Lakare

    how to position a dialog box

    Do you write the square brackets? The square brackets just mean it is optional and shall not be a part of the code. Regards Lakare
  2. Lakare

    how to position a dialog box

    Hey smiler44, Begin Dialog DialogName [x, y,] dx, dy [, caption$] [,.dialogfunction] © 1996 - 2004, Attachmate Corporation. All rights reserved. (x,y) = Position of dialog relative to upper left cornor of parent window (dx,dy) = Size of window caption = Text in top of...
  3. Lakare

    How to stop a dialog ( i think dialog box) closing?

    Hi smiler44, I have made a simple example of how to 'fake' several pages in a dialog, by letting the dialog stay open when the buttons "Back" and "Forward" are pressed. Declare Function DlgFunction(identifier$, action, suppvalue) 'Declare the function Dim pagenr As Integer Sub Main...
  4. Lakare

    find a string within a variable string

    InStr(string1, string2) Return where in string1, string2 is. If string2 is not in string1 it returns 0. Regards Lakare
  5. Lakare

    Put string not copying the exact variable

    Jonats, You should be able to change, Buffer$ = Buffer$ & objAttachScreen.GetString(1,1, BufferSize%) with Dim area As Object Set area = objAttachScreen.Select(1, 1, 1, BufferSize%) Buffer$ = Buffer$ & area even though its a bit more complicated. Lakare
  6. Lakare

    Put string not copying the exact variable

    Hey jonats Don't know if is works, but have you tried Dim area As Object Set area = Sess0.Screen.Select(StartRow, StartCol, EndRow, EndCol) Lakare
  7. Lakare

    Put string not copying the exact variable

    Hey, As far as I know, it is only able to handle ASCII and ANSI, and not utf-8 characters. Sorry, hope you can find a solution. Lakare
  8. Lakare

    Using macros to copy data using relative screen position.

    Hey Maybe you mean something like this? Dim cursor_position(1) As Integer cursor_position(0) = Sess0.Screen.row cursor_position(1) = Sess0.Screen.col Then you got your position of your cursor. Lakare
  9. Lakare

    steping through code problems

    Hey Don't why you can't step through your second sub, but if you put your 'Dim' statements outside the sub, the variables will become public for all Subs and Functions to use, so you won't need to define and assign the values a second time. The assignments need to be inside a Function or Sub...
  10. Lakare

    I'm pretty sure this math is wrong....

    Hi, As an alternative to the commas, you can do this data = Sess0.Screen.GetString(6,66,14) net=trim(Getfield(data,1,",") + Getfield(data,2,",") + Getfield(data,3,",")) data = Sess0.Screen.GetString(7,66,14) pen=trim(Getfield(data,1,",") + Getfield(data,2,",") + Getfield(data,3,",")) data =...
  11. Lakare

    paste information into an email

    This opens a new mail, not sure how to take control of an allready open mail. On Error GoTo SendMail_Err NL = Chr (13) + Chr (10) Set oOutlook = CreateObject("Outlook.Application") Set oMailItem = oOutlook.CreateItem(olMailItem) With oMailItem .Display 'Show it, don't know why it...
  12. Lakare

    Macro to go between EXTRA and notepad

    I'm sure there is a better way to do it, but this function takes a line number as input and returns the extracted line. Declare Function extractline(lineNumber) Function extractline(lineNumber) filename = "<filename>" OPEN filename For Input As #1 Dim i as integer...
  13. Lakare

    Set Extra Host Options with VBA

    Have you tried to make a HostOptions Object first? Doing something like this should create your HostOptions object, and then you should be able to use the Lines function. Dim Hostoption as Object Set Hostoption = Sess0.Screen.HostOptions Lakare
  14. Lakare

    ComboBox Question

    First of all. Case 1 'Initialisation DlgValue("MakeComboBox"),0 needs to be in two lines, like this Case 1 'Initialisation DlgValue("MakeComboBox"),0 Second, does the whole function show as a compile error, or just a single line? DlgValue("MakeComboBox"),0 And have you tried to...
  15. Lakare

    ComboBox Question

    This should do it. Declare Function dlgFunction(identifier$, action, suppvalue) Sub Main Dim Make(2) as String Make(0) = "Sedan" Make(1) = "Truck" Make(2) = "SUV" Begin Dialog dlgOptions 10, 28, 100, 100, "Select", .dlgFunction OkButton 60, 20, 20, 10,.btnOK...
  16. Lakare

    Textbox1

    Hi I think it is something like this you mean. I have shown you a couple of functions to handle the checkbox. Hope it helps. Declare Function DlgFunction(identifier$, action, suppvalue) Sub Main Begin Dialog Dialog1 186, 50, .DlgFunction OkButton 130, 6, 50, 14 TextBox...
  17. Lakare

    Variable to shorten code

    Sorry, just realize the function was called SendControlKey, so the first function should not use SendControlKey, but the Sendkeys function instead. Also, if you want a function to handle more ControlKeys, then you can make a function with an argument for the Controlkey, and then have a Switch...
  18. Lakare

    Variable to shorten code

    Have never used Attachmate Reflection, but can't you make a function to do the job like, Declare Function sendkey(key) Function sendkey(key) ibm.CurrentScreen.SendControlKey(key) End Function or if you want a Function, just for tab, then Declare Function sendtab() Function sendtab()...
  19. Lakare

    Displaying Variables in a Dialog Box

    In the function FileDlgFunction, I make the corresponding field marked. When it is action case five for the Dialog, it always happens. So when you move yoru mouse around it can flicker yes, don't know if you can remove that. I believe it won't flicker if you keep your mouse still, but not sure...
  20. Lakare

    Displaying Variables in a Dialog Box

    To me it sounds like you want a dialogbox to show your results in a nice way. This is a way to do it. Dim variables(11) as string, result(11) as string, yesno(1) as string Dim iRepurchase as integer, iWellsOwned as integer, iCoLoss as integer, iWOEPBO as integer, iRSI as integer, iREO as...

Part and Inventory Search

Back
Top