• Timer app

    From AK@21:1/5 to All on Wed Nov 16 06:41:22 2022
    I have not found anything for Ubuntu that suits my needs.

    I need a simple timer that can show a user defined message.

    I have wine installed, so many Windows programs will work.

    Thanks,
    Andy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to All on Wed Nov 16 12:00:15 2022
    On 11/16/2022 9:41 AM, AK wrote:
    I have not found anything for Ubuntu that suits my needs.

    I need a simple timer that can show a user defined message.

    I have wine installed, so many Windows programs will work.

    Thanks,
    Andy


    Maybe something like this would work.

    https://apps.kde.org/kalarm/

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mayayana@21:1/5 to scientist77017@gmail.com on Wed Nov 16 13:19:36 2022
    "AK" <scientist77017@gmail.com> wrote

    |I have not found anything for Ubuntu that suits my needs.
    |
    | I need a simple timer that can show a user defined message.
    |
    | I have wine installed, so many Windows programs will work.
    |

    If it were me I'd use a VBScript. I don't know
    if that's orth your trouble. You might have to install
    Windows Script Host. (scrrun.dll, etc) Last time I
    tried Wine it was a mess, divided into 32 and 64 bit
    and difficult to use actual Windows libraries. So I
    don't have easy instructions.

    It's a very simple script:

    For i = 1 to 5
    WScript.Sleep 1000
    Next

    Msgbox "This is the message."

    Sleep pauses for a given number of ms. This script
    waits 5 seconds.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mayayana@21:1/5 to Paul on Wed Nov 16 16:04:29 2022
    "Paul" <nospam@needed.invalid> wrote

    | > Sleep pauses for a given number of ms. This script
    | > waits 5 seconds.
    |
    | WinXP had "at". The temporal aspect can be handled by the scheduler.
    |
    | at 23:41 some.bat
    |
    | Linux happens to have a look-alike "at"

    Isn't that different? An alarm clock is not the same
    as a timer. But it wasn't clear what the OP needs.
    The only time I ever use such things is to test code
    speed. The last time I used an alarm clock was for
    jury duty... maybe 15 years ago. :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Mayayana on Wed Nov 16 15:29:50 2022
    On 11/16/2022 1:19 PM, Mayayana wrote:
    "AK" <scientist77017@gmail.com> wrote

    |I have not found anything for Ubuntu that suits my needs.
    |
    | I need a simple timer that can show a user defined message.
    |
    | I have wine installed, so many Windows programs will work.
    |

    If it were me I'd use a VBScript. I don't know
    if that's orth your trouble. You might have to install
    Windows Script Host. (scrrun.dll, etc) Last time I
    tried Wine it was a mess, divided into 32 and 64 bit
    and difficult to use actual Windows libraries. So I
    don't have easy instructions.

    It's a very simple script:

    For i = 1 to 5
    WScript.Sleep 1000
    Next

    Msgbox "This is the message."

    Sleep pauses for a given number of ms. This script
    waits 5 seconds.

    WinXP had "at". The temporal aspect can be handled by the scheduler.

    at 23:41 some.bat

    Linux happens to have a look-alike "at"

    at 11:41 PM "/usr/bin/some"

    But when I tried the Linux version, a check
    with "atq" showed it was in the job queue, but
    it didn't fire as near as I could tell. Probably
    needs some systemctl command to get the equivalent
    of the atd daemon running.

    In Windows, "at" was discontinued past WinXP, because
    it was considered a security risk. It's possible it
    was running jobs as SYSTEM, and if you put cmd.exe
    as the executable, that would provide a way of elevating
    for a limited user. Something like that.

    You could even incorporate some WINE in there if you wanted.
    I expect the Linux version just runs as the user who registered
    the job in their personal queue.

    The purpose of using a ready-made calendar style application,
    is not because it delivers sparkle ponies, it's because
    packages like that are more likely to have been inspected
    when put in the tree. Whereas crappy little "at" likely got
    half-hearted attention. I'm sure it would work with
    enough pampering.

    https://web.archive.org/web/20210815082014/https://opensource.com/article/21/8/linux-at-command

    One reason I'm not a huge fan of WINE, is the out-of-the-box
    configuration in the popular distros isn't very good. And it's
    possible the materials involved in a proper installation of
    WINE, have "licensing issues". The lawyers likely prevent
    a curated set of "winetricks" from being executed.

    In Linux, it used to be the same issue with the NVidia driver
    versus the Nouveau driver. They likely wanted to make
    the NVidia driver install for NVidia cards, but their
    "license esthetic" prevented that. You do occasionally find
    a distro where the NVidia is installed for you. The only
    reason I don't "clamor for Nouveau", is it loses communications
    with my 1080 and has no VPU recover coded up. Which yields a
    black screen and is no fun at all.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Mayayana on Wed Nov 16 17:16:20 2022
    On 11/16/2022 4:04 PM, Mayayana wrote:
    "Paul" <nospam@needed.invalid> wrote

    | > Sleep pauses for a given number of ms. This script
    | > waits 5 seconds.
    |
    | WinXP had "at". The temporal aspect can be handled by the scheduler.
    |
    | at 23:41 some.bat
    |
    | Linux happens to have a look-alike "at"

    Isn't that different? An alarm clock is not the same
    as a timer. But it wasn't clear what the OP needs.
    The only time I ever use such things is to test code
    speed. The last time I used an alarm clock was for
    jury duty... maybe 15 years ago. :)



    If you wanted an interval timer, it would probably be faster
    to write one.

    Visual Studio in the IDE, has some templates you can use.
    One of the templates opens a window for you. And all of the
    code to do that, is right there for you. There is an
    Event loop, and on an older OS, it listens for Expose
    events, which tells you when you should be redrawing
    a portion of the screen.

    Yonks ago, Windows developers used to complain about
    the "ten pages of code I have to write, before I can do anything".
    And the VS template solves that problem.

    And I know that VBS has all this stuff too. And that's
    what you would write your interval timer in. That would be
    a lot simpler than my method.

    An interval timer is probably "good enough" with one
    second resolution, so a "sleep(x)" is likely to be
    sufficient to time an interval.

    If you could find a QT5 package for Windows, you could also
    code up your interval timer in that, and as the purpose of
    QT is to be cross platform, a quick recompile in Linux
    (against Linux QT -dev libs) and you'd have the same look
    and feel there. Your interval timer would be a folder with
    about 80MB of code in it :-) The Internationalization package
    would be 20MB or so, by itself. But the advantage would be,
    you would not need WINE.

    The only thing I wouldn't do, is write it in Python. Python
    has caused way too much aggravation to ever be considered a
    possibility.

    *******

    As a copy/pasta programmer, look at the great materials out there...
    A search on "Linux interval timer" got me some code. The function
    isn't great, but it's a start.

    https://www.makeuseof.com/linux-timer-mechanisms/

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to Mayayana on Thu Nov 17 13:22:24 2022
    On Wed, 16 Nov 2022 13:19:36 -0500, Mayayana wrote:
    If it were me I'd use a VBScript. I don't know
    if that's orth your trouble. You might have to install
    Windows Script Host. (scrrun.dll, etc) Last time I
    tried Wine it was a mess, divided into 32 and 64 bit
    and difficult to use actual Windows libraries. So I
    don't have easy instructions.

    WSH is included with the default WINE installation and its default system profile. At least in Ubuntu 16.

    It's trivial but, WINE's version of WSH is not 100% compatible with Microsoft's, where it doesn't implement the `WSH` object which is an undocumented alias for the `WScript` object.

    I found that out the hard way, since I was using `WSH` inplace of `WScript`
    in most of my VBScript & JScript, because it's shorter to type. There may be other undocumented things which are absent in WINE's. But the good thing is,
    it can be used to detect whether the WSH is WINE's or Microsoft's.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mayayana@21:1/5 to jj4public@outlook.com on Thu Nov 17 08:11:13 2022
    "JJ" <jj4public@outlook.com> wrote

    | WSH is included with the default WINE installation and its default system
    | profile. At least in Ubuntu 16.
    |
    | It's trivial but, WINE's version of WSH is not 100% compatible with
    | Microsoft's, where it doesn't implement the `WSH` object which is an
    | undocumented alias for the `WScript` object.
    |
    I can forgive them for that, seeing as how I'd never heard of
    that alias. :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)