Jump to content

*autosense*


CyberSlug
 Share

Recommended Posts

Previous thread

If you ever have trouble remembering the parameters to AutoIt's functions, then try AutoSense latest version *It requires AutoIt 3.0.100* Run script to begin; run again to stop. See later posts for version information.

Recent-ish news:

- AutoComplete support (one implementation, at least)

- option to highlight matching parens in TextPad

- option for capitalization correction

- nested function support

To-do:

- Fix bugs where '9' still somtimes appears instead of '('

- Decide upon a version numbering scheme :whistle:

Tested on "TextPad" and "Notepad" and "Crimson Editor." Change the $TEXT_EDITOR variable as needed.

If you find bugs, let me know; and please include your operating system, text editor, and CPU speed.

Edited 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

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Cool, guys :angry:

The first function I tried was FileWriteLine() .. and it worked like a charm. B)

But then I tried MsgBox(), and it stopped working :evil: Only difference was that MsgBox was indented from the margin. But playing with all sorts of indent didn't make a difference - still stuck :whistle:

Any ideas?

3.0.94.0 (unstable)

NT4 sp6

Link to comment
Share on other sites

Great,

but why is it impossible to stop by clicking on systray icon

By design ?

Its by design. Run the script a second time to close it. Its done this way because the script messes with the editor's window title and that needs reset. The only way to do that is force a "proper" exit.
Link to comment
Share on other sites

But then I tried MsgBox(), and it stopped working  :angry: Only difference was that MsgBox was indented from the margin. But playing with all sorts of indent didn't make a difference - still stuck  :whistle:

I cannot replicate the bug you describe on XP :evil:

- What Text Editor?

- What's your CPU speed?

- Do you only have problems when functions are indented?

Things to try:

- Opt("SendAttachMode", 1) ;default setting was 0 instead

- Press Esc. It clears my "stack" which tracks nested tooltips.

B)

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

but why is it impossible to stop by clicking on systray icon

By design ?

My three reasons:

1) Yep--what Valik said. Restoring the titlebar if $CAPTION <> "". Otherwise, you must save the file or something to "refresh" the text editor's title bar.

2) Prevents multiple AutoSense versoins from running simultaneously. Scripts with the same HotKeySet's can conflict... so prevent this!

3) Allows user to toggle AutoSense with one shortcut/toolbar button--especially if user hides tray icon.

Remove Break(0) if it really bothers you :whistle:

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

I get some oddities, too. I just used the latest version you posted to write a script and noticed several things:

- The "user functions..." tooltip appears for no particular reason (Sometimes when I press ')')

- Tooltips sometimes don't display for something.

- ESC doesn't always clear the tooltip displaying, specifically, it sometimes takes several presses to clear the "user functions" thing.

- Nesting needs some work. Several times I've had a tooltip still display for the outer function when I've already typed both closing parenthesis.

I haven't had an opportunity to take a look at the latest version and see if I can spot why any of the bugs happen, I've been busy with the #include <> "" stuff I mentioned in another thread. When I get a chance, I'll try to find out what bugs I can reproduce and then maybe why it happens.

I will say this, however, I love this script. I can't wait to get the list-box integrated. I really like Visual Studio for a development environment. I have to say, I normally don't like Microsoft's stuff, but VS is one thing I do like. We're slowing bringing some of the things I like about VS into script form so it'll work with any editor, and that is very cool.

I do want to bring something up again that I mentioned a long time ago and didn't get any responses for. What about an "OnTrayClose" event handler? It registers a function to be called when the script is exited via the tray icon. I think its important for some scripts to be able to properly perform cleanup, no matter how it was exited. JP sort of brought this up when he asked why he couldn't tray-icon close this script. Anybody else like the idea?

Link to comment
Share on other sites

Yeah, the stack needs work. The "user functions..." tooltip prevents problems with things like sin( foo( cos( where foo could mess up the tooltip that shows.... I'm not sure why Esc sometimes fails, though.

I, too, remeber remarks about an "OnTrayClose" event handler. It would certainly help!

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

Ey CyberSlug, good script(AutoSense). :lmao:

I tried it, and works fine...

But I want only say:

- When I write a function and put the char "(", the next lines sometimes overwrites the text.(of course, writting fast). I think that would can be the time to analize the function written. B)

- When I close the Editor, the script continues running,

If this is normal, I think that, would be nice display a question after close the Editor, if the user want continue with *AutoSense*. :whistle::angry:

Editor: Crimson

:evil:

Link to comment
Share on other sites

josbe, problems due to typing too fast may be difficult to solve--but the debug version asks to quit AutoSense if you close the Editor :whistle:

Note updates in previous post.

Valik, could you send me a beta of your list-box code?

Edited 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

Note updates in previous post.

Valik, could you send me a beta of your list-box code?

Sure, when I get it to a beta state :whistle: .

Seriously, though, I'll try to send it before the day is over (By end of day, I mean before I go to bed at anywhere between midnight and 2 am). There are a few little quirks I need to work out. I also need to prep it for integration into your script, as both of them are going to use the ESC key for similar things.

Link to comment
Share on other sites

A question..what is purpose for display "Stack tip"?  :whistle:

It's for debugging purposes. Valik said "Nesting needs some work. Several times I've had a tooltip still display for the outer function when I've already typed both closing parenthesis." so I inluded it to help find problems.

I posted a new zip download containing AutoSense0.1.21.au3 which comments out TrayTip.

Note: If you type a function, left-paren, backspace, left-paren again, then AutoSense will interpreted as two separate functions!

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

With many thanks to Valik, I've implemented a version of AutoComplete. It may differ from Valik's vision of AutoCompletition, but I think it's cool:

Type the first few letters of a function name, then hit the Pause key to get a list of matching function names. Select one with the arrow key, then press Enter to have it inserted into your document! Or Press Esc to kill the listBox.

EDIT: See download link in most recent post.

Edited 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

AutoSense 0.2.1 :whistle: Improved!

- After using AutoComplete, the appropriate tooltip appears!

* Option for listBox to show suggestions that match any substring (default) instead of only starting text. Modified the lookup function slightly.

- Misc performance tweaks. ListBox items are removed/added instead of killing and restoring the GUI every invocation.

- Ensure listbox to be visible if it's at the edge of the screen.

- AutoComplete now obeys the capitalization correction setting.

- Bug fix in au3Database.txt (WinActive/WinActivate syntax)

- Other minor fixes.

Edited 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

Thanks to every who has emailed me feedback/modifications.

By the way, autocomplete sends the word directly to the screen instead of displaying a one-item list box if only one match if found. (Thanks to JdeB)

To-do list for "1.0" AutoSense release. should have the following changes:

- small bug fixes: notepad reposition cursor, au3gui unloading, etc.

- "Associate" AutoSense with au3 files. (Thanks to J vdzande)

- mouse support in the listbox--maybe

- option to add the closing paren when you type '(' like the PS Pad editor does

I'm still playing with the idea of making the current function parameter appear as ALL CAPS in the tooltip, but will NOT include this in 1.0

Edited 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...