
Fenzik
Active Members-
Posts
52 -
Joined
-
Last visited
Everything posted by Fenzik
-
Thank you. So i think that it's useful for example for accessibility reasons, because when you have for example some read only Richedit with some text, you don't want to have it selectet when you use the keyboard to navigate the focus. The second relatively related sideeffect is the difference between _GUICtrlRichEdit_SetText and _GUICtrlRichEdit_StreamFromVar functions, where _GUICtrlRichEdit_StreamFromVar function put the cursor to the last character of the text and _GUICtrlRichEdit_SetText function puts it on the first character. Thank you again!
-
Hello all, i have following question. Is it possible to prevent the Richedit control from autoselecting text when control is focussed by Tab key? You can see this behaviour in this modified example from Help file. When you press the Tab Key and cycle through the elements, when Richedit is focussed, the text is every time selected. Is there some way to prevent this, so the selection remains untouched when i focus the Richedit? Thank you. Fenzik #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGui, $hRichEdit, $iMsg $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 400, -1, -1) $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_AppendText($hRichEdit, @CRLF & "This is more text") $btn = guictrlcreatebutton("BTN", 10, 330, 50, 20) GUISetState(@SW_SHOW) While True $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes ; GUIDelete() ; is OK too Exit EndSelect WEnd EndFunc ;==>Example
-
Best practice to make as standard gui as possible
Fenzik replied to Fenzik's topic in AutoIt GUI Help and Support
So in result, i think, that window, created without any style should look the same as window created using the WS_OVERLAPPEDWINDOW style? -
Best practice to make as standard gui as possible
Fenzik replied to Fenzik's topic in AutoIt GUI Help and Support
Thank you dmob... Yes, this is in the Help. And in the same topic is also: By default the dialog box is non sizable and non maximizable. So WS_SIZEBOX or WS_MAXIMIZEBOX can be used in the style parameter. As defining only one style just set this style don't forget to combine it with default ones, i.e. just defining WS_SIZEBOX will not set $WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU. So the best method to define a resizeable window is to use $WS_OVERLAPPEDWINDOW. This is reason, why i'm little bit lost in styles at all and whi i was using WS_OVERLAPPEDWINDOW before. But without any style everithing looks working. So thank you again. -
Best practice to make as standard gui as possible
Fenzik replied to Fenzik's topic in AutoIt GUI Help and Support
Thank you careca. Ok, i'll do it like you recomended. I thought, that styles are required, for example when you want to use Main menu control in the window. And thank you, i¨ll check my software for unpredictable I and Y changes... -
Hello all, i tryed searching the forum, but i still don't have answer to this question. I'm a bit lost in Common Gui Styles. As blind developer, i'm not sure how the styles look in result. So, what's the best combination to make as standard window as possible? From help file, i found folowing style combination as good enough and most universal for my projects. But is this enough? Or i should add some style? I'm using this for Main Gui Windows with menu, and also for other windows without Main menu (Program Settings, etc.). GUICreate("Main Gui", 800, 600, "", "", BitOR($WS_MAXIMIZE, $WS_OVERLAPPEDWINDOW)) Thank you for your replyes.
-
Hello all, i love Scite for It's simplicity and quick responsibility. I decided to use it also for editing installers of my programs. I think that many Autoit users are using also Inno Setup to create installations. I made few changes to my Scite General properties file (just uncommend Inno related lines): default.languages=\ &InnoSetup|iss||\ import * import properties\inno Attached the Inno Properties file (paths edited to default placement of Inno setup 6 in Program Files (x86)). So i suggest to include it in Scite4Autoit3 installer, just to have editing of Inno Setup scripts available for most users just out of the box. inno.properties
-
@jcpetu: I think that i solved your trouble. You probably don't have installed Microsoft Visual C++ 2010 Redistributable package for x86, which is necessary for whole Xdoc2Txt project. ............ So try to install it, for example from Here. Then the x86 version of the DLL and script should work i hope.
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
@jcpetu: Unfortunately no idea. It works perfect on my side. What about bit version of autoit.exe? Dll is X86. So it shoult be run using X86 version of Autoit or compiled as X86. What about Scite settings? Don't you prefer X64 Autoit here? Good Luck! On my side unfortunately no other idea to make it work on your enviroment..
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Ok. So let start from the beginning. When you unpack and run the easy example from the first post of this topic, does it work?
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Strange! are you using last version of Autoit and Scite? I have both last versions and everithing runs OK. So try to update to the last versions. And do you have the file xd2txlib.dll in the @scriptdir?
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
And close the DLL at the end of conversion multiple files. I forgot it and have problem to edit previous post...
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Ok, i made few corrections and comments to your example. So here it is.. #include <FileConstants.au3> #include <msgboxconstants.au3> Global $properties = False Global $foundtext = "" Global $sMessage = "Hold down Ctrl or Shift to choose multiple files." Global $sFileOpenDialog = FileOpenDialog($sMessage, @ScriptDir & "\", "Text files (*.docx;*.doc;*.rtf;*.wri;*.txt)|Excel (*.xls;*.xlsx)", BitOR($FD_FILEMUSTEXIST, $FD_MULTISELECT)) If @error Then MsgBox($MB_SYSTEMMODAL, "", "No file(s) were selected.") Exit EndIf ;FileChangeDir(@ScriptDir) ;It's not necessary to change working dir here. ;Here we must know if user selected one or more files If Not StringInStr($sFileOpenDialog, "|") Then ;Only one selected file MsgBox($MB_SYSTEMMODAL, "", "You chose the following file:" & @CRLF & $sFileOpenDialog) ;Only one selected file ;so lets convert it here $foundtext = _ExtractText($sFileOpenDialog) ;in this case the DLL is opened and closed during function call. ;Properties are False by default so it's not necessary to use it if you want to have it false. ;show the result If Not @error Then ConsoleWrite($foundtext) Else $files = StringSplit($sFileOpenDialog, "|") ;Multiple files ;The path is in $files[1], so we have to put the path and filenames together $sFileOpenDialog = "" For $i = 1 To $files[0] - 1 $sFileOpenDialog &= $files[1] & "\" & $files[$i + 1] & @CRLF Next ;so here you have full paths to selected files divided by @crlf and you can show them in msgbox MsgBox($MB_SYSTEMMODAL, "", "You chose the following files:" & @CRLF & $sFileOpenDialog) ;And here is the problem. You passed whole set of files, divided by @crlf, with path to the directory only at the first line.. ;Solet them be converted And showed one by one And pass the handle of previously opened DLL. $hXd2tx = DllOpen(@ScriptDir & "\xd2txlib.dll") $files = StringSplit($sFileOpenDialog, @CRLF) For $i = 1 To UBound($files) - 1 $foundtext = _ExtractText($files[$i], $properties, $hXd2tx) ; $bProperties = False -------------------------------- If Not @error Then ConsoleWrite($foundtext) Next ;Close the DLL DllClose($hxd2tx) EndIf ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ExtractText ; Description ...: Extracts text from advanced documment formats (Doc, Docx, ODT, XLS, ...) ; Syntax ........: _ExtractText($sFilename[, $bProperties = False[, $hDll = 0]]) ; Parameters ....: $sFilename - a string value. ; $bProperties - [optional] a boolean value. Default is False. If True, documment properties will be returned instead of the text. ; $hDll - [optional] a handle value. Default is 0. Optional handle to previously opened xd2txlib.dll. By default the xd2txlib.dll (Expected in @scriptdir) will be opened and closed during the function call. ; Return value .: String, containing the text or documment properties or empty string and Error as follows: ;1 - The file does not exists. ;2 - Error during opening xd2txlib.dll. ;3 - No text returned. ; Author ........: Fenzik ; Modified ......: ; Remarks .......: Project site - http://ebstudio.info/home/xdoc2txt.html ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _ExtractText($sFilename, $bProperties = False, $hDll = 0) If Not FileExists($sFilename) Then Return SetError(1, "", "") Local $bLoaded = False If $hDll = 0 Then $hDll = DllOpen(@ScriptDir & "\xd2txlib.dll") If $hDll = -1 Then Return SetError(2, "", "") $bLoaded = True EndIf $aResult = DllCall($hDll, "int:cdecl", "ExtractText", "WSTR", $sFilename, "BOOL", $bProperties, "WSTR*", "") If $aResult[0] = 0 Then Return SetError(3, "", "") If $bLoaded = True Then DllClose($hDll) Return $aResult[3] EndFunc ;==>_ExtractText
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Here is easy example, including sample documment.
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Hello! i wrote this function as alternative to using the Com Object or Commandline version of this project, discussed also earlyer on this forum. Project site - http://ebstudio.info/home/xdoc2txt.html Advantage of this implementation is that you do not need to register Com dll, using regsvr32. But you still need the project Dll (xd2txlib.dll). Enjoy! ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ExtractText ; Description ...: Extracts text from advanced documment formats (Doc, Docx, ODT, XLS, ...) ; Syntax ........: _ExtractText($sFilename[, $bProperties = False[, $hDll = 0]]) ; Parameters ....: $sFilename - a string value. ; $bProperties - [optional] a boolean value. Default is False. If True, documment properties will be returned instead of the text. ; $hDll - [optional] a handle value. Default is 0. Optional handle to previously opened xd2txlib.dll. By default the xd2txlib.dll (Expected in @scriptdir) will be opened and closed during the function call. ; Return value .: String, containing the text or documment properties or empty string and Error as follows: ;1 - The file does not exists. ;2 - Error during opening xd2txlib.dll. ;3 - No text returned. ; Author ........: Fenzik ; Modified ......: ; Remarks .......: Project site - http://ebstudio.info/home/xdoc2txt.html ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _ExtractText($sFilename, $bProperties = False, $hDll = 0) If Not FileExists($sFilename) Then Return SetError(1, "", "") Local $bLoaded = False If $hDll = 0 Then $hDll = DllOpen(@scriptdir&"\xd2txlib.dll") If $hDll = -1 Then Return SetError(2, "", "") $bLoaded = True Endif $aResult = DllCall($hDll, "int:cdecl", "ExtractText", "WSTR", $sFilename, "BOOL", $bProperties, "WSTR*", "") If $aResult[0] = 0 Then Return SetError(3, "", "") If $bLoaded = True Then DllClose($hDll) Return $aResult[3] EndFunc xd2txlib-example.zip
- 14 replies
-
- text extraction
- word
-
(and 3 more)
Tagged with:
-
Just for them, who want to have success at the end of the thread.. Here is my working example. ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ExtractText ; Description ...: Extracts text from advanced documment formats (Doc, Docx, ODT, XLS, ...) ; Syntax ........: _ExtractText($sFilename[, $bProperties = False[, $hDll = 0]]) ; Parameters ....: $sFilename - a string value. ; $bProperties - [optional] a boolean value. Default is False. If True, documment properties will be returned instead of the text. ; $hDll - [optional] a handle value. Default is 0. Optional handle to previously opened xd2txlib.dll. By default the xd2txlib.dll (Expected in @scriptdir) will be opened and closed during the function call. ; Return value .: String, containing the text or documment properties or empty string and Error as follows: ;1 - The file does not exists. ;2 - Error during opening xd2txlib.dll. ;3 - No text returned. ; Author ........: Fenzik ; Modified ......: ; Remarks .......: Project site - http://ebstudio.info/home/xdoc2txt.html ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _ExtractText($sFilename, $bProperties = False, $hDll = 0) If Not FileExists($sFilename) Then Return SetError(1, "", "") Local $bLoaded = False If $hDll = 0 Then $hDll = DllOpen(@scriptdir&"\xd2txlib.dll") If $hDll = -1 Then Return SetError(2, "", "") $bLoaded = True Endif $aResult = DllCall($hDll, "int:cdecl", "ExtractText", "WSTR", $sFilename, "BOOL", $bProperties, "WSTR*", "") If $aResult[0] = 0 Then Return SetError(3, "", "") If $bLoaded = True Then DllClose($hDll) Return $aResult[3] EndFunc
-
Hello all! i'm searching here, cause i do'nt know where else to search.. I'm developing some projects, mainly intended to help Blind users of computers. I'm also blind, so my guis are Ok for Screen readers, but i'm not sure, if they are good also for normal users.. So I¨m searching here for somebody, interested in Autoit, which have no problem to help me a bit with designating my apps. My apps are written in Czech language, so i prefer somebody from Czech republic.. If somebody want to help me, don't hesitate to contact me personaly, contacts and my projects are available on web in my profile. So thank you for potential help and i'm sorry if i missed some forum etiquette rule here. I'm not sure how it works here with searching for interested people and then contact them personaly. Fenzik
-
Scite4Autoit3 default encoding suggestion
Fenzik replied to Fenzik's topic in AutoIt Technical Discussion
It's nice.. Sorry for adding more work to you... -
Scite4Autoit3 default encoding suggestion
Fenzik replied to Fenzik's topic in AutoIt Technical Discussion
In this case, it seems to me be the same as at the start of this topic. I have no changes in config files. And in both situations (empty documment / passed argument) is checked only Code page property. It's not so big problem to switch it, it's only little detail, that would be nice to have automaticaly set.. -
Scite4Autoit3 default encoding suggestion
Fenzik replied to Fenzik's topic in AutoIt Technical Discussion
Is this the link, you send before? It seems to don't work also in new document and also when using commandline... Or is the beta somewhere else? -
Scite4Autoit3 default encoding suggestion
Fenzik replied to Fenzik's topic in AutoIt Technical Discussion
Unfortunately, no effect. After replacing the scite.exe and removing above settings, the behaviour is the same as at the beginning..