Jump to content

splitting it up


Go to solution Solved by shaggy89,

Recommended Posts

Hi all,

        I need some help working out how to split some code.

The website shows how many staff are avalible for day shift and night shft seperated by a /

so what im trying to work out is how to only show the first number

This is what i have so far

for example i have 3 for day and 4 for night

$oSpan = _IETagNameGetCollection($oIE, "span", 3)
$msg = $oSpan.innerText
$ms = StringTrimRight ( $msg, 2)
;local $msg = _StringBetween($sText, ";", "/")
MsgBox(64, "Results", $ms)

reslut comes up as 3/ in msg box

so how can i remove the /

in the end im hoping to get an auto email if day number is lower than 5

any ideas?

cheers Shane

Link to comment
Share on other sites

  • Solution

problem solved

$oSpan = _IETagNameGetCollection($oIE, "span", 3)
$msg = $oSpan.innerText
$ms = StringTrimRight ( $msg, 3)
;local $msg = _StringBetween($sText, ";", "/")
MsgBox(64, "Results", $ms)

had to change $ms = StringTrimRight ( $msg, 2) to $ms = StringTrimRight ( $msg, 3)

simple just needed a cup of coffee

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...