AutoHotkey Community

It is currently May 25th, 2012, 9:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 106 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject:
PostPosted: June 24th, 2007, 10:30 am 
Great release !!
An other wish : can you add to your align options the ability to justify the text at the left ans right margins?
Thanks for the good work


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 24th, 2007, 11:53 am 
Well, I thought I got almost everything I wanted.
Ow, Find or Search Function is needed.
Maybe the function should return the position of the found word.
To make it useful, GetCurrentPosition should also be requried, I think.
Cursor Positions could be expressed by [(line, colum)] or [the same way you already presented].

If possible, Edit control way would also be great as in AHK Help below.


Quote:
LineCount: Sets OutputVar to be the number of lines in an Edit control. All Edit controls have at least 1 line, even if the control is empty.

CurrentLine: Sets OutputVar to be the line number in an Edit control where the caret (insert point) resides. The first line is 1. If there is text selected in the control, OutputVar is set to the line number where the selection begins.

CurrentCol: Sets OutputVar to be the column number in an Edit control where the caret (text insertion point) resides. The first column is 1. If there is text selected in the control, OutputVar is set to the column number where the selection begins.

Line, N: Sets OutputVar to be the text of line N in an Edit control. Line 1 is the first line. Depending on the nature of the control, OutputVar might end in a carriage return (`r) or a carriage return + linefeed (`r`n). If the specified line number is blank or does not exist, ErrorLevel is set to 1 and OutputVar is made blank.


I don't know how tricky it is, but when you find time, please consider it.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 25th, 2007, 7:44 pm 
Sorry, You've already done my request by selrange and setsel

I wish nobody saw that silly request. :oops:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2007, 2:26 pm 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
Thanks for you great work! I use RTF control in my last project "DupFinder" - http://sven.karsten.googlepages.com/
Can you please add "wrap lines" function?

And a little bug report now:
The function cRichEdit(REdit1, "GetRTF") not 100% correct works with big non-English texts.
Example: Copy from Internet big (1-2 Mb.) Russian text (here: http://zhurnal.lib.ru/s/swen_k/landvermesser1-1.shtml ), open new RTF file in Wordpad, paste the Russian content and save as RTF. Than open this file in your RichEdit and save with
Code:
Content := cRichEdit(REdit1, "GetRTF")
FileDelete, output.rtf
FileAppend, %Content%, output.rtf
Content =

The result will be 3-4 Kb greater as input file, some random characters will be added to the text.

But with plain English texts your RichEdit works fine.

:D

_________________
My AHK project: http://landvermesser.tripod.com/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 4th, 2007, 4:26 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Landvermesser wrote:
Thanks for you great work! I use RTF control in my last project "DupFinder" - http://sven.karsten.googlepages.com/
Can you please add "wrap lines" function?
Thanks :) . I'll add it to the list.

Landvermesser wrote:
And a little bug report now:
The function cRichEdit(REdit1, "GetRTF") not 100% correct works with big non-English texts.
Thanks for the report. I'll have a look.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 19th, 2007, 4:33 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Landvermesser wrote:
And a little bug report now:
The function cRichEdit(REdit1, "GetRTF") not 100% correct works with big non-English texts.
Sorry for the really long delay. This might be caused by the default flags that get used for the opt2 param of the GetRTF command.
Quote:
GetRTF - Get the RTF code for the current selection or current contents of the RichEdit
control

_action = GetRTF
opt1 := True (optional) Retrieve the code for the current selection instead of the code
for the entire control (the entire control is the default if not specified)
opt2 := formatting flags (optional)
- will default to SF_TEXT|SF_RTF|SF_RTFNOOBJS|SFF_PLAINRTF if not specified

I tried to download your sample text but the link does not seem to be valid. I'm not sure if it will make a difference but you could try removing the SFF_PLAINRTF flag and add the SF_UNICODE flag. The call could then look something like this:
Code:
cRichEdit(REdit1, "GetRTF", False, 0x1|0x2|0x3|0x10)

This page gives a bit of an explanation of possible flags that can be used. Please let me know if this helps when you get a chance :) .


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 19th, 2007, 7:27 am 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
Thank you corrupt!
I'll try to test it. :)

_________________
My AHK project: http://landvermesser.tripod.com/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 19th, 2007, 8:48 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Minor update: version 0.07
  • added: GetLineNum - to retrieve the current line number, the total number of lines or the line number at a specific character index
  • fixed: bug with specifying a colour by name
  • more to come soon...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2007, 11:47 am 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
Sorry, corrupt, but the test is negative...
It work not in Unicode mode too. :(

_________________
My AHK project: http://landvermesser.tripod.com/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 26th, 2007, 1:44 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Landvermesser wrote:
Sorry, corrupt, but the test is negative...
It work not in Unicode mode too. :(
Thanks for giving it a try. Out of curiosity, have you checked to see if the file gets loaded in the control ok before trying to save?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 6:44 am 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
Yes, your RTF-control loads and shows all files 100% correct. More as 6 Mb big and localized files too.

I can copy the controls content to clipboard, open hidden Wordpads window, paste and save all - and it works fine too.

_________________
My AHK project: http://landvermesser.tripod.com/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2007, 9:25 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 772
Location: Texas, USA
corrupt wrote:
Landvermesser wrote:
Thanks for you great work! I use RTF control in my last project "DupFinder" - http://sven.karsten.googlepages.com/
Can you please add "wrap lines" function?
Thanks :) . I'll add it to the list.

Just to let you know that I too am interested in the "Wrap Lines" feature. I hoping that this won't be a tough one to add.

Keep up the good work!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 31st, 2007, 5:55 am 
Wow. This is the first time I've download functionality for external controls that has actually worked for me. I've been sidetracked on other stuff and am a newbie to ahk again, but I was able to make the control work. It took a little while to figure out why it wasn't working on my system at first, but the scripts were commented well enough that I could figure it out without much of a hassle.
I've been needing the RTF control for a while in a way that I could implement without having to burn out my last remaining brain cells. Thank you much for your work on this project.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2007, 7:31 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
Thanks for the feedback :) . Any suggestions for the next release?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2007, 6:47 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 772
Location: Texas, USA
corrupt wrote:
Thanks for the feedback :) . Any suggestions for the next release?

I would like to use the module to display documentation. The "Wrap Lines" feature is what I'm waiting for.

Keep up the good work! :D


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 106 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: IsNull and 26 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group