Author Topic: Watch out for new posts  (Read 1395 times)

jj2007

  • Member
  • *****
  • Posts: 11552
  • Assembler is fun ;-)
    • MasmBasic
Watch out for new posts
« on: March 07, 2021, 03:43:21 AM »
As requested by Hutch, I moved the "forum watcher" to the MasmBasic sub-forum. The new version uses a SysLink control. Feedback needed - I could not yet test it on Windows 10.

A little proggie that checks every two minutes if there are new posts in the forum :biggrin:
Code: [Select]
guiTimerMs=120000 ; once every two minutes; OPT_Icon Eye
guiShowW=6 ; SW_MINIMIZE
GuiParas equ "Forum watcher", xr20, w400, h400 ; xr=right aligned
include \masm32\MasmBasic\Res\MbGui.asm
  GuiControl MyEdit, "edit", font -14:FW_SEMIBOLD, bcol Black, fcol White
  SetGlobals Forum$, ForumAll$, ForumOld$, flag
  call CheckNewPosts ; once before the timer kicks in
Event Timer
  call CheckNewPosts
EndOfEvents
CheckNewPosts:
  Let Forum$=NoTag$(FileRead$("http://masm32.com/board/index.php?action=recent"))
  Let ForumAll$=""
  For_ ecx=1 To 9
Let ForumAll$=ForumAll$+Str$("\n\n%_i ",ecx)+Extract$(Forum$, "/ Re: ", "on Today at", xsExcL or xsExcR or xsLoop, 1)
  Next
  .if StringsDiffer(ForumAll$, ForumOld$) ; something changed, show it
Let ForumOld$=ForumAll$
AddWin$ hMyEdit="*** minimise this window ***"+eax
ClearLastError
invoke ShowWindow, hGui, SW_RESTORE ; pop up if minimised
  .endif
  ret
GuiEnd XP
« Last Edit: March 10, 2021, 01:30:27 PM by jj2007 »

HSE

  • Member
  • *****
  • Posts: 1746
  • <AMD>< 7-32>
Re: Watch out for new posts
« Reply #1 on: March 07, 2021, 03:52:01 AM »
JJ:
I don't see your post  :biggrin:

Edit must be cleaned, I don't know how you do that:
Code: [Select]
  .if StringsDiffer(Forum$, ForumOld$)

AddWin$ hMyEdit=nulo$  ; <----- ???

Let ForumOld$=Forum$
AddWin$ hMyEdit=eax+CrLf$
invoke ShowWindow, hGui, SW_RESTORE
  .endif

jj2007

  • Member
  • *****
  • Posts: 11552
  • Assembler is fun ;-)
    • MasmBasic
Re: Watch out for new posts
« Reply #2 on: March 07, 2021, 03:55:01 AM »
JJ:
I don't see your post  :biggrin:

I see yours:
Code: [Select]
1 Watch out for new posts
«Last post by HSE

But you are right, it has a little bug: Extract$(Forum$, "/ Re: ", "on Today at", xsExcL or xsExcR or xsLoop, 1)

That doesn't catch new posts :sad:

HSE

  • Member
  • *****
  • Posts: 1746
  • <AMD>< 7-32>
Re: Watch out for new posts
« Reply #3 on: March 07, 2021, 04:01:46 AM »
 :thumbsup: now
Code: [Select]
1 Watch out for new posts
«Last post by jj2007

 2 Watch out for new posts
«Last post by HSE

 3 ", "

 4 UASM and UltraLight
«Last post by johnsa

 5 UASM and UltraLight
«Last post by mabdelouahab

jj2007

  • Member
  • *****
  • Posts: 11552
  • Assembler is fun ;-)
    • MasmBasic
Re: Watch out for new posts
« Reply #4 on: March 07, 2021, 05:09:20 AM »
Ok, it's fixed: now it looks also for brand new threads - see version 2 attached to the top post.

It was a bit more complicated, as I had to dig into the html code to find the board title.

HSE

  • Member
  • *****
  • Posts: 1746
  • <AMD>< 7-32>
Re: Watch out for new posts
« Reply #5 on: March 07, 2021, 06:21:34 AM »
Testing the thing

Fantastic  :thumbsup:

jj2007

  • Member
  • *****
  • Posts: 11552
  • Assembler is fun ;-)
    • MasmBasic
Re: Watch out for new posts
« Reply #6 on: March 07, 2021, 06:38:37 AM »
Glad to hear it works :thumbsup:

One problem was that the download of http://masm32.com/board/index.php?action=recent is as "guest", i.e. not logged in. Apparently the old trick with embedding user name and password into the URL does not work any more (and rightly so). So you get a dumbed down version of the forum. I'd like to do the same with other forums where I am registered, but FreeBasic, for example, has a different software, and I have not yet discovered a way to get the most recent posts :sad:

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: Watch out for new posts
« Reply #7 on: March 07, 2021, 07:19:01 PM »
it isn't asm
include \masm32\MasmBasic\Res\MbGui.asm
And it seem that the show case is deicated to masm
Quote
A gallery of finished applications by experienced members. Do not fill this full of junk or experiments, it is for finished applications. targets can be either 32 or 64 bit assembler applications. Non assembler application will be moved elsewhere.
Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 11552
  • Assembler is fun ;-)
    • MasmBasic
Re: Watch out for new posts
« Reply #8 on: March 07, 2021, 08:04:31 PM »
it isn't asm

Nonsense, as long as it gets assembled by Masm, UAsm or AsmC, it clearly is "asm".

What about your "SDK", Yves? Is it some dialect of C? Is it French?

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: Watch out for new posts
« Reply #9 on: March 07, 2021, 08:18:43 PM »

All languages are finally in assembly.
masmBasic stay a Basic not masm,He is different.
As allways ,You don't seem to know what is Politeness.
Fa is a musical note to play with CL

TimoVJL

  • Member
  • ****
  • Posts: 726
Re: Watch out for new posts
« Reply #10 on: March 07, 2021, 08:33:06 PM »
All languages are finally in assembly.
Actually no, but gcc still use it.
https://en.wikipedia.org/wiki/Assembly_language
May the source be with you

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8498
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Watch out for new posts
« Reply #11 on: March 07, 2021, 09:41:45 PM »
Can we keep this squabbling out of here.  This sub forum is to showcase finished assembler code and if the source is not assembler source, it should not be here. We have folks here who write C an in JJs case his own dialect of basic but neither are for this subforum which is specifically for assembler code.

I don't want to have to move posts but this sub forum is exclusively for assembler code.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 11552
  • Assembler is fun ;-)
    • MasmBasic
Re: Watch out for new posts
« Reply #12 on: March 07, 2021, 11:06:26 PM »
Can we keep this squabbling out of here.  This sub forum is to showcase finished assembler code and if the source is not assembler source, it should not be here. We have folks here who write C an in JJs case his own dialect of basic but neither are for this subforum which is specifically for assembler code.

I don't want to have to move posts but this sub forum is exclusively for assembler code.

MasmBasic is assembler code, 100%. If, however, you want to restrict "assembler code" to the Masm32 and Masm64 SDKs, then you would have to exclude anybody who has developed own includes. For example, Yves' recent 'security' example:

Ups....
Code: [Select]
Tmp_File.asm(2) : Error A2106: Cannot open file: "sdk32.inc" [ENOENT]
Tmp_File.asm(3) : Error A2106: Cannot open file: "stdio.sdk" [ENOENT]
Tmp_File.asm(4) : Error A2106: Cannot open file: "conio.sdk" [ENOENT]
Tmp_File.asm(6) : Error A2106: Cannot open file: "accCtrl.sdk" [ENOENT]
Tmp_File.asm(7) : Error A2106: Cannot open file: "aclapi.sdk" [ENOENT]
Tmp_File.asm(43) : Error A2082: Must be in segment block

Or Yves' tiger example (see macro.inc, REEL etc)
Or Yves' Glu example (is REEL "asm"?)
Or fearless' TrayInfo demo (RadAsm, plus his own includes - excellent btw)

Where does your crusade against impure assembler code end...? Once upon a time, you were proud to present evidence that Assembly can do more than just hello world console proggies :cool:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8498
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Watch out for new posts
« Reply #13 on: March 08, 2021, 01:41:12 AM »
> Where does your crusade against impure assembler code end...?

It never started but this forum has seen, FASM, GAS UASM JWASM, Bogdan's version and a host of others but they are all direct assemblers. The thin edge of the wedge is different dialects that use an assembler as their back end, GNU C with GAS as its back end just as an example. What about other dialects of basic that use an assembler as their back end ?

I set up this Showcase sub forum for assembler code, should we be supporting C and basic compilers as well ?
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: