sonicxtacy02 Posted November 21, 2006 Posted November 21, 2006 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 $tarray[1]=1 $tarray[2]=0 $tarray[3]=2 $tarray[4]=2 $tarray[5]=A $tarray[6]=M 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?
Developers Jos Posted November 21, 2006 Developers Posted November 21, 2006 Look at StringSplit() in the Helpfile SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Xenobiologist Posted November 21, 2006 Posted November 21, 2006 (edited) Hi, have a look at StringSplit() So long, Mega Edit: Mod bonus, so you are first Edited November 21, 2006 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
mikehunt114 Posted November 21, 2006 Posted November 21, 2006 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]
sonicxtacy02 Posted November 21, 2006 Author Posted November 21, 2006 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.
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