function OSendMulti( cStr, uVal )
local aMsg := HB_ATokens( cStr, ":" )
local o := aMsg[ 1 ]
local n := Len( aMsg ) - If( uVal == nil, 1, 2 )
AEval( aMsg, { |c| o := OSend( o, c ) }, 2, n )
if uVal != nil
OSend( o, ATail( aMsg ), uVal )
endif
return o
OSendMulti( "IE:document:forms:tsf:lst-ib:Value", cPARTS )
function OSendMulti( o, cMsg, uVal )
local aMsg := HB_ATokens( cMsg, ":" )
local n := Len( aMsg ) - If( uVal == nil, 0, 1 )
AEval( aMsg, { |c| o := OSend( o, c ) }, 1, n )
if uVal != nil
OSend( o, ATail( aMsg ), uVal )
endif
return o
OSendMulti( IE, "document:forms:tsf:lst-ib:Value", cPARTS )
cSFD := "document:forms:item(0):search"
OSendMulti( IE, cSFD+":Value", cPARTS ) // in func_lib.prg
Rao
Ran into another problem .. it seems when there is a function parameter within the DOM string :item(0) I get an error
function OSendMulti
local n
PARAMETERS o, cMsg, uVal
if PCount() > 2
if ( n := RAt( ":", cMsg ) ) > 0
o := &( "o:" + Left( cMsg, n - 1 ) )
cMsg := SubStr( cMsg, n + 1 )
endif
o := OSend( o, cMsg, uVal )
else
o := &( "o:" + cMsg )
endif
return o
cSFD := "document:forms:tsf:lst-ib"
OSendMulti( IE, cSFD+":Value", cPARTS ) // in func_lib.prg
*IE:document:forms:item(0):search:Value = cPARTS
*cSFD := "document:forms:tsf:lst-ib"
*IE:document:forms:tsf:lst-ib:Value := cPARTS
*IE:document:forms:item(0):search:Value := cPARTS
*cSFD := "document:forms:item(0):search"
*OSendMulti( IE, cSFD+":Value", cPARTS ) // in func_lib.prg
try
* bSFD := &( [ { | IE | IE:]+cSFD+[:Value := "]+cPARTS+[" } ] )
OSendMulti( IE, cSFD+":Value", cPARTS ) // in func_lib.prg
catch
try
OSendMulti1( IE, cSFD+":Value", cPARTS ) // in func_lib.prg
catch
cSAY := "Inserting part number "+cPARTS+" FAILED"
oSay:ReFresh()
SysReFresh()
aLINE := { cURL,cPARTS,cSAY," ", " ", " " }
AAdd( aResults, aLine )
oLbx2:Refresh()
oLbx2:GoBottom()
SysReFresh()
try
IE:Quit()
catch
end try
IF cTESTING = "TEST"
oBtn1:Enable()
oBtn2:Enable()
ENDIF
SysReFresh()
RETURN(.F.)
end try
end try
*eval( bSFD, IE )
cSAY := "Inserting part number "+cPARTS+" DONE"
oSay:ReFresh()
SysReFresh()
SysWait(1)
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
OSend( o, ATail( aMsg ), uVal )
endif
return o
function OSendEx( o, c )
local p, nAt
if ( nAt := At( '(', c ) ) > 0
p := SubStr( c, nAt + 1 )
c := Left( c, nAt - 1 )
p := &( Left( p, At( ')', p ) - 1 ) )
o := OSend( o, c, p )
else
o := OSend( o, c )
endif
return o
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
OSend( o, ATail( aMsg ), uVal )
endif
return o
function OSendEx( o, c )
local p, nAt
if ( nAt := At( '(', c ) ) > 0
p := SubStr( c, nAt + 1 )
c := Left( c, nAt - 1 )
p := Left( p, At( ')', p ) - 1 )
endif
o := If( Empty( p ), OSend( o, c ), OSend( o, c, &p ) )
return o
cSFD := "document:forms:tsf:lst-ib"
OSendMulti( IE, cSFD+":Value", cPARTS ) // in func_lib.prg
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 64 guests