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 

ISense 1.5.4
Goto page Previous  1, 2, 3 ... 14, 15, 16, 17, 18, 19  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
J_P
Guest





PostPosted: Thu May 29, 2008 8:51 pm    Post subject: three issues I found Reply with quote

In testing with crimson and textpad I found the following issues:

--1] cannot use the Isense more than once per line of code. Any attempt to use it a second time removes all preceding code in that line. I expected it would stop backtracking once it hits a preceding space.

--2] cannot scroll down in the list with the mouse. once the mouse leaves the scroll bar, the window collapses making selection impossible.

--3] cannot point to ASP help file. I tried to name my target file with the ahk name, and it finds it, but Isense can't read it. Throws an error message.

--4] sometimes Isense hangs. If I forget to hit escape before second attempt of usage, then Isense fails and must be reloaded.


Hope this helps
Back to top
CannedCheese



Joined: 22 May 2008
Posts: 66

PostPosted: Thu May 29, 2008 9:17 pm    Post subject: Reply with quote

This program is awesome. I can't think of a better AHK script.

Now, on with my trouble: I'm having some problems getting it to work with PSPad (latest version). I'm trying to tweak method 1. If I can't fix the method, I'm willing to switch editors. I really want to use ISense.

The AutoComplete works great, and tips pop up as I type commands. Once I've hit escape to close the window, Ctrl-Space highlights the text but then appears to be attempting to access improper control.

(it tries to access TPSSynEdit1 when it should be accessing TPSSynEdit5 - or TPSSynEdit4 or whatever). Even if I spy what I think is the proper control [TPSSyncEdit5, etc.], none of the control text is typically readable.

I'm new to controls and all this stuff, so I'd appreciate it if anyone who has gotten the latest version of PSPad to work with the ISense would let me know.

If I should just dump PSPad and use a different editor, I'll do this as well.
Back to top
View user's profile Send private message
freakkk



Joined: 29 Jul 2005
Posts: 157

PostPosted: Sat May 31, 2008 4:15 pm    Post subject: Reply with quote

J_P wrote:
In testing with crimson and textpad I found the following issues:

1) Please clarify; more than once per line? Do you mean if there are more than one command on a single line- it doesn't evaluate correctly when you hit hotkey? Does the read me file included mention that this should work? (I must have missed it..)

2) I see what you mean; scrollwheel doesn't do anything.. & info window sends the command as soon as its clicked on.. That wouldn't be hard to adjust, but it is currently working as designed. That is a nice idea for improvment-- but in the meantime- I would just try to embrace using the arrows Smile Also- the more you type- the further your results are narrowed down.. (of course..)

3) I believe that getting ISense to work w/ other languages is the overall goal- but it hasn't reached that point yet. Thats cool that you loaded your ASP commands into it-- but as far as getting those to point to help file correctly, it would take some digging around in the inner workings of ISense to work correctly right now.

4) Hmmm... very curious about this one. I can't seem to recreate it.. Question So it happens when info window is showing all your availiable commands that match- & then you hit hotkey? Doesn't seem to do that here...

CannedCheese wrote:
I'm having some problems getting it to work with PSPad (latest version).

Ahhh.. well PSPad happens to be my editor of choice- & since ISense is at this point an extra finger on my hand- maybe I can help! Smile

Save this in editors folder as Method 4.ahk...
Code:
/*
*************************************************************
GetLineMethod4:  Temporarily uses windows clipboard to retrieve text.
                 Used for most editors that '{right}' returns your position to right side of selected text.

  Editors:  PSPad, Notepad2, Crimson, Metapad

*************************************************************
*/

ISense_GetLine()
{
  Static line
   ;select up to the beginning
   Send +{home}
   Sleep 20

   ;get selection
   oldClip := clipboardall
   Send,  +{HOME}
   Send,  ^c
   Sleep, 50
   line := clipboard
   clipboard := oldClip

   ;cancel selection
   Send {RIGHT}
   Sleep 20

   ;return the line
   Return A_EventInfo > 0 ? &line : line
}


Now take a look in ISense.ahk for Isense_EEvaluate() func; look for
Code:
   ;delete typed word
   cntDelete := StrLen(ISense_lastWord) + 1
   if pEndKey = Click
      cntDelete--
   Send, {Backspace %cntDelete%}
Comment it out.. and instead put
Code:
SendInput, ^+{left}

Now when you start your script, use the setup tray option to choose method 4. Let me know if that makes difference Cool
_________________
.o0[ corey ]0o.
Back to top
View user's profile Send private message
CannedCheese



Joined: 22 May 2008
Posts: 66

PostPosted: Sun Jun 01, 2008 10:06 pm    Post subject: Reply with quote

freakkk wrote:


CannedCheese wrote:
I'm having some problems getting it to work with PSPad (latest version).

Ahhh.. well PSPad happens to be my editor of choice- & since ISense is at this point an extra finger on my hand- maybe I can help! Smile

Save this in editors folder as Method 4.ahk...
Code:
/*
*************************************************************
GetLineMethod4:  Temporarily uses windows clipboard to retrieve text.
                 Used for most editors that '{right}' returns your position to right side of selected text.

  Editors:  PSPad, Notepad2, Crimson, Metapad

*************************************************************
*/

ISense_GetLine()
{
  Static line
   ;select up to the beginning
   Send +{home}
   Sleep 20

   ;get selection
   oldClip := clipboardall
   Send,  +{HOME}
   Send,  ^c
   Sleep, 50
   line := clipboard
   clipboard := oldClip

   ;cancel selection
   Send {RIGHT}
   Sleep 20

   ;return the line
   Return A_EventInfo > 0 ? &line : line
}


Now take a look in ISense.ahk for Isense_EEvaluate() func; look for
Code:
   ;delete typed word
   cntDelete := StrLen(ISense_lastWord) + 1
   if pEndKey = Click
      cntDelete--
   Send, {Backspace %cntDelete%}
Comment it out.. and instead put
Code:
SendInput, ^+{left}

Now when you start your script, use the setup tray option to choose method 4. Let me know if that makes difference Cool


Thanks for the help. I added your method4, commented out the text in Isense.ahk, and am still having some problems. I actually set a global variable in Method 4 called PSPadMethod (:= TRUE) and then put an if in the ISense.ahk so that I can use this with other editors (if I'm using Method 1-3).

Still, I'm having the same problem that I was having when using method 1. If I hit <tab>, <space>, or <enter> and then type something like "RUN" it will bring up the menu of autocomplete commands correctly. For some reason control-space isn't working correctly and doesn't even seem to be calling the function Isense_EEvaluate(pEndKey) at all.

I'm worried that PSPad's hotkeys could conflict with ISense's, yet keymap.ini is nowhere to be found (its supposed to be in the root pspad directories). Still, I don't think that this is a conflict problem (i've remapped it in ISense). Maybe I'll need to delve into the ISense code a bit more. I'm guessing that a different part of the code (that is invoked with the Control-Space hotkey combo) may also need to be changed?

Out of curiosity, what version of PSPad are you using? I'm on 4.5.3 (2298) 11/28/07.
Back to top
View user's profile Send private message
J_P
Guest





PostPosted: Fri Jun 06, 2008 3:18 am    Post subject: Reply with quote

freakkk wrote:
J_P wrote:
In testing with crimson and textpad I found the following issues:

1) Please clarify; more than once per line? Do you mean if there are more than one command on a single line- it doesn't evaluate correctly when you hit hotkey? Does the read me file included mention that this should work? (I must have missed it..)


It should work on any word in any line.

Quote:
2) I see what you mean; scrollwheel doesn't do anything.. & info window sends the command as soon as its clicked on.. That wouldn't be hard to adjust, but it is currently working as designed. That is a nice idea for improvment-- but in the meantime- I would just try to embrace using the arrows Smile Also- the more you type- the further your results are narrowed down.. (of course..)


If it is not hard to adjust then please offer a solution Smile

Quote:
3) I believe that getting ISense to work w/ other languages is the overall goal- but it hasn't reached that point yet. Thats cool that you loaded your ASP commands into it-- but as far as getting those to point to help file correctly, it would take some digging around in the inner workings of ISense to work correctly right now.


The challenge appears to tell Isense how to move into help file. I couldn't find the code section which points into the help file to enable searching for keyword.


Quote:
4) Hmmm... very curious about this one. I can't seem to recreate it.. Question So it happens when info window is showing all your availiable commands that match- & then you hit hotkey? Doesn't seem to do that here...



I'll try to find a more specific example, but in case it matters this was done in Textpad.
Back to top
vixay



Joined: 12 Jun 2008
Posts: 19

PostPosted: Tue Jun 17, 2008 10:04 am    Post subject: Reply with quote

How do you search for help for a particular command?
If i have the command typed already and selected is there a hotkey i can press to get the relevant help in the popup floating window (which is really cool!)

Currently i have to run both ContextSensitiveHelp.ahk and isense.ahk. Can i just add #include ContextSenstiiveHlp.ahk? or is there a better way ? (i'd rather use the floating window).
Back to top
View user's profile Send private message
vixay



Joined: 12 Jun 2008
Posts: 19

PostPosted: Tue Jun 17, 2008 10:56 am    Post subject: Reply with quote

Ok I Got it myself

Copy and save the following file in the Isense\Includes directory (save it as ContextSensitiveHelp.ahk)
Modify Isense.ahk and add this to the bottom line:

#include includes\ContextSensitiveHelp.ahk

Done!

Now when you highlight a word and press F1 you should get a separate window showing details. If you press Alt+F1 you will get a tooltip showing help, though I have found the tooltip version to be not as reliable as seperate window... i guess it doesn't use the index?
For e.g. Try A_CaretX (F1 will show, Alt+F1 won't)

You can also use the tooltip version, but it doesn't display in the correct position.

Finally now i have one script for all of AHK docs reference Smile.
I use this in Notepad++

I bet you could get better integration rather than this hackjob attempt!

Code:

; Context Sensitive Help in Any Editor -- by Rajat
; modified by Vixay Xavier
; http://www.autohotkey.com
; This script makes Ctrl+2 (or another hotkey of your choice) show the help file
; page for the selected AutoHotkey command or keyword. If nothing is selected,
; the command name will be extracted from the beginning of the current line.

; The hotkey below uses the clipboard to provide compatibility with the maximum
; number of editors (since ControlGet doesn't work with most advanced editors).
; It restores the original clipboard contents afterward, but as plain text,
; which seems better than nothing.

F1::
;$^2::
; The following values are in effect only for the duration of this hotkey thread.
; Therefore, there is no need to change them back to their original values
; because that is done automatically when the thread ends:

;showHelp(GetCurrentHighlightedCommand(),false) ;show tooltip window - doesn't show up in correct position
showHelp(GetCurrentHighlightedCommand(),true) ;show seperate window
return

!F1::
showHelp(GetCurrentHighlightedCommand(),false) ;show tooltip window - doesn't show up in correct position
return

GetCurrentHighlightedCommand()
{
if A_OSType = WIN32_WINDOWS  ; Windows 9x
   Sleep, 500  ; Give time for the user to release the key.

C_ClipboardPrev = %clipboard%
clipboard =
; Use the highlighted word if there is one (since sometimes the user might
; intentionally highlight something that isn't a command):
Send, ^c
ClipWait, 0.1
if ErrorLevel <> 0
{
   ; Get the entire line because editors treat cursor navigation keys differently:
   Send, {home}+{end}^c
   ClipWait, 0.2
   if ErrorLevel <> 0  ; Rare, so no error is reported.
   {
      clipboard = %C_ClipboardPrev%
      return
   }
}
C_Cmd = %clipboard%  ; This will trim leading and trailing tabs & spaces.
clipboard = %C_ClipboardPrev%  ; Restore the original clipboard for the user.
Loop, parse, C_Cmd, %A_Space%`,  ; The first space or comma is the end of the command.
{
   C_Cmd = %A_LoopField%
   break ; i.e. we only need one interation.
}
Return C_Cmd
}

ShowHelp(C_Cmd, separateWindow)
{
;SetWinDelay 10
;SetKeyDelay 0
;AutoTrim, On
if separateWindow
{
   IfWinNotExist, AutoHotkey Help
   {
      ; Determine AutoHotkey's location:
      RegRead, ahk_dir, HKEY_LOCAL_MACHINE, SOFTWARE\AutoHotkey, InstallDir
      if ErrorLevel  ; Not found, so look for it in some other common locations.
      {
         if A_AhkPath
            SplitPath, A_AhkPath,, ahk_dir
         else IfExist ..\..\AutoHotkey.chm
            ahk_dir = ..\..
         else IfExist %A_ProgramFiles%\AutoHotkey\AutoHotkey.chm
            ahk_dir = %A_ProgramFiles%\AutoHotkey
         else
         {
            MsgBox Could not find the AutoHotkey folder.
            return
         }
      }
      Run %ahk_dir%\AutoHotkey.chm
      WinWait AutoHotkey Help
   }
   ; The above has set the "last found" window which we use below:
   WinActivate
   WinWaitActive
   StringReplace, C_Cmd, C_Cmd, #, {#}
   send, !n{home}+{end}%C_Cmd%{enter}
}
else
{
   ;use ISense Tooltip Help method
   if !ISHelp_Visible
   {
      ;ISHelp_Show( Tooltip_X, Tooltip_Y + 60, C_Cmd )
      ISHelp_Show( A_CaretX + 10, A_CaretY + 30, C_Cmd )
   }   
}
return
}
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Jul 05, 2008 4:14 pm    Post subject: Reply with quote

hi majkinetor, i'm big fan of ISense. but will there be any chance to get affect on functions too? depend on functions.txt so we can add to functions.txt manually. Thanks!
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Sat Jul 05, 2008 4:21 pm    Post subject: Reply with quote

Its already done. You will have it soon I guess (I am not only developer now)
_________________
Back to top
View user's profile Send private message MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Thu Jul 10, 2008 11:52 am    Post subject: Reply with quote

Finally, new great version is out, thx to freakkk who joined the project.
He developed some fantastic updates:

1.5.3
  • SVN and homepage at: http://code.google.com/p/isense-x/
  • Methods are now automatic. Isense automaticaly chooses method based on the editor you run atm (freakkk)
  • Added AHK and user functions (freakkk)
  • ActiveGoTo integration on F1 (freakkk, thx Rajat)



If you have issues, its best to post them via google code issues.



To Do
- Functions from includes and user variable completition
- Help for user functions (parsing your Natural Docs comments)
- Language independence ....

Cheers Cool
_________________
Back to top
View user's profile Send private message MSN Messenger
J_P
Guest





PostPosted: Thu Jul 10, 2008 4:36 pm    Post subject: Rar file ??? Reply with quote

don't you have a zip format for download ??
Back to top
majkinetor!
Guest





PostPosted: Thu Jul 10, 2008 8:33 pm    Post subject: Reply with quote

no !!
Back to top
JoeSchmoe



Joined: 17 Feb 2008
Posts: 50

PostPosted: Thu Jul 10, 2008 11:42 pm    Post subject: Reply with quote

Thank you so much for this wonderful program. I'm just starting using it, but I am sure that I will find it indispensable.

One quick question. The transparency in the help files make them a little hard to read for me. Is there any way to turn it off?
Back to top
View user's profile Send private message
J_P
Guest





PostPosted: Fri Jul 11, 2008 5:12 am    Post subject: Reply with quote

majkinetor! wrote:
no !!


does anybody have this in a zip format ?
Back to top
Guest






PostPosted: Fri Jul 11, 2008 5:22 am    Post subject: Reply with quote

JoeSchmoe wrote:
The transparency in the help files make them a little hard to read for me. Is there any way to turn it off?
you can change the transparency via settings gui or ini directly. there's a weird icon Laughing at bottom right in the settings gui. majkinetor has put the transparency options behind that weird icon
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 14, 15, 16, 17, 18, 19  Next
Page 15 of 19

 
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