CyberSlug Posted February 12, 2004 Share Posted February 12, 2004 (edited) I'm in the process of writing/updating some AutoIt enhancements for TextPad.Currently available: One-button (un)comment that lets you comment out a block of code by using the right character based on document class.... I have no idea why TextPad lacks this feature. I also have some older tools such as Emacs-like paren matching and SYN file reloading.I also have a decement adaptation of Larry's intellisense thingy for TextPad/Crimson/Other. (Since HotKeySet functionality has been limited in recent releases of AutoIt, I might have to use a custom AutoIt build, but I'll try to avoid this.)I'll work on this stuff as time permits or until I get bored with it Edited February 13, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
CyberSlug Posted February 13, 2004 Author Share Posted February 13, 2004 (edited) It's like Intellisense for TextPad or Crimson or _yourEditorOfChoice_ CyberSlug's AutoSense 0.1 (12 Feb 2004) DownloadThe zip file contains three files:1) au3Database.txt -- function syntax specs from Jon's autoit_v3.tcl file2) AutoSense.au3 -- the script file3) ParenHotKey.exe -- a custom build of AutoIt based on 3.0.91 sources (which simply allows the left and right parens to be set as hotkeys)Usage:Change the value of $TEXT_EDITOR in AutoSense.au3 to the caption of your text editor. Both TextPad and Crimson seem to work.Drag AutoSense.au3 into ParenHotKey.exe in order to run.Drag AutoSense.au3 a second time in order to terminate.Start typing AutoIt code, and be amazed (Beta version, probably buggy, use at own risk, etc. etc.) Edited February 13, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted February 13, 2004 Share Posted February 13, 2004 Pretty neat. Here's what I would _prefer_ to see, though, and that's tooltips appearing somewhere near the cursor (If possible to detect...). I know the ability to create tooltips isn't available (yet) but since you've already modified a version of AutoIt to use for this, I see no reason why you couldn't have tooltips added to your build. If you're interested in that idea, I'll try to hack something together for you. Link to comment Share on other sites More sharing options...
Valik Posted February 13, 2004 Share Posted February 13, 2004 Found a bug when you type in something like this: StringInStr("test", "test" Then you backspace, it A) doesn't cause the current argument to be in uppercase and; When you start filling in arguments again, a 1 appears in the splash dialog. Also, the script traps all () keypresses and doesn't allow them through to another window. I have had to disable it to make this post. Link to comment Share on other sites More sharing options...
CyberSlug Posted February 13, 2004 Author Share Posted February 13, 2004 (edited) I'll fix the trapping. As far as the other things, the easiest solution is to use use a full-blown key-logger-capabable AutoIt build, which I'd rather not do.... Thanks! And yes, tooltips would be my preference too. If you can implement tooltips, I'd be quite happy. As for cursor detection.... TextPad lets you pass the row and column as parameters to user-defined tools... and with analysis of font size, scrollbar location, it *might* be possible to estimate the positon.... I'm not sure about Crimson or other editors. Well, ControlCommand could work in Notepad. :hmm: Edited February 13, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
CyberSlug Posted February 13, 2004 Author Share Posted February 13, 2004 Also, the script traps all () keypresses and doesn't allow them through to another window. I have had to disable it to make this post.Fixed, I think. Uploaded changes. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted February 13, 2004 Share Posted February 13, 2004 I've been thinking about this idea myself recently. I like Visual Studio's intellisense stuff, it helps me out a lot. I think with the ability to detect the cursor position (The Windows API probably has something for this I can use) and tooltips, emulation of VS's intellisense is possible. Question: What did you change in this build of AutoIt? :: runs off to nose about the API docs :: Link to comment Share on other sites More sharing options...
CyberSlug Posted February 13, 2004 Author Share Posted February 13, 2004 The only change was to sendkeys.cpp: // Don't allow non-modified keys for 0-9 and a-z if ( (vk >= 0x30 && vk <= 0x39) || (vk >= 0x41 && vk <= 0x5A) ) I changed to // Don't allow non-modified keys for 1-8 and a-z if ( (vk > 0x30 && vk < 0x39) || (vk >= 0x41 && vk <= 0x5A) ) And I used the 3.0.91 sources only because it was the latest version I had bothered downloading. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
bcording Posted February 13, 2004 Share Posted February 13, 2004 I know you guys like TextPad, but MED Editor is a much more customizable editor. I'm using 2.73, but 3.0 is just released. MED Editor Link to comment Share on other sites More sharing options...
CyberSlug Posted February 13, 2004 Author Share Posted February 13, 2004 (edited) Hmm, I'm trying MED out right now Not bad, but I'm used to TextPad Okay, list "issues" for AutoSense: 1) What Valik's said about backspace 2) Typing a closing paren inside quotes terminates the syntax window 3) Typing "()" without letting go of shift may result in "(0" 4) Syntax window remains if you minimize or swtich apps 5) It's taking time away from my updating the AutoIt documentation Edited February 13, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
CyberSlug Posted February 14, 2004 Author Share Posted February 14, 2004 Minor update It has Valik's code for obtaining the caret position (keyboard cursor).I'm planning version 0.2 as I write this. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted February 14, 2004 Share Posted February 14, 2004 Minor update It has Valik's code for obtaining the caret position (keyboard cursor).I'm planning version 0.2 as I write this.If Larry's AU3GUI (Or AutoIt) had the ability to set a dialog's background color, you could create your own pseudo-tooltip with the proper color and look and stuff. You're already kind of doing that with the splash window in that version. That seems to be the way other Intellisense stuff is done. Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 14, 2004 Administrators Share Posted February 14, 2004 Minor update It has Valik's code for obtaining the caret position (keyboard cursor).I'm sure a few people have asked for that function. V, can you send me the change. Cheers. Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
CyberSlug Posted February 14, 2004 Author Share Posted February 14, 2004 Before I fall asleep, but here are some ideas for AutoSense 0.2: ini file where you specify thing like: textEditorTitle, typeface, typesize, databaseFile, fileExt, xAdjust, yAdjust I'm thinking of using keyboard buffering, meaning that alphanumeric keypresses would be trapped... Enter would clear the buffer (unless the last buffer character is the underscore character), quotation marks would be kept track of, backspace would work right, and the closing paren would terminate the tooltip thingy. Unfortunately, this would require a custom AutoIt build..... zzzzz Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
CyberSlug Posted February 14, 2004 Author Share Posted February 14, 2004 Valik's continuing to improve his caret and tooltip code, so I'll be using it in the next release which should: 1) Use tooltips and will not emphasize the current parameter 2) Fix bugs with MDI editors and minimized windows 3) Fix bugs when typing parenheses insides quotes Emphasizing the current parameter is rather tricky, so I'll defer that to a later release. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted February 14, 2004 Share Posted February 14, 2004 Valik's continuing to improve his caret and tooltip code, so I'll be using it in the next release which should:1)Â Use tooltips and will not emphasize the current parameter2)Â Fix bugs with MDI editors and minimized windows3)Â Fix bugs when typing parenheses insides quotesEmphasizing the current parameter is rather tricky, so I'll defer that to a later release.The only other thing I can do to the tooltips is add a way to specify the delay. I've looked into allowing something like: 'HotKeySet("key", "function")' but that will be difficult.I may have an idea how to do it, but it won't be with AutoIt and I'm not sure if it will work or not. Link to comment Share on other sites More sharing options...
CyberSlug Posted February 15, 2004 Author Share Posted February 15, 2004 AutoSense 0.1.4 It should be usable.See the ReadMe for details. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted February 15, 2004 Share Posted February 15, 2004 AutoSense 0.1.4Â It should be usable.See the ReadMe for details.Looks really good. I'll be using this next time I work on an AutoIt script.I did notice one thing you didn't mention, when you minimize the editor when a tooltip is displaying, then resume the editor, the only way to get anymore tooltips to display is by typing ')'. It doesn't necessarily have to show a tooltip when you re-open the editor, but it probably should be in a ready state for the next time you type '('. (Pressing ESC will also cancel out and let a new tooltip display the next time you type '(' also). Link to comment Share on other sites More sharing options...
CyberSlug Posted February 15, 2004 Author Share Posted February 15, 2004 (edited) I did notice one thing you didn't mention, when you minimize the editor when a tooltip is displaying, then resume the editor, the only way to get anymore tooltips to display is by typing ')'.I just uploaded a minor fix that prevents *AutoSense* from appearing multiple times in the titlebar.Yeah--nothing gets by you, does it I'll change this in the next version; I still have algorithm tweaking to do.Also, I don't prevent the tooltip from going off screen. Is there anyway to calaulate the tooltip size, or must I just estimate it based on the message? Edited February 15, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted February 15, 2004 Share Posted February 15, 2004 (edited) Tooltip is just a window, you may be able to find it with one of the Win functions. Stay tuned, I'll see if we can...Edit:Yeah, you can use any of AutoIt's window related functions on the tooltip window. Just specify the text the tooltip displays as the title and you should be able to get it.$szText = "This is a test" ToolTip($szText, 0, 0) Sleep(1000) WinMove($szText, "", 100, 100) Sleep(2000) Edited February 15, 2004 by Valik Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now