Jump to content

How to create a styled edit?


Didonet
 Share

Recommended Posts

How can i create a edit area with transperent background and when in it there is the code

<b>text</b>oÝ÷ ÚÚ,"¶X¤y»^ÆßÛ.)®'!µìmyØ­¢´áȬ'Ö«y§è®z0jëh×6$text = GUICtrlCreateEdit("", 35, 20, 280, 70,  $ES_WANTRETURN, $WS_EX_TRANSPARENT )

It didn't have border and scrolls, but it still have background color.

Is it possible to create the rich editor?

Link to comment
Share on other sites

Global $Obj = ObjCreate("RICHTEXT.RichTextCtrl")
Local $x = 0, $y = 0, $w = 300, $h = 300
GUICreate("test")
$GUIActiveX = GUICtrlCreateObj($Obj, $x, $y)
GUICtrlSetPos(-1, $x, $y, $w, $h) ;<== REQUIRED, MUST USE THIS!!!
With $Obj
    .OLEObjects ()
    .OLEDrag ()
    .OLEDropMode = 2
    .ScrollBars ()
    .MultiLine ()
    .SelStart = 0
    .SelFontName = "Arial"
    .SelFontSize = 9
    .HideSelection = False
    .BackColor = 0xFFFFFF
EndWith
GUISetState()

While 1
    Sleep(50)
WEnd

GUICtrlSetPos must be used or else the width and height of the object won't be correct (weird bug).

Kurt

Edited by _Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

Thanks for the script... but it didn't work... :P

I'm with Windows Vista and i'm seeing nothing.

I think the Vista is the problem...

And another problem:

C:\Program Files\AutoIt3\Examples\rich.text.au3(11,12) : WARNING: $Notes: possibly used before declaration.

With $Notes

~~~~~~~~~~~^

C:\Program Files\AutoIt3\Examples\rich.text.au3(11,12) : ERROR: $Notes: undeclared global variable.

With $Notes

I tried and that script but nothing happens...

http://www.autoitscript.com/forum/index.php?showtopic=45077

Link to comment
Share on other sites

And another problem:

WARNING: $Notes: possibly used before declaration.

if $Notes is declared in a function & you try to use it in anywhere else, exept the function where it is declared or on the line above you have declared it in current function, you get this error because autoit reads a functions only if certain conditions are met, like you press a button/hotkey/or put _finction() somewhere.

But if you want to use the declared $Notes value somewhere else, you need to make $Notes a global value. So simply put global $Notes on the first line of your script

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

If this doesn't work in Vista then I do not know any other solutions, try it again..

Global $Obj = ObjCreate("RICHTEXT.RichTextCtrl")
Local $x = 0, $y = 0, $w = 300, $h = 300
GUICreate("test")
$GUIActiveX = GUICtrlCreateObj($Obj, $x, $y)
GUICtrlSetPos(-1, $x, $y, $w, $h) ;<== REQUIRED, MUST USE THIS!!!
With $Obj
    .OLEObjects ()
    .OLEDrag ()
    .OLEDropMode = 2
    .ScrollBars ()
    .MultiLine ()
    .SelStart = 0
    .SelFontName = "Arial"
    .SelFontSize = 9
    .HideSelection = False
    .BackColor = 0xFFFFFF
EndWith
GUISetState()

While 1
    Sleep(50)
WEnd

Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

>Running:(3.2.8.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Program Files\AutoIt3\Examples\rich.text.test.au3"

C:\Program Files\AutoIt3\Examples\rich.text.test.au3 (6) : ==> Only Object-type variables allowed in an "With" statement.:

With $Obj

With ^ ERROR

->22:50:56 AutoIT3.exe ended.rc:1

+>22:50:57 AutoIt3Wrapper Finished

>Exit code: 1 Time: 2.550

:P

Link to comment
Share on other sites

  • 4 weeks later...

>Running:(3.2.8.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Program Files\AutoIt3\Examples\rich.text.test.au3"

C:\Program Files\AutoIt3\Examples\rich.text.test.au3 (6) : ==> Only Object-type variables allowed in an "With" statement.:

With $Obj

With ^ ERROR

->22:50:56 AutoIT3.exe ended.rc:1

+>22:50:57 AutoIt3Wrapper Finished

>Exit code: 1 Time: 2.550

:)

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Ran\Desktop\richbox.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>02:04:59 Starting AutoIt3Wrapper v.1.9.4

>Running AU3Check (1.54.9.0) from:C:\Program Files\AutoIt3

+>02:04:59 AU3Check ended.rc:0

>Running:(3.2.9.3):C:\Program Files\AutoIt3\autoit3.exe "C:\Users\Ran\Desktop\richbox.au3"

C:\Users\Ran\Desktop\richbox.au3 (6) : ==> Only Object-type variables allowed in an "With" statement.:

With $Obj

With ^ ERROR

->02:04:59 AutoIT3.exe ended.rc:1

+>02:05:00 AutoIt3Wrapper Finished

>Exit code: 1 Time: 1.566

I'm also running on Vista and I get this too and I really need this..

Anyone found a solution to this?

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