AutoHotkey Community

It is currently May 27th, 2012, 7:41 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 77 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: IntelliSense III
PostPosted: November 20th, 2004, 1:44 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

Image

Image


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.

_________________
Image


Last edited by Rajat on August 20th, 2006, 9:33 am, edited 7 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2004, 5:43 pm 
Offline

Joined: April 28th, 2004, 1:12 pm
Posts: 349
Thanks, that's very helpful. I also find myself having to search through the help guide to check each commands syntax.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2004, 6:15 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2004, 6:16 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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. :oops:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2004, 1:06 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2004, 3:57 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2004, 4:10 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
and btw i'm thinking about replacing the cmd autocomplete script that accompanies textpad syntax installation script, with this one... what say?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 21st, 2004, 6:39 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2004, 2:44 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2004, 3:57 pm 
@ 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:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2004, 3:45 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Last edited by Rajat on November 27th, 2004, 12:42 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2004, 3:46 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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....

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2004, 3:50 pm 
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 :shock:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2004, 7:26 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 24th, 2004, 8:16 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 77 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: nothing and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group