Jump to content

AutoItPad


arcker
 Share

Recommended Posts

i would like to continue, but i have no time

for the rtf, i'll try the callback dll found in the autoitfeture request

please post your function here, i'll try to merde it with mine asap

i think this project have a great potential, but i can't be alone to do this

any help will be welcome

my first big wish on this project would be to make some tables : if rtf is available, so tables will be available too

but i've to learn rtf syntax and it's a huge work, too big for me for now :whistle:

thx for your support

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Ok

In reality the code is not anything you couldn'nt do yourself.

Theese are in fact your functions slightly modified:

font size:

Func _RichEdit_SetFontSize($hWnd, $Size , $iSelec = True)
    Local $tcharformat, $pCHARFORMAT
    $tcharformat = _tagCHARFORMAT2()
    _tagsetdata ($tcharformat, "cbSize", _taggetsize ($tcharformat))
    _tagsetdata ($tcharformat, "dwMask", $CFM_SIZE)
    _tagsetdata ($tcharformat, "yHeight", $Size*20)
    $pCHARFORMAT = _tagGetPtr ($tcharformat)
    Return _API_SendMessage ($hWnd, $EM_SETCHARFORMAT, $iSelec, $pCHARFORMAT)
EndFunc

Remark: the $Size parametr is (the same?) number as in all text editors - for example:

_RichEdit_SetFontSize($hWnd, 12 , $iSelec = True) -----> size 12

I made in my (your adapted) gui a font size selector (combo) in the toolbar and

a functionality for it that actualize the font size selector and the font name selector (combo) "on fly"

by clicking over the text (it gets the format of the text) and sets the values to the combos.

and strike out:

Func _RichEdit_SetStrikeOut($hWnd, $hBold = False, $iSelec = 0x01)
    Local $tcharformat, $pCHARFORMAT
    $tcharformat = _tagCHARFORMAT2()
    _tagsetdata ($tcharformat, "cbSize", _taggetsize ($tcharformat))
    _tagsetdata ($tcharformat, "dwMask", $CFM_STRIKEOUT)
    If $hBold Then
        _tagsetdata ($tcharformat, "dwEffects", $CFE_STRIKEOUT)
    Else
        _tagsetdata ($tcharformat, "dwEffects", 0)
    EndIf
    $pCHARFORMAT = _tagGetPtr ($tcharformat)
    Return _API_SendMessage ($hWnd, $EM_SETCHARFORMAT, $iSelec, $pCHARFORMAT)
EndFunc

About reading the text as plane text:

Gafrost uses the RichEdit20.dll to get the text. See Rich Edit Control in Search

He is working on it (I hope)

Link to comment
Share on other sites

mmm i've recoded it to make it work with new struct... but format doesn't work anymore

so i have to debug it, to includeyour function, and i'll repost it, sooner or later

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

  • 2 weeks later...

updated ,see first post

supports load & save callback functions

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

updated ,see first post

supports load & save callback functions

That's great!

Btw. do you mind it would be possible to save it to (and to load it from) a variable (without file writing)?

(for example for combining, adding ..... a text from 2 rich edit controls

or for reading and putting a text "on fly")

Edited by grham
Link to comment
Share on other sites

yes it's possible. I've juste posted a save / load example because it's the mort common option.

you can insert some text at the cursor position for example.

for combining from to rich edit, you have to be careful with the rtf, but you can combine, modify the rtf source with the good tags, and then inserts it.

Edited by arcker

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

hello arcker !

can you please rewrite your program since AutoIt3Lib by pauli is not downloadable anymore ? gary says that all the functions are integrated in the new releases and removed the link.

when i try to open it, the error message is: a3lmenu.au3 is missing. i presume, this is part of AutoIt3Lib.

thanx for updating

btw: i would love to integrate your script in my unicode keyboards, i badly need a richedit for it.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

that would be "plan b". i was thinking to do that but i am not able to fight on several frontiers and get a script ready in reasonable time. would be nice to minimize the problems to be solved.

:-)

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

oh wow !

i just noticed that all of the richedit examples in the forum do not work anymore with the new 3.2.10.0. this is really bad done ! they have also changed lots of udf's from the last versions, so you have to struggle real hard to get your scripts work again. i never use betas, only official releases, so i thought this would never happen !

too bad !

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

yeah i will redo it

now that callback is implemented, i have some reason to update it.

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

yeah i will redo it

now that callback is implemented, i have some reason to update it.

That's good, I only wanted to tell you that I rewrote it for me, added some things

and it works. If it interests you, tell me.

Or not - that's on you.

Edited by grham
Link to comment
Share on other sites

if it works with latest version, please post

because i don't manage to make it work with load and save...

send it and i will try to merge all of the useful tools.

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

doesn't do it to me. missing winapi.au3. can someone make it complete with all includes ?

i downgraded to v3.2.8.1 meanwhile. at least the edit boxes are working again. not so in versions 3.2.10.x. i reported a bug and they will fix the edit box bug. but don't know when.

so best if someone packs together all needed au3's.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

  • 2 weeks later...

I'm using your example and the A3LRichEdit Lib... and it works I have only 2 problem:

  • Don't Scroll verticall or orizzontally... AutoItPad do it... I looked deeply in your code but I haven't found the magic code to scroll.

    Can You help me?

  • My RichEdit will be read only and I use the readonly function for this but I like a lot to hide the cursor (that is not the mouse cursor but the blinking |)

    Is this possible?

This my GuI code... I've done something wrong?

#include <GUIConstants.au3>
#include <GuiConstantsEx.au3>
#include <WinAPI.au3>
#include<guiedit.au3>
#include"A3LRichEdit.au3"

Global Const $DEBUGGING = True

Global $EditField
Global $iGUIH
Global $iGUIW

CreateGUI("1.0")
MsgLoop()

Func MsgLoop()

    Debug("Questo è un messaggio di Debug")
    LogError("Questo è un messaggio di Errore")
    LogMsg("Questo è un messaggio che non importa a Nessuno!")
    
    While (GUIGetMsg() <> $GUI_EVENT_CLOSE)
    ; nothing to do here... for now
    WEnd

EndFunc

; ====================================================================================================

===========================
; Creates a GUI for the server
; ====================================================================================================

===========================
Func CreateGUI($version)
    Local $hGUI

    $hGUI = GUICreate("Send2Lphant Versione: " & $version, 600, 400, -1, -1, $WS_OVERLAPPEDWINDOW)
    
    $library = _WinAPI_LoadLibrary ("MSFTEDIT.DLL");load the library for the 4.1 version (it's good to know)
    $RichEditClass = "RichEdit50W";Name of the 4.1 Rich Edit Control
    
;******************************************************************************************
   ;Create the RichEdit Control
   ;******************************************************************************************
    $EditField = _WinAPI_CreateWindowEx ($WS_EX_CLIENTEDGE, $RichEditClass, "", BitOR($WS_CHILD, $ES_WANTRETURN, $ES_NOHIDESEL, $WS_HSCROLL, $WS_VSCROLL, $WS_VISIBLE, $ES_MULTILINE, $ES_AUTOHSCROLL, $ES_AUTOVSCROLL), 10, 10, 580, 380,  $hGUI)
    
   ;$EditField = GUICtrlCreateEdit("", 0, 0, _WinAPI_GetClientWidth($hGUI), _WinAPI_GetClientHeight($hGUI), $ES_READONLY)
;$EditField = GUICtrlCreateLabel("", 0, 0, _WinAPI_GetClientWidth($hGUI), _WinAPI_GetClientHeight($hGUI))
; Se si setta lo stile $ES_READONLY il background diventa grigio, lo rimettiamo bianco
;GUICtrlSetBkColor($EditField, $CLR_WHITE)
;   GUICtrlSetBkColor($iMemo, 0xffffff) ; Bianco
   ;GUICtrlSetFont($EditField, 9, 400, 0, "Courier New")
    GUIRegisterMsg($WM_SIZE, "WM_SIZE")
    GUISetState()
    $iGUIH = _WinAPI_GetClientHeight ($hGUI)
    $iGUIW = _WinAPI_GetClientWidth ($hGUI)
    _richedit_seteventmask ($EditField, BitOR($ENM_SCROLL, $ENM_CHANGE))
EndFunc

; ====================================================================================================

===========================
; Scrive messaggi di debug sul display
; ====================================================================================================

===========================
Func Debug($sMessage)
    if not $DEBUGGING then return
    _RichEdit_SetColor($EditField, $CLR_GRAY)   
    _RichEdit_AddLine($EditField,  $sMessage)
;GUICtrlSetData($EditField,  $sMessage & @CRLF, 1)
;GUICtrlSetColor ($EditField, $CLR_GRAY)
EndFunc

; ====================================================================================================

===========================
; Scrive messaggi di Errore sul display
; ====================================================================================================

===========================
Func LogError($sMessage)
;$winError = StringStripWS(_WinAPI_GetLastErrorMessage(), 2)
    $sMessage &= " (" & StringStripWS(_WinAPI_GetLastErrorMessage(), 2) & ")"

    _RichEdit_SetColor($EditField, $CLR_RED)
    _RichEdit_AddLine($EditField,  $sMessage)
;GUICtrlSetColor ($EditField, $CLR_GREEN)
EndFunc

; ====================================================================================================

===========================
; Scrive messaggi sul display
;; ====================================================================================================

===========================
Func LogMsg($sMessage)
    _RichEdit_SetColor($EditField, $CLR_BLACK)
    _RichEdit_AddLine($EditField,  $sMessage)
   ;GUICtrlSetData($EditField, $sMessage & @CRLF, 1)
;GUICtrlSetColor ($EditField, $CLR_BLACK)
EndFunc


; I don't know if this code is needed... It don't scroll and without my program already worked...
Func WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam)
    Local $iNewH, $iNewW, $iDltH, $iDltW, $iConH, $iConW
   ; Get the new GUI size
    $iNewW = _WinApi_LoWord ($ilParam)
    $iNewH = _WinApi_HiWord ($ilParam)
   ; Get the delta change in the GUI size
    $iDltW = $iNewW - $iGUIW
    $iDltH = $iNewH - $iGUIH
   ; Resize the control
    $iConW = _WinAPI_GetWindowWidth ($EditField) + $iDltW
    $iConH = _WinAPI_GetWindowHeight ($EditField) + $iDltH
    _WinAPI_SetWindowPos ($EditField, 0, 0, 0, $iConW, $iConH, BitOR($SWP_NOMOVE, $SWP_NOZORDER))
   ; Update GUI size variables
    $iGUIW = $iNewW
    $iGUIH = $iNewH
   ; Make sure we let AutoIt receive the message too
    Return $GUI_RUNDEFMSG
EndFunc  ;==>WM_SIZE

Thanks for your help...

fanoI

Link to comment
Share on other sites

The first problem is solved... but I don't know in that way it is :)

I deleted text, cleaned the code, played with an old version of RichEdit and now the scrollbar appears...

The point 2 instead is unresolved... I've searched on the forum and MSDN but "cursor" is mouse cursor I never find referring to the Text cursor (maybe

is this not its name?)... I think will be beautiful that when RichEdit is in readonly mode the blinking | is hided... is this possible?

fanoI

Edited by fanoI
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...