RUN test

RUN test

Postby Antonio Linares » 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: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RUN test

Postby Antonio Linares » 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: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RUN test

Postby sygecom » 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.
User avatar
sygecom
 
Posts: 55
Joined: Tue Mar 11, 2008 3:18 am
Location: Brasil

Re: RUN test

Postby Antonio Linares » Mon Nov 25, 2024 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RUN test

Postby sygecom » Mon Nov 25, 2024 7: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: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd TITLE "Using FWH"

   ACTIVATE WINDOW oWnd CENTERED

return nil
User avatar
sygecom
 
Posts: 55
Joined: Tue Mar 11, 2008 3:18 am
Location: Brasil

Re: RUN test

Postby Antonio Linares » Tue Nov 26, 2024 9:01 am

fwrun.prg
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RUN test

Postby sygecom » 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.
User avatar
sygecom
 
Posts: 55
Joined: Tue Mar 11, 2008 3:18 am
Location: Brasil


Return to Utilities / Utilidades

Who is online

Users browsing this forum: No registered users and 4 guests