 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
TodWulff
Joined: 29 Dec 2007 Posts: 99
|
Posted: Sat Mar 29, 2008 11:44 pm Post subject: |
|
|
| majkinetor wrote: | Hello Tod.
| Quote: | | Regarding the implementation of supporting other command sets, is this still on the roadmap? |
Currently all my AHK projects are on hold. I don't have time ATM to work on them as I have other responsibiliites. However, you may be able to change ISense as you fit, its kinda hard to make it language independed but to hardcode changes for any particular language isn't that hard. |
Understood. Thanks for taking the time to reply.
I will take the time to thoroughly review the source and see if I can muddle my way through getting ISense tweaked to word with ARMbasic.
In the interim, I presume that there are some fundamental 'required-but-not-supplied' elements that one should possess before embarking on modifying ISense for a language - namely a .chm help file and a database of the language's constructs. Is this indeed the case? If so, is there anything else that is needed beside what I touched on?
Please review and advise. Thanks, kind sir.
-t _________________ When replying, please feel free to address me as Tod or t. My AHK.net site... |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3615 Location: Belgrade
|
Posted: Mon Mar 31, 2008 9:08 am Post subject: |
|
|
That should be it. Project is modularised so you will not have hard time following it. The main functions are in ISense.ahk, others are group per domain, like IE.ahk contains impelementation of inline help.
Note however that one of the desgine limitations of ISense currently is due to the AHK syntax - it is helper for commands, and commands can exist only 1 per line. To have ISense working on single line with multiple commands, it would require more code changes and it may not be trivial. That was one of the goals of next versions. Latest alpha version has function support, and I will see to upload it soon. _________________
 |
|
| Back to top |
|
 |
TodWulff* Guest
|
Posted: Mon Mar 31, 2008 2:35 pm Post subject: |
|
|
Understood. Thanks. Majkinetor.
-t |
|
| Back to top |
|
 |
Jiltdijk
Joined: 04 Sep 2006 Posts: 22
|
Posted: Mon Apr 14, 2008 3:46 pm Post subject: Not sending tab to the screen |
|
|
Dear Majkinetor,
When I use ISense in a table (in MS Word), pressing the tab key results in jumping to the next cell of the table and putting the complete word there. How can I change the code to prevent this form happening? I'm guessing there's an easy way to achieve this, but I can't figure it out.
Thanks for your help
Jilt |
|
| Back to top |
|
 |
freakkk as guest Guest
|
Posted: Mon Apr 14, 2008 4:10 pm Post subject: |
|
|
| try pressing comma once... |
|
| Back to top |
|
 |
infogulch
Joined: 27 Mar 2008 Posts: 114 Location: KC, MO
|
Posted: Fri Apr 18, 2008 4:59 am Post subject: |
|
|
This is amazing. I just started using it, and all I can say is "Wow." Great job majkinetor.
FYI, I believe ISense works in Notepad++, at least partially. Only with Method 3 I think.
"partially" means that after I type the starter key (enter, tab, space) the tip pops up right, and Ctrl + Space brings up the help page correctly, but when I go to an already typed line and hit the hotkey, it doesn't do anything.
It is supposed to bring up the tip manually by hitting the hotkey, right? Or did I read that wrong?
On a seperate note, I think a couple more keys ought to be added to the "enter, tab, space" starter keys. Uparrow and downarrow would be very nice, as well as maybe home. Thanks.
I just checked it in regular notepad, the hotkey does get the current command in the middle of a line manually. So for some reason that part isn't working in Notepad++. Any Help?
Thanks agian. *ThumbsUp* _________________
 |
|
| Back to top |
|
 |
Jiltdijk
Joined: 04 Sep 2006 Posts: 22
|
Posted: Fri Apr 18, 2008 11:13 am Post subject: |
|
|
| infogulch wrote: | On a seperate note, I think a couple more keys ought to be added to the "enter, tab, space" starter keys. Uparrow and downarrow would be very nice, as well as maybe home. Thanks.  |
The thing is, do you want ISense to be active when you push arrow down and arrive in the middle of an other word?
Isn't it possible to check whether after moving with home, end, arrows, etc. you end up in a spot where there is no character left of the cursor and activate ISense then? |
|
| Back to top |
|
 |
infogulch
Joined: 27 Mar 2008 Posts: 114 Location: KC, MO
|
Posted: Fri Apr 18, 2008 4:11 pm Post subject: |
|
|
On lines 402 and 405: | Code: | SendInput, {Backspace %cntDelete%}
;...
SendInput, {Raw} %ISense_selection%,%A_SPACE% | is faster for me than just "Send," and "SendRaw", respectively.
Also, none of the built-in functions activate ISense. Such as:
FileExist(FilePattern)
GetKeyState(KeyName [, "P" or "T"])
StrLen(String)
etc.
Could those be added easily?
@Jiltdijk:
That's true, good idea. Yeah, you wouldn't want ISense starting up in the middle of a string. _________________
 |
|
| Back to top |
|
 |
rogal
Joined: 23 Dec 2007 Posts: 51 Location: Austin
|
Posted: Tue Apr 22, 2008 7:51 am Post subject: |
|
|
Dear majkinetor, grear script as always.
It seems that ISense does not recognize some commands in commands.txt.
It recognizes Win... well (such as WinActivate), but it does not react to "con," although there are bunch of con... words (such as ControlClick) in Commands.txt
Is it only for me or others are experiencing the same thing? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3615 Location: Belgrade
|
Posted: Tue Apr 22, 2008 1:34 pm Post subject: |
|
|
| Quote: | Also, none of the built-in functions activate ISense. Such as:
FileExist(FilePattern)
GetKeyState(KeyName [, "P" or "T"])
StrLen(String)
etc.
Could those be added easily? |
Freakkk implemented built in and user functions in 1.5.1. I will put this version online soon.
2rogal
I don't know how that can happen. Perhaps you can check command array and see if Con commands exist there. Its name is ISense_aCmd. You will have to enable standard menu in ISense_SetMenu() _________________
 |
|
| Back to top |
|
 |
rogal
Joined: 23 Dec 2007 Posts: 51 Location: Austin
|
Posted: Tue Apr 22, 2008 11:31 pm Post subject: |
|
|
| majkinetor wrote: | | I don't know how that can happen. Perhaps you can check command array and see if Con commands exist there. Its name is ISense_aCmd. You will have to enable standard menu in ISense_SetMenu() |
I have found the reason why. I am using different keyboard layout(colemak) from QWERTY, and I don't know why but it is causing the problem. Isense does not properly recognizing keystroke when different keyboard layout is being used. Could you give me a tip to fix it?
Thanks
---------------- Added --------------------------
I have found why. Since in colemak layout, ; key is o, and ; was included in variable endKyes, whenever I press o key Isense stops recognizing the word. After getting rid of ; in endKyes, I think it works fine. Thanks again for this great script! |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3615 Location: Belgrade
|
Posted: Wed Apr 23, 2008 8:46 am Post subject: |
|
|
interesting  _________________
 |
|
| Back to top |
|
 |
rogal
Joined: 23 Dec 2007 Posts: 51 Location: Austin
|
Posted: Wed Apr 23, 2008 9:18 pm Post subject: |
|
|
I have another question. I'm trying to use isense for other languages.
For example, the command.txt is
| Code: | generate [type] newvar[:lblname] =exp [if] [in]
regress depvar [indepvars] [if] [in] [weight] [, options]
replace oldvar =exp [if] [in] [, nopromote] |
and after the initial run, the contents of variables are:
| Code: | ISense_aParams1[38 of 63]: [type] newvar[:lblname] =exp [if] [in]
ISense_aParams2[49 of 63]: depvar [indepvars] [if] [in] [weight] [, options]
ISense_aParams3[35 of 63]: oldvar =exp [if] [in] [, nopromote] |
However, when I input generate, and then regress, then the contents of variables changes:
| Code: | ISense_aParams1[39 of 63]: depvar [indepvars] [if] [in] [weight] [
ISense_aParams2[9 of 63]: options]
ISense_aParams3[35 of 63]: oldvar =exp [if] [in] [, nopromote] |
So the tooltip shows some strange things.
Is it because of processing , in parameters? Could you please let me know I do I fix it?
Thanks,
Joon |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3615 Location: Belgrade
|
Posted: Thu Apr 24, 2008 2:58 pm Post subject: |
|
|
It is currently designed for AHK only in some things. I don't know exactly which one but there aren't many AHK specifics in project siince I wanted it to be language independent from day 0.
You will have to recreate txt reader for sure, as your langague doesn't have the same specification as AHK.
Lang independency is long time in plan and I already started changing the script in that direction. _________________
 |
|
| Back to top |
|
 |
infogulch
Joined: 27 Mar 2008 Posts: 114 Location: KC, MO
|
Posted: Thu Apr 24, 2008 11:32 pm Post subject: |
|
|
| infogulch wrote: | | It is supposed to bring up the tip manually by hitting the hotkey, right? Or did I read that wrong? | I see now. I didn't read that wrong, I misunderstood what the "Method" was about.
So I wrote a method that works with Notepad++:
| Code: | ISense_GetLine()
{
;save and clear the clipboard
oldClip := clipboardall
clipboard := ""
;select, copy, remove selection, and wait for the clipboard to contain the data
Send, +{HOME}^c{Right}
ClipWait, 0, 1 ;This might not be necessary, clearing the clipboard first, either.
;get the clipboard data and reset the clipboard
line := clipboard
clipboard := oldClip
return %line%
} |
It's basically just a combination of two of the other methods. It works great now.
EDIT: The rest of this post isn't very relevant
----------------
Btw, ^+{Left} does nearly the same thing as +{Home}, except it only selects characters up until the next non alpha-numeric character or space.
Now that that works, I noticed something: When you press the hotkey with the caret in the middle of a command, it gives you the list box of commands, even though it's already typed out. So, for example:
| = caret
IfWin|Exist, ahk_ .....
Then if you press the hotkey, ISense reads "IfWin" but not the rest, and the list box comes up. If you accept, ISense makes the line:
IfWinActive, |Exist,
Is this known? If it is, I'll just have to not hit the hotkey in the middle of a line, only the end, or press escape to get out of it.
I came up with an idea for a workaround. If you double-click on a word, it selects the whole thing, so that's what I based this on:
| Code: | ISense_GetLine()
{
MouseGetPos, MouseX, MouseY
;save the clipboard
oldClip := clipboardall
clipboard := ""
CaretX := A_CaretX - 2
CaretY := A_CaretY + 11
MouseMove, CaretX, CaretY, 0
;MsgBox,
Send, {Click, , , 2}+{right}
;MsgBox,
Send, ^c{right}{left}
;MsgBox,
MouseMove, MouseX, MouseY, 0
;reset the clipboard
line := clipboard
clipboard := oldClip
return %line%
} |
It's actually kind of buggy. If you want to see exactly what it's doing when, uncomment the msgbox's, the send is split just for that.
It does break some rules, such as returning the caret to it's previous position. But if you just want to check your syntax against the tooltip, you don't necessiarly want it there anyway. It also doesn't account for different font sizes, so it may not work perfectly without being individually adjusted. (apparently, A_CaretY is at the top point of the caret. And my caret must be about 21 px high)
It definitely isn't useable as-is, but what do you think? _________________

Last edited by infogulch on Mon Apr 28, 2008 4:46 am; edited 1 time in total |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|