Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 55

Thread: Time Clock

Hybrid View

  1. #1
    Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    96
    Very good idea!

  2. #2
    Hello

    I have been working on the Serial communications using MSCOMM32.

    PUBLIC ComForm && ,TestCom
    ComForm = CREATEOBJECT('Form')
    ComForm.AddObject("Testcom","Olecontrol","MSCOMMLi b.MSComm")
    ComForm.Testcom.CommPort = 2
    ComForm.Testcom.Settings = "9600,E,7,1"
    ComForm.Testcom.PortOpen = .T.
    ComForm.Testcom.Output = Chr(87)+Chr(13) // Scale command to send weight data
    ComForm.Testcom.Input
    ComForm.Testcom.PortOpen = .F.

    It does not return the scale information in Lianja but does in Foxpro 9.0
    Please let me know what i am doing wrong.
    Thank you for your time.

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,181
    Blog Entries
    22
    ComForm.Testcom.Input specified like that will call it as a method not access the property.

    See below.

    Code:
    PUBLIC ComForm && ,TestCom
    ComForm = CREATEOBJECT('Form')
    ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
    ComForm.Testcom.CommPort = 2
    ComForm.Testcom.Settings = "9600,E,7,1"
    ComForm.Testcom.PortOpen = .T.
    ComForm.Testcom.Output = Chr(87)+Chr(13) // Scale command to send weight data
    result = ComForm.Testcom.Input
    ComForm.Testcom.PortOpen = .F.
    Hint:

    in the console.

    set debug on
    obj = createObject("MSCOMMLib.MSComm")

    then quit lianja and read the debug file in c:\lianja\debug

    You can see all the methods and properties available for that activeX object.

    I'd appreciate it if you post a new question in its own thread rather than use this one timeclock thread for every question. Its becoming unwieldy and long.
    Last edited by barrymavin; 2024-05-15 at 21:13.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us