Jump to content
Sign in to follow this  

How do i write string characters to an array

Recommended Posts

This is probably another BASIC question but i dont have a real great understanding of arrays. I have an OCR script that returns strings to me representing certain times of the day. The problem is i cant get my ocr to read the ":" character correctly. Everything other character comes back fine. So what i'd like to do is take the string and convert each character to an index number of an array. For instance:

$string= 1022AM







i wanna do this so i can properly recreate the string to display in the correct format (10:22 AM). How do i go about doing this?

Share this post

Link to post
Share on other sites


have a look at StringSplit()

So long,


Edit: Mod bonus, so you are first ;)

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post

Link to post
Share on other sites

Could you use @HOUR and @ MIN instead, thereby eliminating your problem altogether?

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post

Link to post
Share on other sites

didnt dawn on me that i could use "" as a delimiter.. pays to read the help file i guess. Thanks guys

and no i cant use macros because i'm not reading the current time persay, just used that as a simple example.

Share this post

Link to post
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
Sign in to follow this  

  • Create New...