Jump to content

SCITE EDITOR OPEN NEW TABS OR NEW WINDOW


Go to solution Solved by TheXman,

Recommended Posts

Hi! Can someone help me with this? I upgraded from SciTe Edit Lite to full version. Now every time I edit a script it opens on a new SciTe tab, but I want it opens on a new window like before the upgrade. Can someone help me with that? Thanks!!

Link to post
Share on other sites
  • Solution

In the SciTE main menu:

  1. Click on "Options - > Open User Options File"
  2. In the newly opened SciTEUser.properties file, add (or modify) the following line BELOW the "DO NOT CHANGE" section:
    • check.if.already.open=0
  3.  Save your change.

When you open new .au3 files, from outside the editor, they should now open in a new window.

Link to post
Share on other sites
2 hours ago, TheXman said:

In the SciTE main menu:

  1. Click on "Options - > Open User Options File"
  2. In the newly opened SciTEUser.properties file, add (or modify) the following line BELOW the "DO NOT CHANGE" section:
    • check.if.already.open=0
  3.  Save your change.

When you open new .au3 files, from outside the editor, they should now open in a new window.

What is the "DO NOT CHANGE" section?

I've tried adding check.if.already.open=0 at the end but it didn't work. Here is mi SciTEUser.properties:

 

font.base=font:Verdana,size:10,$(font.override)
font.monospace=font:Courier New,size:10
style.*.32=fore:#D0D0D0,back:#202020,$(font.base)
style.au3.32=style.*.32=$(font.base),back:#202020
caret.line.back=#333333
caret.line.back.alpha=256
caret.fore=#FFFFFF
selection.fore=#C2FFAE
selection.alpha=50
selection.back=#f9f9f9
style.error.0=fore:#FF0000,back:#F0F0F0
style.error.1=fore:#FF0000,back:#FFFF00
style.error.2=fore:#FFFFFF,back:#FF0000
highlight.current.word.colour=#C2FFAE
highlight.current.word.by.style=0
highlight.current.word.minlength=2
style.au3.38=fore:#DADADA,back:#202020
calltips.color.highlight=#e7db74
style.*.33=fore:#DADADA,back:#202020,$(font.base)
fold.margin.colour=#202020
fold.margin.highlight.colour=#333333
fold.back=#333333
style.au3.37=fore:#202020
style.au3.34=fore:#C080C0,back:#202020
style.au3.35=fore:#60A060,italics,back:#202020
style.au3.0=fore:#80C0FF,back:#202020
style.au3.1=fore:#60A060,italics,back:#202020
style.au3.2=fore:#60A060,italics,back:#202020
style.au3.3=fore:#C0FFFF,back:#202020
style.au3.4=fore:#8080FF,back:#202020
style.au3.5=fore:#C080C0,back:#202020
style.au3.6=fore:#A0A000,back:#202020
style.au3.7=fore:#F0E090,back:#202020
style.au3.8=fore:#FF8000,back:#202020
style.au3.9=fore:#D0D0D0,back:#202020
style.au3.10=fore:#A0A0A0,back:#202020
style.au3.11=fore:#8996A8,back:#202020
style.au3.12=fore:#FFAAB7,back:#202020
style.au3.13=fore:#FF80C0,back:#202020
style.au3.14=fore:#993399,back:#202020
style.au3.15=fore:#0080FF,back:#202020
style.au3.16=fore:#0080FF,back:#202020
style.*.32=fore:#D0D0D0,back:#202020,$(font.base)
style.errorlist.0=fore:#F9F9F9
style.errorlist.3=fore:#FF0000
style.errorlist.4=fore:#32FFFF
style.errorlist.10=fore:#FF0000,bold
style.errorlist.11=fore:#EA9515,bold
style.errorlist.12=fore:#E6DB74,bold
style.errorlist.13=fore:#E87400
style.*.32=fore:#D0D0D0,back:#202020,$(font.base)
style.errorlist.32=$(font.base),back:#333333
backup.files=0
proper.case=0
error.inline=1
highlight.current.word=1
highlight.current.word.autoselectword=0
highlight.current.word.wholeword=0
highlight.current.word.matchcase=0
use.tabs=1
indent.size=4
indent.size.*.au3=4
tabsize=4
indicators.alpha=63
calltips.set.above=0
visible.policy.strict=1
visible.policy.lines=0
command.name.19.*=
command.19.beta=
command.name.33.*=
command.33.beta=
openpath.$(au3)=$(SciteDefaultHome)\..\include;C:\Program Files\AutoIt3
check.if.alredy.open=0

Link to post
Share on other sites
  • Developers

This is the property you need to add to SciTE when you do not want to restore the previous session's files:

#restore last session when selecting Open file from Explorer -  Only available in SciTE4AutoIt3 version
save.session.advanced=0

The check.if.alredy.open=0 will run multiple SciTE instances, one per file.

That last section is maintained by SciTECOnfig.au3, so hence that statement, but you can make changes when leaving the format intact.

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
8 minutes ago, Jos said:

This is the property you need to add to SciTE when you do not want to restore the previous session's files:

#restore last session when selecting Open file from Explorer -  Only available in SciTE4AutoIt3 version
save.session.advanced=0

The check.if.alredy.open=0 will run multiple SciTE instances, one per file.

That last section is maintained by SciTECOnfig.au3, so hence that statement, but you can make changes when leaving the format intact.

Jos

Just added save.session.advanced=0 to the SciTEUser.properties but nothing happens. Am I the only one who wants the files open in a new window? Because I didn't find any discussion about that or may be I am not doing the correct research 😏

Link to post
Share on other sites
Posted (edited)
8 hours ago, edubensa said:

I will try to reinstall both autoit and scite and see if the default set open windows instead of tabs.

Now it works!!!

I've reinstalled Autoit, SciTe Editor and deleted the old files, but it opens the files on new tabs again. But now my SciTEUser.properties file is clean.

I added the line check.if.already.open=0 to the SciTEUser.properties and it works!!

Thanks everybody!!

Edited by edubensa
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.

  • Similar Content

    • By BlueSkyMemory
      While Scite doesn't support high dpi, I open it in compatibility settings. But it brings another problem:My au3 app automatically enables high dpi, causing gui disorder.
      I've tried #AutoIt3Wrapper_Res_HiDpi=N but it doesn't work. I'd appreciate it if you could offer some help. Thanks.
    • By BugFix
      When posting scripts to platforms that use different tab settings (e.g. GitHub), they are ripped from their formatting.
      Thus, it is better to replace all tabs with spaces in the correct position before posting. I have created the following Lua script for this purpose. It replaces all tabs with the appropriate number of spaces in the document opened in SciTE. By default a tab width of 4 characters is used. But other values are also possible, details about this and the installation and usage are at the beginning of the script.
      -- TIME_STAMP 2022-05-01 11:28:55 v 0.1 --[[ == Installation == • Store the file to "YOUR-PATH/TabReplaceSciTE.lua" • New entry in your "SciTEUser.properties" (find a free command number, in example is "49" used, and a free shortcut) #49 Replace TAB with spaces command.name.49.*=Replace TAB with spaces command.49.*=dofile "YOUR-PATH/TabReplaceSciTE.lua" command.mode.49.*=subsystem:lua,savebefore:no command.shortcut.49.*=Ctrl+Alt+Shift+R • If your sources has different values for TAB width, you can modify the command call in this script (last line), "TabReplace_FileInSciTE(2)" or "TabReplace_FileInSciTE(8)". Or add a property to your "SciTEUser.properties" to have more flexibility: # The currently used tab.size, which is replaced by spaces # Without this property or with empty value "4" is used. tab.replace.width=2 Then change the last line in this script to: TabReplace_FileInSciTE(props['tab.replace.width']) == Usage == • Open any script. • Hit the shortcut. • In the opened document, all TAB will be replaced by the number of spaces corresponding to the TAB position in the line. ]] ---------------------------------------------------------------------------------------------------- --[[ in...: _line A line of text whose TAB are to be replaced by spaces. .....: _tabsize TAB size in number of characters. If it is omitted, 4 is used. out..: The line, with TAB replaced if necessary, and the number of replacements. ]] ---------------------------------------------------------------------------------------------------- TabReplace_Line = function(_line, _tabsize) if _line:find('^[\r\n]+$') then return _line, 0 end -- only a line break if _line == '' then return _line, 0 end -- only a empty string local posTab = _line:find('\t') if posTab == nil then return _line, 0 end -- no TAB included _tabsize = _tabsize or 4 -- default TAB width local tTab, s, sRep, iLen, sumLen = {}, ' ', '', 0, 0 while posTab ~= nil do -- calculation replacement string, taking into account characters to be inserted iLen = (_tabsize - ((posTab + sumLen -1) % _tabsize)) sumLen = sumLen + iLen -1 -- total length of the replacements sRep = s:rep(iLen) -- create replacement string table.insert(tTab, sRep) -- save to table posTab = _line:find('\t', posTab +1) -- find next TAB end local idx = 0 _line = _line:gsub('\t', function() idx = idx +1 return tTab[idx] end) return _line, idx end ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- --[[ Replaces all TAB in the file currently open in SciTE ]] ---------------------------------------------------------------------------------------------------- TabReplace_FileInSciTE = function(_tabsize) local caret = editor.CurrentPos local fvl = editor.FirstVisibleLine local content = '' if _tabsize == '' then _tabsize = nil end for i=0, editor.LineCount -1 do local line = editor:GetLine(i) line = line or '' line = TabReplace_Line(line, _tabsize) content = content..line end editor:BeginUndoAction() editor:ClearAll() editor:InsertText(0, content) editor:EndUndoAction() editor.CurrentPos = caret editor:SetSel(caret, caret) editor.FirstVisibleLine = fvl end ---------------------------------------------------------------------------------------------------- TabReplace_FileInSciTE(4) -- If required: Change the TAB size here  
      TabReplaceSciTE.lua
    • By mrider
      Greetings all,
      I went looking around for dark themes for SciTE and didn't have much luck.  No wish to necro-post, but I found this post -> A dark theme for SciTE but it seems as if things were ended at a single change for AutoIt where I was hoping for a comprehensive dark theme.  I currently have a dark desktop in Mint where xed, the terminal emulator, vim, and etcetera do an acceptable job of showing the dark theme.  Then I load SciTE and get blinded.  To resolve this, I'm currently working on creating a set of lang.properties files that use the Solarized themes (both light and dark).  The mechanism is simple enough: I wrote a small Perl program which parsed all the properties files and extracted all the distinct color values.  Then I assigned indexes to all the distinct colors, and wrote the colors themselves out to a separate properties file.  Next I parsed that and I used the formula for reducing the color palette to fewer colors as a baseline for generating the Solarized light theme - which turned out surprisingly less awful than I would have guessed.  Next I generated a color theme where all the colors are reversed for the Solarized dark theme.  The result is dark, but the individual source files I look at still need more help (Perl was particularly bad).  At this point, it is possible on my computer to switch to either the Solarized light or dark theme with one line of text in my user options file.
      Now I'm working my way through source-code cleaning up the result.  My first stop is completing Perl, but AutoIt is my next stop.  I'm happy to put the modified files out there for all to use (if you want them).
      I'm willing to do all the legwork for all the properties files.  The problem is that I'm only familiar with some of the languages that SciTE recognizes (for example - I wouldn't know Baan if it bit me on the butt).  I looked all around both the Solarized website and the Scintilla/SciTE website, and I can't find any reference files that can be used to test the colors.  Which means that any language I don't understand will get the colors chosen by the algorithm, which is admittedly fairly rough. 
       
      Which leads me to this post: What would be particularly useful would be code samples in different languages.  The more of the style numbers that are touched in that language the better.  I don't care if the code is "quality" code, I'm more interested in whether the code snip is properly colorized (for some values of "proper").  I understand that nobody is obligated to help me with "my project".  However, I promise that I will do my best with any code snips in any language and I will post the results here.  I'm using xed and vim as my templates, so my results will (mostly) resemble results there.
      I'll post my work here as time progresses, I'll probably have a working version for Perl and AutoIt in the next few days, and I'll do my best with other languages going forward.  As I say, I welcome code snips in any language that SciTE colorizes using a properties file.
       
      Edit1: Attached is the first Solarized Version.  I have only tested this in the default install of SciTE.  I'm certain there are going to be differences between the default install and the full version, but I don't yet know what those differences will be.  To use this:
      Detach the zip file. Drop the folder into your profile directory.  For example: C:\Users\mrider\Solarized . Open your local options file in SciTE (Options -> Open User Options File). Add the line "import Solarized\SolarDark" (without the quotes) to your file. You can turn the dark theme on and off with a comment character (#) at the beginning of the statement. Enable "Solar Light" theme similarly using "import Solarized\SolarLight". As I say, this doesn't work in the full version, so only use this if you are using the basic version.  I'll chase the full version next.
       
      Edit2: Attached is the second Solarized Version.  This works with the full install of SciTe, but so far I've only tested it with Autoit, Batch Files, and Perl.  I'll keep expanding the languages as I go.  To use this:
      Detach the zip file. I had to navigate to "C:\Program Files (x86)\AutoIt3\SciTE" and relax the file permissions to perform the next step. Drop the folder in the SciTE install directory (it doesn't seem to work in one's profile directory). Open your local options file in SciTE (Options -> Open User Options File) - note that this opens the user properties file inside the SciTE directory, not your profile. Add the line "import Solarized\SolarDark" (without the quotes) to your file. You can turn the dark theme on and off with a comment character (#) at the beginning of the statement. Enable "Solar Light" theme similarly using "import Solarized\SolarLight".  
      Solarized_AutoIt_SciTE_version_only.zip
      Solarized_SciTE_Full_Install.zip
    • By AntS
      Help! The mouse clicks I'm sending to a control on a dialog box produce no response.
      The dialog box in question handles advanced display properties. The tab page my script interacts with is created by Trident Microsystems. It allows the user to enhance or attenuate the screen's RGB values. (See image.) My script automates the process of changing these in order to adjust the screen's hue or, when the red, green and blue values are all the same, the brightness.
      Producing a script to change the brightness has been quite straightforward. I use ControlClick() to send a mouse click to one of the trackbars on the right of the tab page. By default, they're linked and so move as one. The difficulty I'm having however is in automating the process when the desired red, green and blue values aren't the same as each other.
      Ordinarily, there are three ways of doing this: 
      (1) clear the Link check box to unlink the three trackbars then either click on each trackbar or drag their sliders,
      (2) clear the Link tick-box then for each colour, click on the corresponding trackbar slider (to select it) then click on a point on the graph, and
      (3) click on the Load button to open an Open dialog box and load a preset (stored as a .gam file).
      However, when ControlClick() is used to clear the Link check box or to push the Load button, nothing happens. Making the dialog box the active window makes no difference.
      The AutoIt Window Info tool indicates that the Reload a Bitmap, Save, Load and Reset buttons, the Link check box and the graph are all the same control. (See other images.) In fact, it there are only four controls on the page: the tab page, which is an instance of a SysTabControl32 class, and the three trackbars, each of which is an instance of the TridentTrackBar class. (Am unsure whether the SysTabControl32 class is a Windows or third-party control.)
      What's the solution?
      Note that the MouseClick() function—as opposed to ControlClick()—does work, but having AutoIt commandeer the screen pointer isn't an acceptable solution.
      For the sake of completeness, here's the relevant code fragment for the Link check box. 
      ;unlink trackbars WinActivate("(Multiple Monitors)") ControlClick("(Multiple Monitors)", "", 12320, "left", 1, 211, 252)  



    • By beautifulsoup
      Hi All,
      I'm not sure if its possible that I'm trying to achieve, I've looked into https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/AutoIt3Wrapper.html and such resources for help, but I cant really find the answer to my question.
      So upon compiling the script in SciTE, the exe file is given a Description under file Properties>Details. I understand, that  one can enter info manually there and it can even implement the version automatically with each compilation.
       
      What I'm trying to achieve is to somehow include the "@ScriptName" in the Details>File Description Field. But as I see no variable can be taken after "#" in this case.
       
      Do You think its achievable? (Win 10)
       
      Much obliged for taking time on reading this.
       
      Kind Regards,
      Brave


×
×
  • Create New...