Jump to content

How do you...


Recommended Posts

How do you...

1. Scroll down a List object by script.

2. Make new lines into a Input component.

(Tried @LF, @CR, @CRLF and all they do are squares, also tried \n and that has no effect.)

Thanks in advance.

Link to comment
Share on other sites

1. I didn't really understand your question, but I think you are looking for $WS_VSCROLL

2. GuiCtrlCreateInput("Line1" & @CRLF & "Line2", 10, 10, 100, 50, $ES_MULTILINE)

Tried the 2. and it works, thank you. What I meant in the first question was that if you could make it either automatically scroll the list down if more entries are added or do it by code with a certain message to the control or if such a way is possible. But I'm not sure if I will need to know that now with the inputfield working, going to test it in my program now and report back here about the results. Thank you.
Link to comment
Share on other sites

Ok.. So the problem I have now is to give the control both multiline and readonly.

These are the ways I've tried:

Global $chatField = GUICtrlCreateInput("", 10, 10, @DesktopWidth-200, @DesktopHeight-50-100)
GUICtrlSetStyle(-1, $ES_MULTILINE)
GUICtrlSetStyle(-1, $ES_READONLY)
oÝ÷ Ù«­¢+Ø)±½°ÀÌØí¡Ñ¥±ôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°Í­Ñ½Á]¥Ñ ´ÈÀÀ°Í­Ñ½Á!¥¡Ð´ÔÀ´ÄÀÀ°ÀÌØíM}I=91d¬ÀÌØíM}5U1Q%1%9¤(oÝ÷ Ù«­¢+Ø)±½°ÀÌØí¡Ñ¥±ôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°Í­Ñ½Á]¥Ñ ´ÈÀÀ°Í­Ñ½Á!¥¡Ð´ÔÀ´ÄÀÀ°ÀÌØíM}I=91dµÀìÀÌØíM}5U1Q%1%9¤
Edited by Ranmaru
Link to comment
Share on other sites

Ok.. So the problem I have now is to give the control both multiline and readonly.

These are the ways I've tried:

Global $chatField = GUICtrlCreateInput("", 10, 10, @DesktopWidth-200, @DesktopHeight-50-100)
GUICtrlSetStyle(-1, $ES_MULTILINE)
GUICtrlSetStyle(-1, $ES_READONLY)
oÝ÷ Ù«­¢+Ø)±½°ÀÌØí¡Ñ¥±ôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°Í­Ñ½Á]¥Ñ ´ÈÀÀ°Í­Ñ½Á!¥¡Ð´ÔÀ´ÄÀÀ°ÀÌØíM}I=91d¬ÀÌØíM}5U1Q%1%9¤(oÝ÷ Ù«­¢+Ø)±½°ÀÌØí¡Ñ¥±ôU%
Ñɱ
ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°Í­Ñ½Á]¥Ñ ´ÈÀÀ°Í­Ñ½Á!¥¡Ð´ÔÀ´ÄÀÀ°ÀÌØíM}I=91dµÀìÀÌØíM}5U1Q%1%9¤

GUICtrlCreateInput("", 10, 10, @DesktopWidth-200, @DesktopHeight-50-100, Bitor($ES_READONLY,$ES_MULTILINE))

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I tried that too, doesn't work on my comp. But this worked:

$chatField = GUICtrlCreateInput("Line1" & @CRLF & "Line2", 10, 10, @DesktopWidth-200, @DesktopHeight-50-100, $ES_MULTILINE)
GuiCtrlSetStyle($chatField, $ES_READONLY)

EDIT: Does anyone know, how to make a list autoscroll? Help file says, that $ES_AUTOVSCROLL only works when user presses Enter key.

Edited by poisonkiller
Link to comment
Share on other sites

I tried that too, doesn't work on my comp. But this worked:

$chatField = GUICtrlCreateInput("Line1" & @CRLF & "Line2", 10, 10, @DesktopWidth-200, @DesktopHeight-50-100, $ES_MULTILINE)
GuiCtrlSetStyle($chatField, $ES_READONLY)
Tried the other thing with the bitor function, but it didn't work. This way it worked. However now there rises another problem.. The text input is used as a field where the chatmessages from the server are placed, however it doesn't give a scroll for it when the lines go past the field (don't even know if they are there..) so my problem is to get a scroll to it and having it to keep it scrolled down all the time like how MSN and other IM and chat applications work. Edited by Ranmaru
Link to comment
Share on other sites

I tried that too, doesn't work on my comp. But this worked:

$chatField = GUICtrlCreateInput("Line1" & @CRLF & "Line2", 10, 10, @DesktopWidth-200, @DesktopHeight-50-100, $ES_MULTILINE)
GuiCtrlSetStyle($chatField, $ES_READONLY)

EDIT: Does anyone know, how to make a list autoscroll? Help file says, that $ES_AUTOVSCROLL only works when user presses Enter key.

Yes poisonkiller, I looked up how I've done it before and I've done what you suggested. I should have tested what I posted :)
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Tried the other thing with the bitor function, but it didn't work. This way it worked. However now there rises another problem.. The text input is used as a field where the chatmessages from the server are placed, however it doesn't give a scroll for it when the lines go past the field (don't even know if they are there..) so my problem is to get a scroll to it and having it to keep it scrolled down all the time like how MSN and other IM and chat applications work.

Maybe it would be easier to use an edit rather than an input. The GuiEdit.au3 in the includes gives functions for scrolling to a line or caret position etc.

Apologies if I wasted your time with my duff BitOr suggestion.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Using it now. :$ :)

Ermm.. But I still get no scrollbar, how do I add that?

EDIT: Scroll added and it's scrolling now when new messages are added! Thank you all!

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