AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[module] HiEdit 4.0.0.4-5
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12, 13  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Do you want HiEdit internaly
Yes
52%
 52%  [ 37 ]
No, I like Edit control
28%
 28%  [ 20 ]
Other (please explain)
19%
 19%  [ 14 ]
Total Votes : 71

Author Message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Fri Nov 14, 2008 11:01 am    Post subject: Reply with quote

Hej.

No, HiEdit can't do it, and I am not aware of any editor that can do it.

It is certainly a good feature and I am too interested to know the answer.

One interesting thing to note is that it would be possible to implement such editor in AHK, I think Very Happy

The idea is kinda extreme but not that hard to implement:

    1. Instantiate hiedit and set event to monitor text changes.

    2. On any change, grab visible text.

    3. Using defined regular expressions, search that text for it.

    4. If you find that expression, you take literal word you found, add it to the hes file, and set the new hes file again.


This is enough so you can add RE words, but it still will not be enough to highlight sentences, but again, I don't know any editor that can highlight key sentences.

So, this dynamic hes file building may do the trick.

Actually, speaking about it, modern editors are IMO way bellow what should they have been in 2009. I mean, there are 1000 of them and all are similar or pure garbadge. Vim is different tho, but I still wait to see editor that can support things you said, custom highlighting, language-independent regions (vim has this), custom marking, unconnected copy regions, mark saving (vim has it partially), regular expression search and replace with entire text (edit plus has it), independent multi syntax highlighting (some has it for specific languages, like CSS+HTML+JS, but nothing is there for general scenario)
_________________
Back to top
View user's profile Send private message
automaticman



Joined: 27 Oct 2006
Posts: 483

PostPosted: Fri Nov 14, 2008 11:15 am    Post subject: Reply with quote

majkinetor wrote:
No, HiEdit can't do it, and I am not aware of any editor that can do it.

It is certainly a good feature and I am too interested to know the answer...
Btw. EmEditor can do this, but is limited to only 10 regex definitions. Sometimes limitations can be useful and let one concentrate on essential and relevant things/information but it would be great to break this limitation with the help of ahk and maybe also HiEdit.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Fri Nov 14, 2008 3:06 pm    Post subject: Reply with quote

I guess that is primary concern about that thing - Parsing bunch of reg-exps is probably slow if you don't limit the count.

It was pretty bad design idea to hard-code the limit tho. Users with faster computers could allow themselves larger number of RE's, especialy non complex ones... Perhaps you could influence the author to add some configuration flag that will by default be 10.


Also, there are light RE implementations. I have one such library here, and it contains most important subset of PERL RE. Size and speed are priority for such library. Utilising such library in editor project is perhaps the way to go.

Thx for information automaticman, it may come handy one day...
_________________
Back to top
View user's profile Send private message
automaticman



Joined: 27 Oct 2006
Posts: 483

PostPosted: Fri Nov 14, 2008 3:11 pm    Post subject: Reply with quote

majkinetor wrote:
...Thx for information automaticman, it may come handy one day...
At anytime again for geniuses like you, my friend majkinetor.
Back to top
View user's profile Send private message
rulfzid



Joined: 27 Nov 2008
Posts: 62

PostPosted: Mon Dec 01, 2008 8:32 am    Post subject: Reply with quote

It would seem from the hiedit.inc file that drag-and-drop selection/insertion is built-in to the control. And it actually works perfectly well in the hieditdemo.

But unlike the standard cut/copy/paste functions (ctrl-a/c/v/x etc), which "just work" with the HiEdit control, the drag and drop does not.

Is there something I need to be doing to enable this, or is it just a weird thing about the control (in which case i might try to put together a HiEdit analog of this?

Thanks,
rulfzid
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Mon Dec 01, 2008 12:36 pm    Post subject: Reply with quote

I never noticed that because I never use this feature in any editor.
What you say seems right. I don't know why it doesn't work.
_________________
Back to top
View user's profile Send private message
DHMH



Joined: 17 Jul 2008
Posts: 194

PostPosted: Sat Jan 31, 2009 1:21 pm    Post subject: Reply with quote

i used HiEdit and your wrapper in my program "Realtime Browser"

Thank you! Its a great wrapper!
Greets,
DHMH
_________________
Tips & Tricks for Windows XP and Vista... only german! sorry!
German Computerboard
Back to top
View user's profile Send private message Visit poster's website
DHMH



Joined: 17 Jul 2008
Posts: 194

PostPosted: Wed Feb 04, 2009 5:49 pm    Post subject: Reply with quote

Hi majkinetor... Very Happy
Whats with the Function HE_Scroll or HE_LineScroll ? I found that in the Documentation BUT in your HiEdit Wrapper isn't a function called HE_Scroll or HE_LineScroll ... i need this function !
Greets,
DHMH
_________________
Tips & Tricks for Windows XP and Vista... only german! sorry!
German Computerboard
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Wed Feb 04, 2009 6:06 pm    Post subject: Reply with quote

You better change your weed provider Cool

Documentation is generated from the script. Smile
_________________
Back to top
View user's profile Send private message
DHMH



Joined: 17 Jul 2008
Posts: 194

PostPosted: Thu Feb 05, 2009 1:22 pm    Post subject: Reply with quote

oh, i´ve downloaded a newer version now, i had the old version!
Sorry Smile
And thanks for your wrapper!
Greets,
DHMH
_________________
Tips & Tricks for Windows XP and Vista... only german! sorry!
German Computerboard
Back to top
View user's profile Send private message Visit poster's website
soggos



Joined: 27 Mar 2008
Posts: 85
Location: France

PostPosted: Fri Feb 06, 2009 12:45 pm    Post subject: possible to save in RTF like NotePad++ ? Reply with quote

Surprised Hello;
Arrow I discover, and i find that very brilliant!
Question Litttle question: it's possible to save the result in RTF or HTML? (>Like NotePad++ (via plugins>Nppexport>Export To Rtf))Question
_________________
since ahk, all is different!
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Fri Feb 06, 2009 12:57 pm    Post subject: Reply with quote

No.

Its meaningless here, because you don't have any formating options except color. If you want to export colorised text its easy to create script that will consider Keywords.hes and produce html out of input, even rtf altho a bit harder.
_________________
Back to top
View user's profile Send private message
DHMH



Joined: 17 Jul 2008
Posts: 194

PostPosted: Fri Feb 06, 2009 1:34 pm    Post subject: Reply with quote

Hi,
can you help me, please:
this
Code:
~^F::
CmnDlg_Find(hwnd, "searchnow" )
return

SearchNow:
ControlGetText,controltxt,HiEdit1,%sourcename%
Loop,parse,controltxt,`n,`r
{
IfInString,A_LoopField,%CmnDlg_FindWhat%
    {
   line := a_index
   StringGetPos,pos,A_LoopField,%CmnDlg_FindWhat%
   HE_LineScroll(hEdit,pos,line)
   ;HE_ScrollCaret(hEdit)
   break
   }
}
return


don't work Sad
I´ve try to make a search function.
Your function in the example Script _Test.ahk doesn't work Sad
Greets,
DHMH
_________________
Tips & Tricks for Windows XP and Vista... only german! sorry!
German Computerboard
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Fri Feb 06, 2009 1:57 pm    Post subject: Reply with quote

I probably broke it during modifications in CmnDlg .


Ill fix this _Test.ahk problem and repost it.


Thanks for report.
_________________
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4114
Location: Belgrade

PostPosted: Fri Feb 06, 2009 2:58 pm    Post subject: Reply with quote

OK, I fixed that error. Like I said, it was due to the fact that I changed CmnDlg to use dynamic functions instead labels, and didn't change that code in _Test.ahk

CTRL F to search, F3 to search next when you close the find dialog.

All search features work except searching upwards which I didn't implement. After all, this is only preview of features.
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12, 13  Next
Page 9 of 13

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group