FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Utilities / Utilidades RUN test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
RUN test
Posted: Mon Nov 25, 2024 10:26 AM
We are implementing a new feature for these forums to allow to run the posted code.

You will notice that "RUN" appears now over the code. Just click on it. This is a work in progress. It is not completed yet. Many thanks for your feedback!
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

聽 聽local oWnd

聽 聽DEFINE WINDOW oWnd TITLE "Using FWH"

聽 聽ACTIVATE WINDOW oWnd CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RUN test
Posted: Mon Nov 25, 2024 10:29 AM
Estamos implementando una nueva funcionalidad en estos foros para permitir ejecutar c贸digo publicado en los mensajes.

Observareis que ahora "RUN" aparece sobre el c贸digo. Haced click en 茅l. Esto es un trabajo en progreso. A煤n no est谩 completado. Muchas gracias por vuestro feedback!
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

聽 聽local oWnd

聽 聽DEFINE WINDOW oWnd TITLE "Using FWH"

聽 聽ACTIVATE WINDOW oWnd CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 58
Joined: Tue Mar 11, 2008 03:18 AM
Re: RUN test
Posted: Mon Nov 25, 2024 12:35 PM

Very good teacher, congratulations.

At the moment when I click using EDGE it just goes back to the top of the screen.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RUN test
Posted: Mon Nov 25, 2024 03:48 PM

> At the moment when I click using EDGE it just goes back to the top of the screen.

Please press Ctrl + F5 to reload the forums used javascript

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 58
Joined: Tue Mar 11, 2008 03:18 AM
Re: RUN test
Posted: Mon Nov 25, 2024 07:02 PM
I did the master test, here is the print sequence.

It almost worked, it tried to download a FWRUN.EXE but it didn't download, saying that the link didn't exist and, it downloaded a CODE.PRG with a problem, as shown below:
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

脗聽 脗聽local oWnd

脗聽 脗聽DEFINE WINDOW oWnd TITLE "Using FWH"

脗聽 脗聽ACTIVATE WINDOW oWnd CENTERED

return nil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RUN test
Posted: Tue Nov 26, 2024 09:01 AM
fwrun.prg
Code (fw): Select all Collapse
#include "FiveWin.ch"

extern ADir
extern AtNum
extern ChooseGradient
extern DbClearRelation
extern DBFCDX
extern DbOrderInfo
extern Browse
extern Decrypt
extern Descend
extern DirectoryRecurse
extern DrawGrid
extern HB_IniRead
extern HB_HrbRun
extern HB_Lang_DE
extern HB_Lang_EN
extern HB_Lang_ES
extern HB_Lang_IT
extern HB_SetCodePage
extern HB_ThreadQuitRequest
extern HB_TokenGet
extern FReopen_StdErr
extern FWCheckExpression
extern FW_EReport
extern IsExeRunning
extern lMkDir
extern Maria_Connect
extern MsgDate
extern MyFunc_DBlue
extern MyFunc_F
extern MyFunc_FBlue
extern NRandom
extern OrdDestroy
extern RegOpenKey
extern RddInfo
extern RddSetDefault
extern SetHelpFile
extern Toast
extern WNetConnect
extern WNetDisconnectDialog
extern WNetGetUser
extern __DbApp
extern __DbPack
extern __DbZap
extern __MVClear
extern TDataBase
extern TFolder
extern TFolderEx
extern TMru
extern TPages
extern TProgress
extern TSlider
extern TSplitter
extern TWBrowse
extern TWebView
extern TWindow

function __Run()

聽 聽 local cFileName := hb_argv( 1 ), aFiles, cCode

聽 聽 if Empty( cFileName )
聽 聽 聽 aFiles = Directory( "c:\users\" + GetEnv( "USERNAME" ) + "\Downloads\code*.prg" )
聽 聽 聽 aFiles = ASort( aFiles,,, { | aFile1, aFile2 | DToC( aFile1[ 3 ] ) + aFile1[ 4 ] > DToC( aFile2[ 3 ] ) + aFile2[ 4 ] } )
聽 聽 聽 cFileName = "c:\users\" + GetEnv( "USERNAME" ) + "\Downloads\" + aFiles[ 1 ][ 1 ]
聽 聽 endif 聽 

聽 聽 if ! Empty( cFileName ) .and. File( cFileName )
聽 聽 聽 聽cCode = hb_memoRead( cFileName )
聽 聽 聽 聽cCode = StrTran( cCode, Chr( 0xC2 ) + Chr( 0xA0 ), " " )
聽 聽 聽 聽Execute( cCode )
聽 聽 else 
聽 聽 聽 聽MsgInfo( "Syntax: fwrun.exe file.prg" + CRLF + CRLF + "FWH header files must be at c:\FWH\include" + CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 "Harbour header files must be at c:\harbour\include" ) 聽 聽
聽 聽 endif 聽 聽

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 58
Joined: Tue Mar 11, 2008 03:18 AM
Re: RUN test
Posted: Tue Nov 26, 2024 11:46 AM

Funcion贸 aqu铆, era EDGE el que lo estaba bloqueando por no ser seguro, pero lo descargu茅 y funcion贸, felicidades.

Continue the discussion