 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Fri Sep 29, 2006 8:49 pm Post subject: ISense 1.5 |
|
|
ISense
Download
This is command completition and parameter tracking script for AutoHotKey language. It is made to help you edit your code faster, to locate exact parameter position with complex commands (like InputBox), and generaly, provide you help with AutoHotKey without ever leaving your editor.
Features
- Works in every place having keyboard input and generaly can be made to work with any editor around.
- Info window that contains all commands that start with currently typed word part.
- Parameter display and tracking.
- Full help on last typed command.
- Works on already typed sentences.
- Every aspect of script is customizable (colors, transparency, hotkeys ...)
Usage
To make ISense monitoring your input, title of your editor window must have word ".ahk" somewhere and you must press SPACE, TAB or ENTER. After typing 3 letters Info window will be shown. It contains AHK commands starting with letters you typed. If you continue to type Info window will repopulate commands in the list based on the last letters you typed. The list will be returned to previous state when you delete charachters.
While Info window is visible, use arrows, pgup, pgdn, home & end to select the desired command. Press TAB or COMMA, or CLICK to evaluate the selection. If you don't select anything first command in the Info window will be evaluated.
After evaluation the script will change mode to parameter tracking. Current parameter will be shown bold.
To show full help for current command press press CTRL SPACE while tooltip is visible. You can scroll help using arrows, pgup, pgdn, home & end.
To cancel any ISense window at any moment pres ESC, or move around the code.
You can also press CTRL SPACE on any part of any line. ISense will grab that line and try to locate the AHK command and parameter at cursor position. This procedure is editor specific so if it doesn't work with your editor, choose different method or write your own.
Notes
Some editors have custom controls for text editing so some function may not work correctly or not work at all
HIistory
1.5
- IE dll removed and now ISense use IE COM control created by Sean. This magicaly removed all bugs that were present so far, at least from what I can see from first several tests.
1.3 b1
- Setup dialog redesigned and new options added:
- option for title to be monitored (was hardcoded to .ahk)
- option for number of number of letters to type for Info window (was hardcoded to 3)
- options for Help windows dimensions (was hardcoded to 600x400)
- options for fontSize (new)
- better color handling for Tooltip
- all options are instant (no restart required for any of them)
- context sensitive help
- New hotkey CTLL ENTER - zoom help window full screen (works while help window is visible)
1.1
- Added methods for different editors
CONFIRMED EDITORS
Method1 - EditPlus, EmEditor, Programmers NotePad 2, PSPad, Scite, NoteTab
Method2 - Crimson Editor, UltraEdit, SynPlus, Syn, TextPad
Method3 - Notepad, Notepad2, Metapad
Method4 - Notepad++
PARTIALY WORKING
ViM
 _________________

Last edited by majkinetor on Sun Apr 27, 2008 8:06 pm; edited 55 times in total |
|
| Back to top |
|
 |
biotech
Joined: 24 Feb 2006 Posts: 136
|
Posted: Sat Sep 30, 2006 12:49 am Post subject: |
|
|
| looks really cool i will give it a try... thanks |
|
| Back to top |
|
 |
biotech
Joined: 24 Feb 2006 Posts: 136
|
Posted: Sat Sep 30, 2006 12:54 am Post subject: |
|
|
uuu tek sam sad video da si iz beograda!
drago mi je da vidim nekoga iz srbije da koristi ovaj fenomalni skript!
poz |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Sat Sep 30, 2006 12:57 am Post subject: |
|
|
 _________________
 |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6702 Location: France (near Paris)
|
Posted: Sat Sep 30, 2006 8:06 am Post subject: |
|
|
| biotech wrote: | uuu tek sam sad video da si iz beograda!
drago mi je da vidim nekoga iz srbije da koristi ovaj fenomalni skript!
poz | Mmm, obviously, you don't master your keyboard, there was a lot of typos in the message above! Fortunately, Firefox' spell checker corrected it:
usu tech seam sad video ad is biz Beograd's!
dragon mi die ad vi dim endogamy biz bijective ad aphoristic ovate anomalies script!
poss
But I don't understand everything...  _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1715
|
Posted: Sat Sep 30, 2006 9:07 am Post subject: |
|
|
this is working great! i couldn't run many test due to lack of time ... but i love it! _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Sat Sep 30, 2006 11:14 am Post subject: |
|
|
2PhiLho
| Quote: | | dragon mi die ad vi dim endogamy biz bijective |
ROFLMAO
It means:
uuu I just relised you are from belgrade!
I am glad to see somebody from Serbia using this phenomenal script!
greetings _________________
 |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 297 Location: Munich, Germany
|
Posted: Sat Sep 30, 2006 1:17 pm Post subject: |
|
|
| i tried it and seems to work somehow, in notepad and editplus its ok, but in gvim the coordmode, Cartet seems not to work, tooltips are always at 0x0y |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Sat Sep 30, 2006 1:26 pm Post subject: |
|
|
I use A_CaretX/Y to get the position. So if AHK returns that correctly position will be good. Nothing to do on my side... it appears that AHK can not get this value from some editors.
Try to tweek this line also
| Code: | | 15: CoordMode, Caret, screen ; required |
If you can supply script that shows tooltip at current cursor position in vi editor, I can try to take care of it.
| Rajat wrote: | | this is working great! i couldn't run many test due to lack of time ... but i love it! |
Thank you Rajat, I appreciate the time you put in testing. _________________

Last edited by majkinetor on Sat Sep 30, 2006 1:32 pm; edited 2 times in total |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 297 Location: Munich, Germany
|
Posted: Sat Sep 30, 2006 1:30 pm Post subject: |
|
|
i dont understand, your demo-video uses vi or not ? so why it is working for you ?
vi shows current cursorposition as numbers in lower right corner, does this help, seems vi-cursor is no "normal" cursor/caret ? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Sat Sep 30, 2006 1:34 pm Post subject: |
|
|
No, the demo video uses EditPlus.
I don't use vi.
Please supply me the link for the vi veresion you are using and I can try to make it work.
| Quote: |
vi shows current cursorposition as numbers in lower right corner, does this help, seems vi-cursor is no "normal" cursor/caret ? |
This might help, but I doubt it can be accurate since it display position in letters, not pixel coordinates. I can ofcourse get this value, and multiply by letter widith/height, but this is not easy to obtain. I must get the current font from vi, call several API functions to get the width and height and so on... Or you can manualy tweek the value until it is positioned right.
Anyway, if there are other popular editors with problems like this, I might integrate some kind of per editor setup. _________________
 |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 297 Location: Munich, Germany
|
Posted: Sat Sep 30, 2006 1:41 pm Post subject: |
|
|
ok, now i understand, your video looks like vi colorscheme, vi is better in colorhighlighting ahk than editplus does. also in vi you have codecomplete with strg-p (i wondered why you reimplemented that but it only competes things already somewhere in your script but useful for functionname-complete of your own functions.
http://www.vim.org/download.php#pc (gvim7) the new version is quite intuitive with copy and paste etc. was much harder in "real" vi (eg. vim6).
i also used editplus a lot before, but as i do much linux shell i prefer vi now, as its the same editor everywhere. |
|
| Back to top |
|
 |
philou
Joined: 26 Jul 2006 Posts: 49 Location: Wuppertal
|
Posted: Sat Sep 30, 2006 1:54 pm Post subject: |
|
|
This, Sir, is absolutely awesome!
I love it already, thank you for the hours of coding that must have flown into it!  |
|
| Back to top |
|
 |
holomind
Joined: 11 Mar 2006 Posts: 297 Location: Munich, Germany
|
Posted: Sat Sep 30, 2006 2:30 pm Post subject: |
|
|
i have made a modification for editors which dont read A_CaretX correctly, the fallback will be position of mouse. in vi you dont need the mouse anyways so you position your mouse in a convenient position and also have isense, not perfect but more usable than at pos 0,0.
| Code: |
Get_Cursor_x_y()
{
global
cursor_x := A_CaretX
cursor_y := A_CaretY
if cursor_x < 10
{
CoordMode, Mouse, Screen
MouseGetPos,cursor_x,cursor_y
}
cursor_y := cursor_y + 20
}
;----------------------------------------------------------------------------------------------
Info_Show( pTxt )
{
global
local x, y
;get the title of the window we are using
; since the user can switch to another code window in the editor
WinGetTitle, ISense_hostTitle, A
;set the content of the ListBox
GuiControl,, ISense_selection, %pTxt%
if !Info_Visible
{
Info_Visible := true
Get_Cursor_x_y()
GUI %Info_GUI%:Show, x%cursor_x% y%cursor_y% w300 h150 NoActivate , ISense_Info
}
}
;----------------------------------------------------------------------------------------------
;EVENTS: Set parameter mode
;
Isense_ESetParamMode()
{
global
local params
Isense_paramMode := true
params := ISense_aParams%ISense_firstIdx%
StringSplit Isense_aParams, params, `,,
Get_Cursor_x_y()
Tooltip_Show(cursor_x, cursor_y - 30)
}
|
did not touch the other parts.
the function Get_Cursor_x_y() could be optimized. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Sat Sep 30, 2006 2:40 pm Post subject: |
|
|
2 holomind
So, if vi already have integrated, this script shouldn't be used with it, although it certanly behaves different (like full help on command without leaving editor etc..)
I will check out vi editor nevertheless. I used it long time ago in Linux shell but don't work much in Linux OS anymore. It may come handy as open source for our plans for AHK IDE.
About your code, I will mention it in the readme.txt NOTES section for situations like this, if we don't find some better solution in the meantime.
2 philou
Thank you. It will be even better in future when I add user functions and keywords. _________________
 |
|
| 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
|