Jump to content
Sign in to follow this  
Draygoes

GuiCtrlCreateObj question...

Recommended Posts

Draygoes

Ive been makeing a program that uses an edit control that the user might need to type a lot of text into. However, it seems that edit ctrls have a limit on the amount of text they can hold, before refusing to allow the user to input anymore.

Ive noticed that notepad doesnt have this limitation. Therefore, I would like to replace the edit box, with a notepad object, which the program can then read, and write to a file what it sees...

Could someone please help me create such an object?

If there is a way to get rid of the limate on editbox's, could someone please show me that instead?

Thx.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
GaryFrost

#include <GuiEdit.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
    Local $hGUI, $hEdit

    ; Create GUI
    $hGUI = GUICreate("(External) Edit Append Text", 400, 300)
    $hEdit = _GUICtrlEdit_Create($hGUI, "", 2, 2, 394, 268)
    GUISetState()

;~  _GUICtrlEdit_BeginUpdate($hEdit)
    For $x = 1 To 10000
        _GUICtrlEdit_AppendText($hEdit, StringFormat("%05d: %s", $x, "AutoIt v3.2.10.0 release candidate.  AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI.") & @CRLF)
    Next
;~  _GUICtrlEdit_EndUpdate($hEdit)
    
    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Draygoes

Thanks man but I got an error message...

---------------------------

AutoIt Error

---------------------------

Line 12 (File "C:\Users\Draygoes\Desktop\internet speed.au3"):

$hEdit = _GUICtrlEdit_Create($hGUI, "", 2, 2, 394, 268)

$hEdit = ^ ERROR

Error: Unknown function name.

---------------------------

OK

---------------------------

Im not sure but it looks like i might not have guiedit.au3

Would you know where I can find it?


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
Draygoes

I just barly finished the install of the new autoit, and it still gives me the same error...

I do have the guiedit.au3 but i still get the same error...

---------------------------

AutoIt Error

---------------------------

Line 12 (File "C:\Users\Draygoes\Desktop\internet speed.au3"):

$hEdit = _GUICtrlEdit_Create($hGUI, "", 2, 2, 394, 268)

$hEdit = ^ ERROR

Error: Unknown function name.

---------------------------

OK

---------------------------

Edited by draygoes

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
GaryFrost

I just barly finished the install of the new autoit, and it still gives me the same error...

I do have the guiedit.au3 but i still get the same error...

With out any script to look at all anyone can do is guess what the problem is, I'm not going to guess.

Can you run the script I posted earlier?

Edited by GaryFrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Draygoes

Thats what I did. I got the error from the script that you posted earler.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
Draygoes

Now thats weared. I got the installer from the main page but it says that im still running 3.2.8.1...

Im confused???????

Edit: Im going to download it again, and this time ill watch exactly where it lands. I might have simply loaded the wrong installer.

Ill inform you when im finished.

Edit 2: It appears that im not going crazy after all. I dounloaded the installer from the download page and it appears that John mad a mestake. Thats 3.2.8.1 that he is handing out. Would you happen to know where I can find v3.2.10.0?

Edited by draygoes

Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
Draygoes

Ok, i got that working but now theres another problem. GuiCtrlSetData and GuiCtrlRead wont work. I need the program to be able to both set and read data from the ctrl. Any Ideas?


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites
Generator

Ok, i got that working but now theres another problem. GuiCtrlSetData and GuiCtrlRead wont work. I need the program to be able to both set and read data from the ctrl. Any Ideas?

Straight off the helpfile, read the whole section before you ask about some sub-function

_GUICtrlEdit_GetText

--------------------------------------------------------------------------------

Get the text from the edit control

#Include <GuiEdit.au3>

_GUICtrlEdit_GetText($hWnd)

Parameters

$hWnd Handle to control

Return Value

Success: String from the edit control

Failure: Empty string

Remarks

None.

Related

_GUICtrlEdit_SetText, _GUICtrlEdit_AppendText

Share this post


Link to post
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
Sign in to follow this  

×