mike2003 Posted July 22, 2021 Share Posted July 22, 2021 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 comment Share on other sites More sharing options...
Developers Jos Posted July 22, 2021 Developers Share Posted July 22, 2021 (edited) 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 July 22, 2021 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 comment Share on other sites More sharing options...
mike2003 Posted July 22, 2021 Author Share Posted July 22, 2021 This is not my script, I took it from here and I would like to provide it with normal working conditions. As with a normal startup. I will run it through another script Start SSM.au3 ShellExecute("SimpleSnippetManager.au3","",@ScriptDir) Link to comment Share on other sites More sharing options...
Developers Jos Posted July 22, 2021 Developers Share Posted July 22, 2021 Or use start with /d in the sciteuser.properties settings. 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 comment Share on other sites More sharing options...
Dan_555 Posted July 22, 2021 Share Posted July 22, 2021 (edited) 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 July 22, 2021 by Dan_555 mike2003 1 Some of my script sourcecode Link to comment Share on other sites More sharing options...
mike2003 Posted July 29, 2021 Author Share Posted July 29, 2021 On 7/22/2021 at 9:15 PM, Jos said: start with /d Not understood. What and where? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 29, 2021 Developers Share Posted July 29, 2021 Had a play and think this is the easiest solution to first change the directory: command.39.*=cd /d "D:\!myapps\Snippet" & "D:\!myapps\Snippet\SimpleSnippetManagerX64.exe" 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 comment Share on other sites More sharing options...
mike2003 Posted July 29, 2021 Author Share Posted July 29, 2021 Ok, but I'm trying to run au3 and it doesn't work. command.36.$(au3)=cd /d "e:\AutoIt my\SSM\" & "$(SciteDefaultHome)\..\AutoIt3.exe" "e:\AutoIt my\SSM\Start SSM.au3 The file cannot be found. Link to comment Share on other sites More sharing options...
mike2003 Posted July 29, 2021 Author Share Posted July 29, 2021 And in general the CD doesn't work. command.36.$(au3)=cd /d "e:\AutoIt my\SSM\" Link to comment Share on other sites More sharing options...
Developers Jos Posted July 29, 2021 Developers Share Posted July 29, 2021 (edited) I need exact info to be able to assist and am bad a guesswork. So simply show me the exact total command that isn't working. As the current post can't be the exact one casting that error. Edited July 29, 2021 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 comment Share on other sites More sharing options...
mike2003 Posted July 29, 2021 Author Share Posted July 29, 2021 2 hours ago, Jos said: exact total command that isn't working 2 hours ago, mike2003 said: command.36.$(au3)=cd /d "e:\AutoIt my\SSM\" & "$(SciteDefaultHome)\..\AutoIt3.exe" "e:\AutoIt my\SSM\Start SSM.au3 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 30, 2021 Developers Share Posted July 30, 2021 (edited) You are missing an end ". command.36.$(au3)=cd /d "e:\AutoIt my\SSM" & "$(SciteDefaultHome)\..\AutoIt3.exe" "e:\AutoIt my\SSM\Start SSM.au3" ... and I also removed the end \ in the cd command, but guess that should work too. Edited July 30, 2021 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 comment Share on other sites More sharing options...
mike2003 Posted July 30, 2021 Author Share Posted July 30, 2021 No, same error. SCITE cant run CD Link to comment Share on other sites More sharing options...
Developers Jos Posted July 30, 2021 Developers Share Posted July 30, 2021 (edited) Just tested with this commandline: command.49.$(au3)=cd /d "c:\temp\" & "$(SciteDefaultHome)\..\AutoIt3.exe" "$(FilePath)" and this test.au3 script: MsgBox(0,"test",@WorkingDir) shows this in SciTE Output: cd /d "c:\temp\" & "C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "D:\Development\AutoIt3\programs\test\test.au3" >Exit code: 0 Time: 1.924 and it shows: ...so seems to be working fine for me. Without the cd part, the msgbox shows: D:\Development\AutoIt3\programs\test as expected. Edited July 30, 2021 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 comment Share on other sites More sharing options...
mike2003 Posted July 30, 2021 Author Share Posted July 30, 2021 without cd Link to comment Share on other sites More sharing options...
Developers Jos Posted July 30, 2021 Developers Share Posted July 30, 2021 (edited) You should put the correct directory in the cd command as you left my example target! When that still doesn't work then post the exact same information as I have done. Jos Edited July 30, 2021 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 comment Share on other sites More sharing options...
mike2003 Posted July 31, 2021 Author Share Posted July 31, 2021 (edited) Of course the directory is correct. I have no more information. It doesn't work that's all. Edited July 31, 2021 by mike2003 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 31, 2021 Developers Share Posted July 31, 2021 (edited) Ok, so try setting the subsystem parameter to 0: command.subsystem.49.$(au3)=0 I have 0 for that shown command which is working for me. Edited July 31, 2021 by Jos mike2003 1 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 comment Share on other sites More sharing options...
mike2003 Posted July 31, 2021 Author Share Posted July 31, 2021 Yes thanks, it works. Link to comment Share on other sites More sharing options...
mike2003 Posted April 30, 2022 Author Share Posted April 30, 2022 (edited) When I run from the menu, SCITE is blocked. How can I avoid this? This interferes a little with the development of the main script Perhaps the picture is not very clear, but all commands are disabled. This is how it should be. Edited April 30, 2022 by mike2003 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