Theouterside Posted September 19, 2020 Share Posted September 19, 2020 Can't seem to figure out what I'm doing wrong. The $arr would have in it ... Genre: Hip hop; G-funk Released: December 24, 1994 Producer(s): Sean Combs; Chucky Thompson ... Recorded: June 1994 I'm doing the loop because sometimes Genre and Released depending on where info comes from. $1 = ClipGet() $arr = StringSplit($1, @CRLF, 1) For $i = 0 To $arr[0] If StringInStr($arr[$i], "Released", 2, 1) Then1st MsgBox(1, "", $arr[$i]) $getYear = StringRight($arr[$1], 4)2nd MsgBox(1, "", $getYear) ExitLoop EndIf Next In 1st MsgBox I get ... Released: December 24, 1994 In 2nd MsgBox I get ... 4 I even tried StringTrimRight and I still get ... 4. Link to comment Share on other sites More sharing options...
TheXman Posted September 19, 2020 Share Posted September 19, 2020 $getYear = StringRight($arr[$1], 4) Shouldn't this be: $getYear = StringRight($arr[$i], 4) Theouterside 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Theouterside Posted September 19, 2020 Author Share Posted September 19, 2020 LMAO, so sorry. I posted this and read through it ... $getYear = StringRight($arr[$1], 4) $arr[$1] not 1 should be i Problem solved. Took me 3hrs to see that. Link to comment Share on other sites More sharing options...
Theouterside Posted September 19, 2020 Author Share Posted September 19, 2020 Yes TheXman Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now