Jump to content

Disable Consolewrite after compiling to speed up my .exe (making a OCR)


Recommended Posts

what would be a easy way to disable Consolewrite after compiling to speed up my .exe?

 

I have been making a program to read some text in pictures on display, and it is going pretty decent but it is slowish and I need to speed things up. for example i need to try to get it down to under 2 seconds a page, (i have to do it real time )

but now i do about 5-6 seconds about a page and then a friend told me that actually console write actually is still doing his thing when compiled but then it is not needed for me anymore.

does anyone has any tips for me?

 

Regards A depressed and rusty wannabe programmer who was unable to do anything for  14 months

Link to comment
Share on other sites

I would do a search and replace, put a semicolon in front of the replacement text, and the it will not have any affect while compiled just a comment in your codeas even though it may not write, it may still execute? 

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

Could just wrap the function ...

Global $Debug = False

Func _ConsoleWrite($string)
    If Not $Debug Then Return
    ConsoleWrite($string & @LF)
EndFunc

You might still grt overhead of the call but it's negligable compared to the ConsoleWrite

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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...