$OCR_Result = _TesseractScreenCapture(0,"",1,2,220,660,500,730,1)
$OCR_Result1 = _TesseractScreenCapture(0,"",1,2,220,660,500,730,1)
$OCR_Result2 = _TesseractScreenCapture(0,"",1,2,220,660,500,730,1)
$OCR_Result3 = _TesseractScreenCapture(0,"",1,2,220,660,500,730,1)
$sound = _SoundStatus("C:\ExpertAdvisorBuyAlert.wav")
while _nowtime < 3.30 pm
If $sound = True Then
if $OCR_Result1 > $OCR_Result2
Trying to ocr some values on chart in real time(once per minute) and buy/sell securities on basis of alert generated in my software.
I am struck onto few steps.
1. On Tesseract Screen Capture indentation parameters. How can we determine the exact parameters if I just want numeric values only.
2. The Tesseract Screen Capture generates and error Obj1 on line 185 which needs to be resolved.
3. Sometimes lines get overlapped with values. What to do in that case.
3. Detecting the sound as and when it approaches and then comparing the ocr values to decide on either buy or sell.
The values that needs to be fetched are encircled.
I was looking around the help file and I came across _GDIPlus_GraphicsDrawRect and _WinAPI_DrawLine and I seem to be having the same "problem" where every time it draws into a window and you lose or gain focus it has to redraw itself. Is there anyway around this?
#include <WindowsConstants.au3> #include <WinAPI.au3> #Include <GDIPlus.au3> _GDIPlus_Startup() Run("notepad.exe") $hWnd = WinWait("Untitled") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd) $Color = 0xFFFF0000 $hPen = _GDIPlus_PenCreate($Color, 2) For $i = 1 To 10 _GDIPlus_GraphicsDrawRect($hGraphic, 200, 200, 25 ,25, $hPen) ToolTip($i) Sleep(1000) Next _WinAPI_RedrawWindow($hWnd, 0, 0, $RDW_INVALIDATE + $RDW_ALLCHILDREN) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_PenDispose($hPen) _GDIPlus_Shutdown()
try it for make flyers old games xml + Gdi, i belive many sources had lost
I have a situation where I am repeatedly capturing a region of the screen and feeding it into Tesseract OCR. Since the OCR is a relatively slow operation, I would like to create an in memory cache of the ocr results. An ideal hash key for this cache would be a checksum of the captured image. With this I could capture the region, checksum it, and then only if I don't get a cache hit I would write the image out to disk for external OCR.
Now I know I can do this by saving the captured image out to disk, and then summing the disk file with _Crypt_HashFile(). But that's still slower than I would like, and it shouldn't be necessary. Ideally, it should be possible to checksum the image data directly in memory so I don't have to go to disk at all. In order to do that, I need a way to dump a representation of the image into a string (or some equivalent). Then I could use the _Crypt_HashData() function against that string to create my cache hash key.
Googling around I found an article here that shows a way to convert an image object to a byte array using System.Drawing. This was the closest thing I found to what I'm trying to do. I don't know if that method could be used from within AutoIT, or if perhaps there may be a better way I don't know about. If someone could give me a shove in the right direction it would be a big help. Thanks!
AutoIt Windows Screenshooter
takes easily a screenshot from any visible window capture any region of the desktop incl. freehand capturing capture GUI controls and GUI menus separately capture a marked area every x seconds for a duration of y seconds create a GIF animation from saved frames (Vista or higher os required) capture to AVI file (without audio!) takes a screenshot from web sites (available only on Win7+ os and when Aero is enabled) put images to clipboard to paste to other applications easily color picker save image in different formats and also to PDF! add timestamp to saved images simple image editing options: greyscale, b&w, invert, rotate +-90° send image to printer and default email client preview of captured screens incl. zoom option multi monitor support display pixel color under mouse ruler basic image editor (paint, highlight, ellipse, rectangle, text and some graphic FX) watermark captured image no 3rd party tools or DLLs used - pure AutoIt! fully portable - no installation is needed multi language feature (Eng, Ger, Tur, Fra and Rus only) To do:
capture content of scrollable window/control capture cascaded menus Due to DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) limitation some windows cannot be captured properly (GDI+, ProgDVB, etc.) but can take screenshots of hidden windows. One workaround is to use full screen capturing (F11/F12) or "Grab Screen" function! Or try double click with rmb on listview items (beta).
Download source code (6295 downloads previously): AutoIt Windows Screenshooter v1.81 Build 2018-08-12.7z (version 126.96.36.199+ needed!)
You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name!
Download compiled Exe only: 4shared / Media Fire / Softpedia (1.54mb)
Distributing copies of the program in compiled format (exe) must be free of any fee!
-----> click here to Donate!
(Current donators: 1. Cuong N.)
It is designed for Win7+ operating systems with AERO enabled! E.g. on WinXP machines some functions are not working properly and might crash the application!
AV scanners may have a negative impact the execution of compiled exe and might report any malware. I guarantee that there is no malicious code in the source code / exe!!!
Basic Image Editor:
Click link for an enhanced version of Watermark Image.
main code by UEZ additional code (alphabetical order) by Authenticity, AutoItObject Team, Eemuli, Eukalyptus, funkey, _Kurt, martin, monoceres, ProgAndy, taietel, trancexx, Ward, wolf9228 and Yashied! mesale0077 for turkish translation wakillon for french translation AZJIO for russian translation Keys:
User your mouse to scroll preview window or
Numpad 8: Scroll preview window up
Numpad 2: Scroll preview window down
Numpad 4: Scroll preview window left
Numpad 6: Scroll preview window right
Numpad +: zoom in preview window or mousewheel down
Numpad -: zoom out preview window or mousewheel up
F1: capture again on last position
F5: refresh Windows Name list
PRINTSCREEN: take screenshot from whole screen
ALT+PRINTSCR: take a screenshot from active window
F10: Undo made changes with Image Editing function
F11: take screenshot from whole screen incl mouse cursor
F12: take screenshot from whole screen
Ctrl+Alt+F9 start "Grab Screen" mode
Ctrl+Alt+F12: take a screenshot from active window using alternative screenshot functionality (beta)!
Ctrl+r: call ruler
Ctrl+s: save current displayed image
Ctrl+x: exit program
ctrl+w: call web grab input field (availabe only when Aero is enabled)
Ctrl+i: call image editor
Ctrl+m: call watermark editor
Only available on Vista+ os: double click with rmb on list items to use alternative screenshot functionality (beta)!
When 'Grab Screen' is clicked you can hold down the ctrl key to switch to 'grab controls' mode. Control under mouse will be framed red.
ctrl + shift will take the screenshot of appropriate control. To capture GUI menues you can press rmb which simulates the lmb. When a menu is opened press shift additionaly to capture it.
Press and hold only the shift key to capture any region on the desktop using freehand capturing - release it so capture marked regions!
Or just mark resizeable area which you want to grab. Press CTRL key to grab marked area or right mouse button to capture the marked area every x seconds for a duration of y seconds.
When saving the image just enter the extension you whish to use (*.jpg;*.png;*.bmp;*.gif;*.tif;*.pdf). Big thanks to taietel for his PDF UDF!
g: text config
To start the app minimized just call it "Windows Screenshooter.exe /min"
Maybe it is useful for someone...
Any kind of comment is welcome.