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 

IntelliSense III
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sat Nov 20, 2004 12:44 pm    Post subject: IntelliSense III Reply with quote

IntelliSense III
(I've re-used the old thread instead of starting a new one, so the initial posts are in response to Intellisense II)

Features:
While you start typing a command, it displays the full command name, and if you press Tab then it completes the command with proper case and displays its parameter help. And if you continue to keep typing and don't press Tab, it still displays the command parameter help when you press comma or space just after the command name.






Though its ready to be run as-is, you can edit the topmost (configuration) section of script to your needs, then just start typing ahk commands in your editor.
Escape and Enter clear the tooltip and the seeking starts afresh.

It'll be useful for newbies... but experienced users who often load up the help just to look up the cmd syntax (I do) will also benefit.

Download


Here's a part of a script that you can edit to support your favourite editor and put in a Timer of your all time running script, so that you don't have to remember to run IntelliSense whenever you start ahk scripting. (Requires 'DetectHiddenWindows, On')
Code:

;launches/closes IntelliSense
WinGetTitle, ATitle, A
IfInString, ATitle, PSPad - [
IfInString, ATitle, .ahk
IfWinNotExist, IntelliSense.ahk - AutoHotkey
{
   Run, E:\dos\batch\IntelliSense.ahk
   ;Run, E:\dos\batch\IntelliType.ahk
   WinGet, SWID, ID, %ATitle%
}

IfWinNotExist, ahk_id %SWID%
IfWinExist, IntelliSense.ahk - AutoHotkey
{
   WinClose, IntelliSense.ahk - AutoHotkey
   WinClose, IntelliType.ahk - AutoHotkey
}


Old versions:
IntelliSense I (obsolete) tracked a command while it was typed and offered to type a match with all its default parameters for u.

IntelliSense II showed the complete syntax applicable to the command you've just typed. AHK's default installation carries this script in its Extras folder and also in its Script Showcase.
_________________


Last edited by Rajat on Sun Aug 20, 2006 8:33 am; edited 7 times in total
Back to top
View user's profile Send private message
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Sat Nov 20, 2004 4:43 pm    Post subject: Reply with quote

Thanks, that's very helpful. I also find myself having to search through the help guide to check each commands syntax.
Back to top
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Nov 20, 2004 5:15 pm    Post subject: Reply with quote

Wow. Thanks. This is very similar to what AHK Editor does, but more often than not I'm using my familiar EditPad, and need to be reminded of a particular parameter's position. Thanks for sharing this! Wink
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Nov 20, 2004 5:16 pm    Post subject: Reply with quote

Quote:
that does what other 'Intellisense-Included' code editors do.... it just shows the complete syntax applicable to the command you've just typed.

Note to self: RTFM. Embarassed
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Sun Nov 21, 2004 12:06 am    Post subject: Reply with quote

Another great script, Rajat. Since its usefulness is on par with your context-sensitive help script, I will put it in the showcase and reference it in the FAQ. If you want to make any revisions or add more of a description at the top, feel free to do so and mail me the new version. Otherwise, I'll just use the version posted above.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sun Nov 21, 2004 2:57 pm    Post subject: Reply with quote

thanx for the positive response guyz!

Chris, if there's something else that would improve the functioning which you or somebody else suggests, then i can add it... otherwise i think that the script's okay as it is.
_________________
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sun Nov 21, 2004 3:10 pm    Post subject: Reply with quote

and btw i'm thinking about replacing the cmd autocomplete script that accompanies textpad syntax installation script, with this one... what say?
_________________
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Sun Nov 21, 2004 5:39 pm    Post subject: Reply with quote

Although I don't use TextPad or auto-complete currently (though I will probably start using the new one you posted above), I imagine it would be an improvement for most TextPad users.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Mon Nov 22, 2004 1:44 pm    Post subject: Reply with quote

I've made some changes:
-The tooltip shows below now instead of at top, this is to take care of help for commands that take more than one line (like loops)
-Now the directives which don't have any parameters also show help, which is to show that they in fact don't accept any parameters.
-Multiline commands don't show messed up now.
-A bug in the code fixed that prevented correct help to be shown for commands like 'WinGetPos'

Note: As the matching is done with the first word of every command, the loops all show the same help.
_________________
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Mon Nov 22, 2004 2:57 pm    Post subject: Reply with quote

@ Rajat
Quick one: would it make sense to include the download link within your signature (maybe create a hotkey for that task to include such a link while you post your statement/reply) ?!

JM2C & thx.

Wink
Back to top
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Nov 24, 2004 2:45 pm    Post subject: Reply with quote

I've added a feature that i think completes the script. After you see the syntax help, if you need details on that cmd then press Ctrl+F1 to show ahk help on that cmd. Sort of like context-sensitive help but this works even when you're writing any of the parameters of the cmd and doesn't require your cursor to be in the cmd word.

by the way i use this code in my 24/7 script in a timer that's always running:
Code:

;launches/closes IntelliSense
WinGetActiveTitle, ATitle
IfInString, ATitle, TextPad - [
        IfWinNotExist, IntelliSense.ahk - AutoHotkey
                Run, E:\batch\IntelliSense.ahk

IfWinNotExist, TextPad - [
        IfWinExist, IntelliSense.ahk - AutoHotkey
                WinClose, IntelliSense.ahk - AutoHotkey


so now i don't need to remember to run the script every time i get to coding. requires 'SetTitleMatchMode, 2' and 'DetectHiddenWindows, On
'.

I hope Chris didn't start to work on 'embellishing' the script for posting in the showcase... otherwise i have just made his work difficult.
_________________


Last edited by Rajat on Sat Nov 27, 2004 11:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Nov 24, 2004 2:46 pm    Post subject: Reply with quote

Quote:
Quick one: would it make sense to include the download link within your signature (maybe create a hotkey for that task to include such a link while you post your statement/reply) ?!

I'm afraid i didn't fully understand it... please explain a little....
_________________
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Wed Nov 24, 2004 2:50 pm    Post subject: Reply with quote

Instead of: There's always just one more bug. (which is currently part of your forum signature) use a download link the the program/script/update you announce at that post ...

Maybe the idea is stupid and not just the way I descripe it Shocked
Back to top
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Nov 24, 2004 6:26 pm    Post subject: Reply with quote

Quote:
Instead of: There's always just one more bug. (which is currently part of your forum signature) use a download link the the program/script/update you announce at that post ...

as i see it, there's just one thing i'm offering for download... sgui, and there's a separate link for it. well ofcourse i'm not counting the .ico files for the aquarium or other misc stuff..

and i'm changing my sign too... i can see it gettin' stale.
_________________
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Wed Nov 24, 2004 7:16 pm    Post subject: Reply with quote

Quote:
I hope Chris didn't start to work on 'embellishing' the script for posting in the showcase... otherwise i have just made his work difficult.
Not yet, and even if I had it's not too hard to add things, especially nice things like the context sensitive help. Thanks.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
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