Results 1 to 5 of 5

Thread: VFP Timers

  1. #1
    Junior Member
    Join Date
    Jun 2020
    Posts
    8

    VFP Timers

    Is there a way to simulate timers within lainja or some method to watch say a folder every second to see if a file is present and if so fire a procedure.

    We use this a lot with checking serial and IP ports as well.

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,184
    lo = newobject("timer")

    hth,

    Hank

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,155
    Blog Entries
    22
    Hi Rob

    Lianja Has built in support for watching for files or directories changing.

    https://www.lianja.com/doc/index.php...System_Watcher
    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

  4. #4
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    how about for serial communications, we use timers to check the buffer for data.

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,155
    Blog Entries
    22
    You can do this programatically by creating a Timer object as was previously mentioned.

    Alternatively you can have timers on the app, pages, sections and fields all with a configurable timer interval. Note that timers only fire when your app is in runtime mode not in design mode.

    Rather than polling it may be more responsive to handle a callback depending on what you use to handle the serial communications. As ws mentioned previously you can do this in Python and integrate it into your VFP code.
    Last edited by barrymavin; 2024-02-22 at 04:34.
    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