Jump to content
twenty_sleven

Getting data from a text box...

Recommended Posts

Ya, to be honest. Wanted or freddy needs to respond to this because I have not had to, nor know how to create a Text database. A Tutorial of any sort would be needed by either of them. Sorry bud but until I am able to understand how to do the text database I cannot help you and I doubt you will beable to get it working unless they respond to this to help.

 

No worries, they are pretty good on responding within 12 hours :)

Link to comment
Share on other sites

freddy, that was a poor way of explaining how to make your own text and work with it lol.

Go ahead and do a better job. All of the documentation required is in the (old) manual. If he's stuck he can ask follow-up questions. The best way of learning things is by figuring them out yourself.

Link to comment
Share on other sites

Okay awesome, I think I got the start of this down... I understand disabling font smoothing and Scar's LoadCharsFromFontSet2 function... I only have 2 questions.

 

First, where are the OCR functions for SCAR?

Second, if the email page has multiple types of (for example) Times New Roman and the email's content is the same size and font type, how would I differentiate?

 

Thanks!

Link to comment
Share on other sites

You need to load each font you want to read separately, you have to know in advance which you'll have to use and where. Each time you call LoadCharsFromFontSet2, it returns an Integer, this value is an identifier for the font, similar to how bitmaps are represented by an Integer. You use this value as the "Chars" parameter for "GetTextAtEx". The coordinates to get the text at can be a bit tricky, they're basically the top left point of the rectangle that contains the first character. This point will be the same for every character that is placed first in the box, but it may take some searching to find it.

Link to comment
Share on other sites

Okay, getting steady progress on it... (but I still need help!)

 

 

ClickMouse(35,175,true);
Wait(2000);
//Clicks into notepad document with a small string typed up in it..

ClickMouse(453,83,true);
Wait(2000);
//Clicks onto the notepad document...

WriteLn(LoadCharsFromFont2('Lucida Console',10,false,false,false,false));
WriteLn(LoadCharsFromFont2('Lucida Console',10,false,false,false,false));
//Returns 0 then 1..? 

WriteLn(LoadCharsFromFont2(sTextBox,10,false,false,false,false));
//Returns LoadChars failed - folder "" does not exist
// followed by a 2

//GetTextAtEx(x:LongInt, y: LongInt, Tolerance: LongInt, Chars: LongInt, CheckShadow: False, CheckOutline : False, Minspacing: Long, MaxSpacing: Long, TextColor: Long, TextLength: Long, Strict: Bool,Range:Byte);
//So I know the parameters.. 

WriteLn(GetTextAtEx(66,43,100,0,false,false,1,10,0,50,false,255));

//Returns...                      @@@@@@@@@@@@@@@@@@@@@@@@@@@@
Wait(1500);
ClickMouse(30,135,true);

 

Few things, I tried Lucidia Console because I knew that is the default font for notepad. Tried using an empty string value & the font just to experiment. Also not sure what typical values for min & max spacing are, as well as what "Strict" means and what a typical range should be.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...