HMG Forum "Codebox" Reader

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

did "translate" via Google still work :?:
i got oHttp:Status Error 429 ... what does it mean

but i can download Message from Forum so i guess it is not a "MSXML2.ServerXMLHTTP" Problem, or :idea:
have fun
Jimmy
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG Forum "Codebox" Reader

Post by serge_girard »

Jimmy,

Google: The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting")
Put some

Code: Select all

   hb_idleSleep( 1.0 )
in your code!

Serge
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi Serge,

YES, you are right
i made too much Request to Google Translate which are "limited" when not pay for API Key
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

as i have no more Idea / Problem so i release latest Source and EXE (32 Bit)
// 28.09.2022 v0.4.5 IsInternet() on other Place
// 03.10.2022 v0.4.6 ReleaseAllWindows()
// 04.10.2022 v0.4.7 lTranslate
//
// 06.10.2022 v0.4.8 RELEASE Source and EXE
since using ReleaseAllWindows() App will not "hang" in Taskmanager any more

Google Translate are "limited" and will give Error 429 when request too much
when lTranslate = .F. it will show no Translation until re-start App

! Note : you need to reset Router to get a new IP to "fake" Google

i have include *.RC as Sample but NO Image or Icon (possible Copyright Problem)
FORUMHMG_74.zip
EXE 32 Bit
(1.83 MiB) Downloaded 383 times
FORUM_SOURCE_74.ZIP
HMG Source
(47.88 KiB) Downloaded 338 times
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

BUG :
Info2 for (File) Attachment are not shown when IMAGE was before

DLFORUM.PRG line 732

Code: Select all

731	REPLACE FORUM->INFO1 WITH "Have Image"
732     // LOOP
FORUMHMG.PRG line 1734

Code: Select all

1733	REPLACE FORUM->INFO1 WITH "Have Image"
1734	// LOOP
please change lines with LOOP and run "clean all from HTML"

---

next Version : download (all) Attachment from Forum
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

v0.5.3.81

New:
// 07.10.2022 v0.4.9 GetAllAttachment() download form Forum
// !isdir() -> add \DOWNLOAD Folder
// 08.10.2022 v0.5.0 GetAttachment() : click on LABEL Info2
// 09.10.2022 v0.5.1 Attachment Download Time left, Progressbar
// 10.10.2022 v0.5.2 CHECKBOX : Override Attachment
// 11.10.2022 v0.5.3 RELEASE EXE : download Attachment
FORUMHMG_81.zip
(1.83 MiB) Downloaded 362 times
new Version to download (File) Attachment from Forum

in Menu you will find new MenuItem "Download Attachment" ( look at CHECKBOX "Override Attachment")
when LABEL Info2 is "green" you can click on it
GetAllAttachment.png
GetAllAttachment.png (100.41 KiB) Viewed 19447 times
HMG Forum have about 2673 Files and need 1.700 MB (!) and take about 35 min to download all Attachment
when click on "green" LABEL you will get Attachment only from "this" Message

! note : if possible it will download "fresh" Version
there are many Files call TEST.ZIP ... but only "latest" Version is "valid"

---

when got a Error while Download Attachment you will get Error Log Window.
now do NOT press "re-read" Button as it does NOT download Attachment

click on Item in Listbox -> will navigate to Message
now click on "green" Info2 Label to download Attachment

than use next Item on Listbox

---

to "open" Attachment i use

Code: Select all

   SHELLOPENFILE(cFile)
it will open ZIP with Explorer but for RAR or 7z File Windows will ask for App to open (if not installed)

HMG, Xbase++ and Express++ have Attachment but FiveWin does not allow Attachment

p.s. only File Attachment with this Extension

Code: Select all

IF ".zip" $ LOWER( cFile ) .OR. ;
   ".rar" $ LOWER( cFile ) .OR. ;
   ".7z"  $ LOWER( cFile ) .OR. ;
   ".prg" $ LOWER( cFile )
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

not a BUG ... just missunderstood

Code: Select all

STATIC PROCEDURE FindReplRTFProc( cFind )
LOCAL lMatchCase      := .T.
should be

Code: Select all

LOCAL lMatchCase      := .F.
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

here Modul to download Attachment
DLATTACH.ZIP
(3.27 KiB) Downloaded 352 times
---

add in Menu

Code: Select all

   MENUITEM "Download &Attachment" IMAGE "MYATTACHMENT" ACTION GetAllAttachment()U
add to

Code: Select all

   DEFINE LABEL Label_2INFO
      ---
      ACTION GetThisAttachment()

Code: Select all

STATIC PROCEDURE GetThisAttachment()
LOCAL cAttach := FORUM.Text_2INFO.Value

   IF !EMPTY( cAttach )
      ORDSETFOCUS( "DUPECHECK" )

      ResetFiles()
      GetAttachment()
      DoGetFiles( .T. )

      ORDSETFOCUS( "MSGDATE" )
   ENDIF
RETURN
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

BUG :
Msg. No for LINK

when press LINK Button i want to go to Original Message but it is wrong Msg. No :o
a "New" Thread begin with 0 (zero) not with Msg. No. 1

---

in POPUP Menu we have : "clean all from HTML" which also "re-number" Message
other are in "Download" which i have to look for a Solution, sorry
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: HMG Forum "Codebox" Reader

Post by AUGE_OHR »

hi,

next BUG

when use FILTER and have "Result-Box" on right Side and call AGAIN to set new FILTER it will not show new Result :o

you have to close "Result-Box" before set new FILTER which will open new "Result-Box"

change Code

Code: Select all

PROCEDURE DoSetFilterTo( nOrder )
LOCAL cTitle, nPosi

   SELECT 1
   IF !USED()
      MsgInfo( "need DBF" )
      RETURN
   ENDIF

   IF isWindowDefined( "DoShowFilterWin" )
      Domethod("DoShowFilterWin","Release")
   ENDIF
---

about nMsgNo

look into FORUMHMG.PRG and DLFORUM.PRG that nMsgNo start with 0
change in FORUMHMG.PRG

Code: Select all

DEFINE BUTTON Button_Link
   ...
   ACTION DoShellLink()

Code: Select all

STATIC PROCEDURE DoShellLink()
LOCAL lRet
   IF FORUM->NOOFMSG = 0
      lRet := SHELLOPENFILE( TRIM( FORUM->LINK )  )
   ELSE
      lRet := SHELLOPENFILE( TRIM( FORUM->LINK ) + "&start=" + LTRIM( STR( FORUM->NOOFMSG ) ) )
   ENDIF

   IF lRet = .F.
      MsgInfo( "fail to open link " + TRIM( FORUM->LINK ) )
   ENDIF
RETURN
have fun
Jimmy
Post Reply