SciTE Jump - Navigate between functions and regions in an AutoIt script

741 posts in this topic

Posted (edited)

After using >SciTE Hopper by Ashalshaikh (with the 2nd version by wakillon) & Melba23 posting >his version, I felt it would be a great learning curve to develop a similar application.

The code was re-written with emphasis entirely on speed. I didn't want to make the GUI flashy as personally I prefer performance with addons, plus I developed this for my own use, so I wanted something that would aid the help of creating code, instead of hindering it.

I would like to extend a big thank you to Ashalshaikh, wakillon & Melba23, especially Melba23 because his ideas and input really helped me to learn a great deal about interacting with SciTE & AutoIt.

The code is released under GPLv3 and supports multiple languages.

10ql3zn.png

fm6vy1.png

Download: http://softwarespot.wordpress.com/code/scite-jump/

Edited by guinness
header127 and oapjr like this

Share this post


Link to post
Share on other sites



Posted

Thank you for this tool!

I have clicked on the titlebar and selected 'Add to SciTE', but I can't find it anywhere in the tools menu (or other menus), and pressing Alt+H just displays the SciTE Help menu.

Share this post


Link to post
Share on other sites

Posted

Did you drop an .au3 onto SciTE? Because this is the only cause I can think of, which is normal.

Share this post


Link to post
Share on other sites

Posted

Yes, I did check after opening a script file in SciTE, but the tool is nowhere to be found in any of the menus.

Share this post


Link to post
Share on other sites

Posted (edited)

Could you please specify the following OS, which version of SciTE4AutoIt3 you're using and check the contents of the file "%USERPROFILE%\SciTE\SciTEUser.properties"

You can also add it manually to SciTE by locating the file above and adding the following >>

# 35 SciTE Jump
command.35.$(au3)="$(SciteDefaultHome)\SciTE Jump\SciTE Jump.exe"
command.name.35.$(au3)=SciTE Jump
command.shortcut.35.$(au3)=Alt+H
command.subsystem.35.$(au3)=2
command.save.before.35.$(au3)=2
command.quiet.35.$(au3)=1

Any problems let me know :mellow:

Edited by guinness

Share this post


Link to post
Share on other sites

Posted

SciTEUser.properties should be located in @UserProfileDir :mellow:

Share this post


Link to post
Share on other sites

Posted

Thanks Jos. It shows that I use a Portable version of AutoIt.

Share this post


Link to post
Share on other sites

Posted (edited)

Update: I will have an update by the end of today. Thanks to Jos & ineedh3lp for pointing out the mistake I made, seems I forgot to take into consideration the different location for an installed version of AutoIt. Edited by guinness

Share this post


Link to post
Share on other sites

Posted

The file you are talking about is located here on my system: C:\Program Files (x86)\AutoIt3\SciTE\SciTEUser.properties and it contains just

# 35 SciTE Jump
command.35.$(au3)="$(SciteDefaultHome)\SciTE Jump\SciTE Jump.exe"
command.name.35.$(au3)=SciTE Jump
command.shortcut.35.$(au3)=Alt+H
command.subsystem.35.$(au3)=2
command.save.before.35.$(au3)=2
command.quiet.35.$(au3)=1

C:\Users\iUser\SciTEUser.properties and C:\Users\iUser\SciTEUser.properties.old are the same but neither contains the above code.

I added it afterwards, and it works. Thank you!

Windows 7 Ultimate x64

Share this post


Link to post
Share on other sites

Posted

Its my fault because I thought SciTEUser.properties was located in the AutoIt folder, not %USERPROFILE% so you can delete the file C:\Program Files (x86)\AutoIt3\SciTE\SciTEUser.properties.

I will update today which will point to @UserProfileDir & "\SciTEUser.properties" for those who have an installed version.

Share this post


Link to post
Share on other sites

Posted

Fixed and re-uploaded. Thanks. :mellow:

Share this post


Link to post
Share on other sites

Posted

I've just updated SciTE Jump with emphasis towards improving the source code. Download is available in the original post.

Changelog:

- ADDED: Update feature, so when you download a new version of SciTE Jump and run the application it will detect if SciTE Jump is on the system and update accordingly. (This does not connect to the Internet.)

- FIXED: Issue with functions not being exported correctly.

- IMPROVED: Checking if using the portable or installed version of AutoIt.

- IMPROVED: Source code with UI tweaks and speed enhancements.

Share this post


Link to post
Share on other sites

Posted (edited)

A quick update that I made today which solved a cosmetic issue when the application was minimised and the tab was changed in SciTE. Just download from the original post & run SciTE Jump. If SciTE is running and SciTE Jump has been installed before then a MsgBox will display asking do you wish to upgrade, select 'Yes' if you want to. Thanks.

- FIXED: Issue with the treeview appearing out of bounds when the application was minimised.

Edited by guinness

Share this post


Link to post
Share on other sites

Posted (edited)

Any idea why I might have no icons displayed in your SciTE Jumper GUI? The two buttons at the GUI bottom (those with a icon in your screen shot) have so far always been empty over here.

- currently using 'SciTE Jump' 1.2.7.11.

- Xp.Pro.32.NL,Sp3

- running desktop in classic mode, but in default XP-mode there also empty.

Did take a quick/little look at the following code.

;; ...
_GUICtrlButton_SetImage(GUICtrlGetHandle(-1), @SystemDir & "shell32.dll", "4") ; Folder Icon.
;; ...
_GUICtrlButton_SetImage(GUICtrlGetHandle(-1), @SystemDir & "shell32.dll", "238") ; Refresh Icon.
;; ...
which returned: ( [0,0] -> [err,ext] )
GUICtrlGetHandle(-1) = 0x007F095C {Pt|Ptr} (8325468) [0,0]
_GUICtrlButton_SetImage(4) = True {Bl} [0,0]
GUICtrlGetHandle(-1) = 0x016D0A1C {Pt|Ptr} (23923228) [0,0]
_GUICtrlButton_SetImage(238) = False {Bl} [-1,-1]
- Icon 238 is however available in the local shell32.dll file.

E:Hopper -> Jump

Edited by MvGulik

Share this post


Link to post
Share on other sites

Posted

OK, just just tried on my very old XP machine and yes you're right they're are not there.

Before people say about it, I do use @SystemDir & "\shell32.dll" so no idea why the backslash is missing in your post MvGulik.

I will have a look further and update in the next couple of days. Thanks.

Share this post


Link to post
Share on other sites

Posted

Very nice addition to SciTE, guinness. I'm still a novice using AutoIt and SciTE and I'm finding that this addition has made it so much easier to navigate through the various scripts that I download to examine. It seems that building onto your code, a great many additional and useful features could be added to the program and I for one, encourage you to continue developement on this program as I'm sure that many will find it very useful.

Thank you for this tool.

Ray

Share this post


Link to post
Share on other sites

Posted

Thanks. I don't know what else I could add? But if you have an idea that please let me know.

Share this post


Link to post
Share on other sites

Posted

May I PM you some ideas that come to my mind later? Some of the things that come to mind actually go beyond the scope of the program as I think you intended it to be used, but building upon the foundation you've build here, I think it could become one of the most useful additions for novice users such as myself. If you'd prefer, I will just post them here despite the criticism I'm sure many will feel inclined to offer since most of the features are available from scripts that others have offered in the past.

The ideas for the additional features I'm thinking of, would probably be considered by the more experienced coders as unnecessary, but then, some of those users tend to forget how lost we novices can get.

The first idea: Let's say that I'm examining an UDF file that another coder has so generously made available to all of us for our use.

1. I decide that I want to add it to my collection of UDFs that are registered with SciTE.

2. I click a button and the following events occur:

a. Entries are made to au3.UserUdfs.properties for each Function in the UDF file.

b. Entries are made to au3.user.calltips.api for each Function in the UDF file.

c. A copy of the UDF file is copied into the user-defined-folder as defined in SciTEUser.properties

As I mentioned above, this goes a little beyond the scope of the script in it's current state of developement but you've created a tool that even a novice coder (me) can see immediate uses for.

Share this post


Link to post
Share on other sites

Posted (edited)

MvGulik,

Just started to have a look at the problem & with in 30 seconds it was solved, I have to use $BS_ICON which doesn't make a blind bit of difference when using Windows 7. Also the second icon should be -240 in Windows XP.

I will have an update in the next couple of days.

Ray,

Like you said this is meandering away from my initial concept of trying to be a simple application as well as scripts that are widely available too. But I will take into consideration your ideas and see which ones I decide to add.

As I mentioned above, this goes a little beyond the scope of the script in it's current state of development but you've created a tool that even a novice coder (me) can see immediate uses for.

Well technically I didn't create the initial concept, but took it to a different level adding various additions. Edited by guinness

Share this post


Link to post
Share on other sites

Posted

I do use @SystemDir & "\shell32.dll" so no idea why the backslash is missing in your post MvGulik.

Yes you are. ... Yep, as expected. Forum-editor is eating them when switching edit-modes. (among other things ...)

Just started to have a look at the problem & with in 30 seconds it was solved, I have to use $BS_ICON which doesn't make a blind bit of difference when using Windows 7. Also the second icon should be -240 in Windows XP.

I will have an update in the next couple of days.

Roger. Thanks for looking into it.

Share this post


Link to post
Share on other sites

Posted (edited)

I've just updated SciTE Jump with emphasis towards improving the source code and fixing reported issues. Download is available in the original post.

Changelog:

- ADDED: Dropping a folder onto the GUI to add to the combobox for searching within files.

- ADDED: x64 version of SciTE Jump.

- FIXED: Issue with the SciTE Jump not closing if SciTE was closed and the application was minimised.

- FIXED: Issue with images not showing on the buttons in Windows XP. (Thanks to MvGulik)

- IMPROVED: The finding in files feature, now it won't read the file until the find input box is empty or the refresh button is selected.

Edited by guinness

Share this post


Link to post
Share on other sites

Posted

This version includes a couple of fixes and a lot of new additions, plus I've organised the source code removing unnecessary functions. Details are available in the original post. Thanks.

Changelog:

- ADDED: Additional lookup for the comments ;<plusspace> and ;<minusspace>.

- ADDED: Change the working directory of SciTE to the directory of the file currently being edited.

- ADDED: Exporting to Latex.

- ADDED: GUI out of bounds check (Thanks to wraithdu)

- ADDED: List unused functions in the export functions feature.

- ADDED: Restart option to the system menu for restarting SciTE Jump and SciTE. The session will be resumed once SciTE has succesfully loaded.

- ADDEd: Right click selection of an item.

- ADDED: Search within the 'finding in files' results to narrow down the search.

- ADDED: Start SciTE if currently not available. (This works if SciTE Jump has been run once when SciTE was open.)

- ADDED: The ability to cancel when finding text inside files.

- FIXED: GUI would be inactive if started with an empty document in SciTE.

- FIXED: Issue with array out of bounds when nothing was found using _FindInFile.

- IMPROVED: Interaction with SciTE.

Share this post


Link to post
Share on other sites

Posted

Brilliant. Thanks AZJIO. About the background request I will have a think about it for the next release.

Share this post


Link to post
Share on other sites

Posted

This version includes a couple of fixes. Thanks.

Changelog:

- FIXED: Issue when searching.

- FIXED: Issue with the refresh button.

- REMOVED: Previous addition of additional 'custom' comments.

Share this post


Link to post
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