- Code: Select all Expand view
- function Main()
local n
? __DYNSCOUNT(), "symbols"
for n = __DYNSCOUNT() to 1 step -1
? __DYNSCOUNT() - n + 1, __DYNSGETNAME( n )
next
? "<" + "script>$('#result').css('overflow', 'auto');<" + "/script>"
return nil
function Main()
local n
? __DYNSCOUNT(), "symbols"
for n = __DYNSCOUNT() to 1 step -1
? __DYNSCOUNT() - n + 1, __DYNSGETNAME( n )
next
? "<" + "script>$('#result').css('overflow', 'auto');<" + "/script>"
return nil
#xcommand DO <prg> => _Do( <prg> )
function Main()
DO "info.prg"
return nil
function _Do( cFileName )
cFileName = hb_GetEnv( "PRGPATH" ) + "/../" + cFileName
return AP_RPuts( If( File( cFileName ), Execute( MemoRead( cFileName ) ),;
"File not found " + cFileName ) )
#xcommand DO <prg> => _Do( <prg> )
#xcommand CLEAR => ClearResult()
function Main()
CLEAR
// DO "info.prg"
return nil
function _Do( cFileName )
cFileName = hb_GetEnv( "PRGPATH" ) + "/../" + cFileName
return AP_RPuts( If( File( cFileName ), Execute( MemoRead( cFileName ) ),;
"File not found " + cFileName ) )
function ClearResult()
return "<" + "script>$('#result').html( '' );<" + "/script>"
function Main()
Popup( "Hello world", "Using Popups" )
return nil
function Popup( cMsg, cTitle )
DEFAULT cTitle TO "Popups"
return AP_RPuts( "<" + "script>MsgMemo( '" + cMsg + "','" + cTitle + "');<" + "/script>" )
function Main()
MsgInfo( "Hello world", "move me with the mouse" )
return nil
function MsgInfo( cMsg, cTitle )
DEFAULT cTitle TO "Popups"
return AP_RPuts( "<" + "script>MsgInfo( '" + cMsg + "','" + cTitle + "');<" + "/script>" )
function Main()
Alert( "ok" )
return nil
function Alert( cMsg )
return AP_RPuts( "<" + "script>alert( '" + cMsg + "' );<" + "/script>" )
function Main()
Popup( _Do( "info.prg" ), "info.prg" )
return nil
function Popup( cMsg, cTitle )
return AP_RPuts( "<" + "script>RunCode( '" + cMsg + "');MsgMemo('','" + ;
cTitle + "', true );<" + "/script>" )
function _Do( cFileName )
cFileName = hb_GetEnv( "PRGPATH" ) + "/../" + cFileName
return If( File( cFileName ), HB_BASE64ENCODE( MemoRead( cFileName ) ),;
"File not found " + cFileName )
function Main()
local cCode
USE ( hb_GetEnv( "PRGPATH" ) + "/snippets" ) SHARED NEW
? "<" + "script>$( '#result' ).css( 'overflow', 'auto' );<" + "/script>"
while ! Eof()
? "<" + "font color='red'>id: " + Field->Id + "<" + "/font>"
?
cCode = Field->Code
cCode = StrTran( cCode, CRLF, "<" + "br>" )
cCode = StrTran( cCode, " ", "&" + "nbsp;" )
cCode = StrTran( cCode, "<" + "d", "<" + " " + "d" )
? cCode
? "<" + "hr>"
SKIP
end
USE
return nil
function Main()
MsgGet( "number: ", "Goto line" )
return nil
function MsgGet( cLabel, cTitle )
return AP_RPuts( "<" + "script>MsgGet('" + cLabel + "','" + cTitle + "')<" + "/script>" )
Users browsing this forum: No registered users and 4 guests