AutoHotkey Community

It is currently May 27th, 2012, 10:53 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: April 21st, 2004, 2:01 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
Now TextPad has the added ability to click any command in the script being edited, and press 'Ctrl+2' to launch help directly on that command.

download: http://www.autohotkey.com/download/extr ... extPad.zip

for AHK users not using TextPad, the following script will add that ability to ANY editor, even notepad. this script makes use of the index that is newly added to AHK's help. make sure u've the latest download.
(change path to help file in script)

Code:
SetTitleMatchMode, 2
setkeydelay, 0

$^2::
        IfWinNotActive, .ahk  ;check if the script has .ahk extension.
        {
        send, ^2
        return
        }

        Send, {home}^+{right}^c
        StringReplace, cmd, clipboard, %a_space%,, A
        StringReplace, cmd, cmd, %a_tab%,, A
        StringReplace, cmd, cmd, `,,, A
        ifwinnotexist,AutoHotkey Help,,run, E:\Program Files\AutoHotkey\AutoHotkey.chm
        winactivate, AutoHotkey Help
        winwaitactive, AutoHotkey Help
        send, !n
        ControlSend, Edit1, +{home}{bs}%cmd%{enter}, AutoHotkey Help
return

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Surely...
PostPosted: April 23rd, 2004, 1:27 am 
Offline

Joined: April 22nd, 2004, 10:12 pm
Posts: 21
Location: Manchester, UK
This should be %program files% or something similar near the end?

Regards,

Jon


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 23rd, 2004, 1:54 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
if u mean instead of 'e:\program files' i should've used %programfiles% then it doesn't work for me... but i've already stated that path has to be changed before utilising.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 23rd, 2004, 2:10 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Rajat,
I'll try to include your script in the help file somewhere so that users discover how to enable context senstive help. Nice work!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 23rd, 2004, 5:57 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I've embellished your example and posted it here:
http://www.autohotkey.com/docs/scripts/ ... veHelp.htm

It's referred to in the FAQ and the Edit command. Please let me know if you spot any corrections or improvements.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 23rd, 2004, 9:59 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
oh boy!... u've changed my 1/2 page code to 2 pages!! ... great error handling!!

thanx.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 23rd, 2004, 10:15 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I used a lot of comments. I probably have more comments in my scripts & source than actual code.

Anyway, when the new Control commands become available, we can probably modify this script so that it doesn't use the clipboard.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Seems not to work in VIM
PostPosted: July 31st, 2006, 9:40 am 
Hi,

has anybody this script working in VIM?

Greetings - cherub


Report this post
Top
  
Reply with quote  
 Post subject: thanks, great script!
PostPosted: May 22nd, 2007, 2:15 pm 
Offline

Joined: May 22nd, 2007, 1:29 pm
Posts: 3
got your script working in ultraedit. thanks a lot!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 12:15 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
creed.man,

browse to your Autohotkey inatall folder (probable program files) and look in Extras\Editors\UltraEdit. AHK now comes with a script for configuring many editors for this sort of thing. You may notice tha Rajat's post is quite old, there have been a few improvements since then.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 5:47 am 
Offline

Joined: March 19th, 2007, 12:43 am
Posts: 532
There is a bug though, maybe it's just me, but context help does not dissapear which is a little bit frustraiting. But it's a cool feature after you add it in autorun and remove tray icon, so it's running stealth. :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 24th, 2008, 3:37 pm 
Offline

Joined: May 21st, 2007, 3:44 pm
Posts: 176
Location: USA
Thank you for this script, it is going in my autohotkey.ahk right now.

I added the following line

Code:
sleep, 100 ; added by scott, 2008-07-28, because the controlfocus is being ignored the first time help is invoked
controlfocus, Internet Explorer_Server1, A ; added by scott, 2008-07-24


just before the return at the end of the script. Now when I do Ctl+2 I can immediately scroll the description of the command.

_________________
-------------
Scott Mattes
Image
My small, and slowly growing, collection of scripts.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 50 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