- Code: Select all Expand view
- function OSendMulti( o, cMsg, uVal )
local aMsg := HB_ATokens( cMsg, ":" )
local n := Len( aMsg ) - If( uVal == nil, 0, 1 )
local p
AEval( aMsg, { |c| o := OSendEx( o, c ) }, 1, n )
if uVal != nil
o := OSend( o, "_" + ATail( aMsg ), uVal )
endif
return o
function OSendEx( o, c )
c := StrTran( StrTran( c, '[', '(' ), ']', ')' )
if '(' $ c
c := '"' + StrTran( StrTran( c, '(', '",' ), ')', '' )
o := HB_ExecFromArray( "OSend", { o, &c } )
else
o := OSend( o, c )
endif
return o
This code works with multiple parameters like "oSheet:Cells( 99, 9 ):Value" also. I think it should work with embedded "-" also, though I could not test that case here. Please test and let me know.
Tested on latest Harbour and xHarbour