Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ISense 1.5.4


  • Please log in to reply
325 replies to this topic
majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
ISense
Intelisense for AutoHotKey



Download                Report Issue
Posted Image
Overview


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


[*:3iar4dxf]Works in every place having keyboard input and generaly can be made to work with any editor around.
[*:3iar4dxf] Info window that contains all commands, AHK and user functions that start with currently typed word part.
[*:3iar4dxf] ActiveGoTo integration (F1)
[*:3iar4dxf] Parameter display and tracking.
[*:3iar4dxf]Full help on last typed command.
[*:3iar4dxf]Works on already typed sentences.
[*:3iar4dxf]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
[*:3iar4dxf] Some editors have custom controls for text editing so some function may not work correctly or not work at all.
[*:3iar4dxf] Before asking for help, make sure you read everything correctly and tried it enough number of times. If you don't get any answer from us, that means that you didn't do something correctly. If you think you found a bug, go to issues section and describe how we can reproduce it for sure leaving enough information about it (editors version, operating system, scenario)[/list]
Posted Image
Posted Image Posted Image
Hiistory
1.5.3
- SVN and homepage. See about box.
- Methods are now automatic. Isense automaticaly chooses method based on the editor you run atm (freakkk)
- Added AHK and user functions (freakkk)
- ActiveGoTo integration (thx Rajat)

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
Notepad, SciTE, Notepad++, EmEditor, Programers Notepad, PSPad, Notepad2, Crimson, Metapad, EditPlus, ConTEXT, UltraEdit-32, SynPlus, Syn

PARTIALY WORKING
ViM

To Do
[*:3iar4dxf] Functions from includes and user variable completition
[*:3iar4dxf] Language independence ....
Posted Image
Posted Image

biotech
  • Members
  • 172 posts
  • Last active: Jan 08 2011 03:16 PM
  • Joined: 23 Feb 2006
looks really cool i will give it a try... thanks

biotech
  • Members
  • 172 posts
  • Last active: Jan 08 2011 03:16 PM
  • Joined: 23 Feb 2006
uuu tek sam sad video da si iz beograda!
drago mi je da vidim nekoga iz srbije da koristi ovaj fenomalni skript!
poz

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
:)
Posted Image

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

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... ;-)
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
this is working great! i couldn't run many test due to lack of time ... but i love it!

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
2PhiLho

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
Posted Image

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006
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

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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
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.


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.
Posted Image

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006
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 ?

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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.

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.
Posted Image

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006
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.

<!-- m -->http://www.vim.org/download.php#pc<!-- m --> (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.

philou
  • Members
  • 68 posts
  • Last active: Jan 04 2011 01:12 PM
  • Joined: 26 Jul 2006
This, Sir, is absolutely awesome!
I love it already, thank you for the hours of coding that must have flown into it! :)

holomind
  • Members
  • 341 posts
  • Last active: Aug 23 2015 03:27 PM
  • Joined: 11 Mar 2006
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.

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.

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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.
Posted Image