forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Get a line from a multi line edit box.

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Wed Feb 27, 2002 12:26 am    Post subject: Get a line from a multi line edit box. Reply with quote

Is there a way I can get a line at the current cursor position
in a multi line edit box. Using API would be prefered, but
I could not find a way to do it using that.

Any Ideas?

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Feb 27, 2002 2:36 am    Post subject: Reply with quote

I'm not real sure what you are trying to do, but you might try this to select the line:
Code:

  DIALOG FOCUS,Edit1
  WINDOW SEND,@WINEXISTS(MultiEdit Test),@KEY(HOME)
  WINDOW SEND,@WINEXISTS(MultiEdit Test),@SHIFT(@KEY(END))

Then you can use copy and paste or whatever you need to.
Change "Edit1" and "@WINEXISTS(MultiEdit Test)" to whatever you need for your Window.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Wed Feb 27, 2002 12:59 pm    Post subject: Reply with quote

Hello,

That is what I have it do right now (I should have said that above) but for
some reason that does not work in Window$ XP. Any other ideas?

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Jun 30, 2002 5:54 pm    Post subject: Reply with quote

I'm a little late, but this is a real good way to get stuff from a line.

Code:

%%windowname = windowname
%%editname = editname

  %z = @winexists(~%%windowname)
  %i = @sendmsg(%z,$0BB,-1,0)
  %%line = @sendmsg(%z,$0C9,%I,0)
  list create,1
  list add,1,@dlgtext(%%editname)
  %%selectedline = @item(1,%l)
  list close,1


Btw. I haven't tested it, but I believe it's working...
Back to top
View user's profile Send private message
attreus
Valued Newbie


Joined: 30 Jul 2002
Posts: 46
Location: Berlin/Germany

PostPosted: Thu Aug 07, 2003 11:02 pm    Post subject: Reply with quote

hey i'm very late to that, but i found this threed 'cause i'd the same prob like liquidcode (guess you found a way in the meantime).
but i'll post that for any other who maybe is looking for the same in future.

skit3000 - you should have tried it, there are some little embrassing faults in that code.

that's the way it works:

Code:

%%editname = E1

  %z = @winexists(~%%editname )
rem  em_lineindex
  %i = @sendmsg(%z,$0BB,-1,0)
rem  em_linefromcharacter
  %%line = @sendmsg(%z,$0C9,%I,0)
  list create,1
  list assign,1,@dlgtext(%%editname )
  %%selectedline = @item(1,%%line)
  list close,1

rem %%selectedline now contains the whole text of the line, where the caretposition is
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group