Jump to content

How to add a command to the menu for SciTE?


Recommended Posts

I want to add a command to menu SciTE to run other AU3 code. This is helper code that should just open a window and help me.

I added commands like this

# 35 Simple Snippet Manager
command.35.$(au3)="$(SciteDefaultHome)\..\AutoIt3.exe" "e:\Simple Snippet Manager\SimpleSnippetManager.au3"
command.name.35.$(au3)=Simple Snippet Manager
command.shortcut.35.$(au3)=Alt+C
command.subsystem.35.$(au3)=2
#command.save.before.35.$(au3)=2
command.quiet.35.$(au3)=1

But I had two questions.

1. How to prevent this command from trying to save the current file and not even asking about it?

2. It seems to me that this command launch incorrectly transfers the working directory. For example, I cannot see several resources from the directory ""e:\Simple Snippet Manager\". How can I set the working directory correctly?

Link to post
Share on other sites
  • Developers
2 hours ago, mike2003 said:

1. How to prevent this command from trying to save the current file and not even asking about it?

Helpfile: 

Quote
If command.save.before is set to 1, SciTE automatically saves the file before execution. If it is set to 2, SciTE will not save the file, otherwise SciTE asks you.

So remove the # at the start of that line.

2 hours ago, mike2003 said:

It seems to me that this command launch incorrectly transfers the working directory.

The workdir remains the same when you shell a command like this. Nothing to do with LUA/SciTE and actually is the same story as Run(), only there you can provide the new WorkingDirectory. ;) 
What about you handle that in your SimpleSnippetManager.au3?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

SimpleSnippetManager needs only the ini in the exe's folder. 

The location of the needed folders are defined there. 

This is the example of my SimpleSnippetManager.ini:

[language]
00=BlitzBasic
01=D:\BB3D\IDEal\Snippets\
02=bb
10=AutoIt
11=D:\!myapps\Snippet\Snippets\
12=au3
20=Sdlbas
21=D:\!myapps\Snippet\Snippets\
22=Sdlbas
30=JavaScript
31=D:\!myapps\Snippet\Snippets\
32=js

 

 

This is how i added (just now) the manager to the SciteUser.properties, and it looks like it is running just fine

# 39 Simple Snippet Manager
command.name.39.*=SimpleSnippetManager
command.39.*="D:\!myapps\Snippet\SimpleSnippetManagerX64.exe"
command.save.before.39.*=2
command.subsystem.39.*=2

(the .* allows the tool to be shown in any window, and not only for autoIt files)

Edited by Dan_555
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...