Can't get text items from ControlTreeView
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By MrKm
AutoIT-OCRSpace-UDF1.3.zip
This tiny yet powerful UDF will help you to convert Images to text with the help of OCRSpace API version 3.50 .
Detect text from a local file.
; ========================================================= ; Example 2 : Gets text from an image from a local path reference ; : Searchable PDF is not requested by default. ; : Processes it using a basic OCR logic. ; ========================================================= $b_Create_Searchable_PDF = True ; Use a table logic for receipt OCR $b_Table = True ; Set your key here. $v_OCRSpaceAPIKey = "" $OCROptions = _OCRSpace_SetUpOCR($v_OCRSpaceAPIKey, 1, $b_Table, True, "eng", True, Default, Default, $b_Create_Searchable_PDF) $sText_Detected = _OCRSpace_ImageGetText($OCROptions, @scriptdir & "\receipt.jpg", 0, "SEARCHABLE_URL") ConsoleWrite( _ " Detected text : " & $sText_Detected & @CRLF & _ " Error Returned : " & @error & @CRLF & _ " PDF URL : " & Eval("SEARCHABLE_URL") & @CRLF)
Detect text from a URL reference.
; ========================================================= ; Example 1 : Gets text from an image using a url reference ; : Searchable PDF is not requested. ; : Processes it using a basic OCR logic. ; ========================================================= $v_OCRSpaceAPIKey = "" ; SetUp some preferences.. $OCROptions = _OCRSpace_SetUpOCR($v_OCRSpaceAPIKey, 1, False, True, "eng", True, Default, Default, False) ; Make the request.. $sText_Detected = _OCRSpace_ImageGetText($OCROptions, "https://i.imgur.com/vbYXwJm.png", 0) ConsoleWrite( _ " Detected text : " & $sText_Detected & @CRLF & _ " Error Returned : " & @error & @CRLF)
Detect text from a URL reference to an array
#include "OCRSpaceUDF\_OCRSpace_UDF.au3" #include <array.au3> ; Set your key here. $v_OCRSpaceAPIKey = "" $OCROptions = _OCRSpace_SetUpOCR($v_OCRSpaceAPIKey, 1, $b_Table, True, "eng", True, Default, Default, False) ; Below, the return type is set to 1 to return an array containing the coordinates of the bounding boxes for each word detected, ; in the format : #WordDetected , #Left , #Top , 3Height, #Width $aText_Detected = _OCRSpace_ImageGetText($OCROptions, "https://i.imgur.com/Z1enogD.jpeg", 1) _ArrayDisplay($aText_Detected, "")
https://github.com/KabueMurage/AutoIT-OCRSpace-UDF
Download Latest Version :
-
By ptrex
DLLCalls using VBScripts
Out if the box it is not possible to do DllCalls from VBScripts. But thanks to the +20 year COM Library called DynaWrap this is still possible
Anyhow the process of calling Win API functions need some basic knowledge and understanding on how to do this.
More specifically the input Data Types parameters used and Calling Formats are key here, as well as the Return Data Types
DynaWrap COM Library
Keep in mind that this COM Library is a 32Bit only library. Which means that you need to register is using the SysWOW64 regsvr32
But to overcome this annoyance I created RegFree method so you can start using it as a portable COM Library
DynaWrap Documentation
I created a PDF documention on what I still could find on the internet on how to use the COM Library.
Examples
The second post will hold some VBScript Examples and an AutoIt Example
Attached
You will find the PDF and the ZIP File needed to run your code in a portable way.
Thanks to the @Professor_Bernd to provide the VBScript code to get the VBScript scripting directory and the Shortcut to run the 32Bit SysWOW64 VBScript host
Just drop the VBScript on the 32Bit Shortcut to get going.
Source Code
Anyhow here you can find the source code of the DynaWrap 32Bit Library.
If someone has the C++ Tools to convert it to 64Bit Library that would give a new live to it...
http://www.borncity.com/web/WSHBazaar1/WSHDynaCall.htm
Interesting reading :
https://www.drdobbs.com/windows/an-automation-object-for-dynamic-dll-cal/210200078
DynaCall.zip How to use DllCalls in VBScript using DynaWrap COM Object.pdf
-
By nacerbaaziz
hello evrybody
here is an example about how to split your texts using a delimiter with the ability to select how much of delimiters shows in each colum with $i_number
e.g
you have a long text and you want to split it in an array
that evry colum have a number (n) of lines
i made a function that do that for you
just call it with a three params
$s_text
your text
$i_number
the number that you want to put in each col
$s_siparator
the siparator
default is "|"
here is the function with example
i hope that it will be useful for you
****
#include <Array.au3> $s_txt = "some text1some text2|some text3|some text4|some text5|some text6" $array = splitText($s_txt, 2) _ArrayDisplay($array) Func splitText($s_text, $i_number, $s_siparator = "|") Local $a_TXT = StringSplit($s_text, $s_siparator) Local $a_Return[$a_TXT[0] + 1] If ($a_TXT[0] <= $i_number) Or ($i_number <= 0) Then ReDim $a_Return[2] $a_Return[0] = 1 $a_Return[1] = $s_text Return $a_Return EndIf Local $i_Processed = 1, $i_arrayProcessed = 1 Do For $i = $i_Processed To ($i_Processed + $i_number) - 1 If ($a_TXT[0] < $i) Then ExitLoop If Not ($a_Return[$i_arrayProcessed]) Then $a_Return[$i_arrayProcessed] = $a_TXT[$i] Else $a_Return[$i_arrayProcessed] &= $s_siparator & $a_TXT[$i] EndIf $i_Processed += 1 Next $i_arrayProcessed += 1 Until ($a_TXT[0] < $i_Processed) ReDim $a_Return[$i_arrayProcessed] $a_Return[0] = $i_arrayProcessed - 1 Return $a_Return EndFunc ;==>splitText
accept my greetings
thanks to
@Dan_555
for his notes
-
By nacerbaaziz
hello autoit team
please i've a question for you.
am creating a audio player
and in this audio player i want to show the current trac info
such as the total time and the position ... etc
i know i can show it as label
but the screen reader for the blind read the text every change
because it have a screen scan
what i want is to show this informations but such image or icon
i mean i need to create
GUICtrlCreatepic or GUICtrlCreateicon ....
or some thing as that
and show this informations as image on it
i think that i can do that with the
_GDIPlus functions
but i couldn't find the currect way to do it
i tried the _GDIPlus_GraphicsDrawString
but i couldn't know how it work
what i need is a small example that create a GUI
and add a multy line text to it as graphic or image.
so i need a simple way because it will changed every sec
i hope any one can help me to do that
global $GUI = GUICreate("text", 400, 400) global $label = GUICtrlCreateLabel(GetText(), 10, 10, 380, 380) GUISetState() do sleep(100) until GUIGetMSG() = -3 exit func GetText() return StringFormat("file name is test.mp3 \r\n total time is 00:30:00 \r\n position is 00:05:50") endFunc
-
By nacerbaaziz
hello autoit group
please i've a question
i had make a function that put some thing into the clipBoard and paste it
using the send function
e.g
ClipPut("hello")
send("^v")
when the keyboard is english all things work fine
but when the keyboard is arabic the send command write the ltr v insted of the text in clipboard
i was tryed to use
send("{ctrldown}v{ctrlUp}")
but the same
please can any one help me
-
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