Developers Jos Posted May 25, 2004 Developers Posted May 25, 2004 Have updated the http://www.autoitscript.com/fileman/users/jdeb/scite4autoit3.exe with several suggestion Jon made and lots of updates to the SciLexer.dll.Please realize that the current au3.properties and SciteGlobal.properties will be overridden with the default files (after a copy is made to the backup directory). All changes you make to SciTe should be done in the "User Options File".This is the list of all changes made:*** It will now suggest install to Program Files\autoit3\Scite.*** Automatic update the autoit3dir=.... in au3.properties to the correct AutoIt3 directory.*** Installer will make Scite the Program for Right Mouse Click Edit function.*** Optionally make Scite the default Open function instead of Run.*** Updated SciLexer for AutoIt3:1. New folding Logic based on the AutoIt statements instead of indents.2. Added comment-block and Preprocessor-block folding.3. Added a new Style called special which has two keywords: #region #endregion. The lexer will create a new fold on #region and end a fold at #endregion.4. Statement folding will still be done within a #CS - #CE block.*** Added 2 LUA function to show what it is capable of...*** Added a Helpfile that is linked to the Help\Scite Help which has the following topics:1. Introduction2. Getting started with AutoIt33. Editor Fonts/Colors4. Using Tidy5. Scite Documentation6. LAU Functions 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.
CyberSlug Posted May 25, 2004 Posted May 25, 2004 (edited) Let me be the first to say P.S. In the second section of the help file, some of the images are (rather lossy) JPEG instead of PNG. That's my only nitpick Edited May 25, 2004 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!
flyingboz Posted May 26, 2004 Posted May 26, 2004 You have really outdone yourself now... I've been away from autoit for a few weeks, and then buried - What a great editing environment that you and Valik have put together. Your efforts are appreciated, and thank you. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
ezzetabi Posted May 26, 2004 Posted May 26, 2004 If you prefer you can also use .gif, you'll lose some colors but it will appear pretty nice. Avoid .jpg for windows image. Ok? Thanks!
condoman Posted May 26, 2004 Posted May 26, 2004 The implementation of this editor is so good I have switched to using it for AutoIt creation. The addition of the lua was neat also. It certainly is not intuitive by any means. I searched for over an hour and cannot find a list of how lua can interact with the editor. The debug msgbox was not doing what I thought it should and I changed it to:editor:AddText("MsgBox(4096,'debug:' , \"" .. word .. "\" \& '=' \& " .. word .. ") ;### Debug MSGBOX \n" )All the documentation I looked at seemed to go in circles, look at one, it refers to another. None clearly indicated what can be done in the editor. I think the msgbox should be put on the line following the cursor, but I cannot figure out what command does that. Is there any doc available?
condoman Posted May 26, 2004 Posted May 26, 2004 I finaly found a copy of the iface file by downloading the filerx add on. The place that a web search shows this file is not available at Yahoo. Anyway I added the LineDown() and the macro now works like a charm.
Developers Jos Posted May 26, 2004 Author Developers Posted May 26, 2004 (edited) The implementation of this editor is so good I have switched to using it for AutoIt creation. The addition of the lua was neat also. It certainly is not intuitive by any means. I searched for over an hour and cannot find a list of how lua can interact with the editor. The debug msgbox was not doing what I thought it should and I changed it to:All the documentation I looked at seemed to go in circles, look at one, it refers to another. None clearly indicated what can be done in the editor. I think the msgbox should be put on the line following the cursor, but I cannot figure out what command does that. Is there any doc available? The Scite docs added in the helpfile are the standard html files that come with Scite, I only put them in a Helpfile together with the other stuff for convenience..There is no real Documentation for Scite-LUA .. all they have is file called Scintilla.iface which is part of the Scitilla Source code in the dir include. For LUA itself is a pretty good help available at their site.The LUA scripts included were just to demo its functions and get you started.Would be happy to include other script in the installset when they are usefull for everybody... Edited May 26, 2004 by JdeB 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.
Developers Jos Posted May 26, 2004 Author Developers Posted May 26, 2004 I finaly found a copy of the iface file by downloading the filerx add on. The place that a web search shows this file is not available at Yahoo. Anyway I added the LineDown() and the macro now works like a charm. Good suggestion... i have changed it to look like this now: function Debug_MsgBox() from = editor:WordStartPosition(editor.CurrentPos) to = editor:WordEndPosition(editor.CurrentPos) word = editor:textrange(from, to) -- select current word editor:Home() editor:LineDown() editor:AddText("MsgBox(4096,'debug:' , \'" .. word .. "\:' & " .. word .. ");### Debug MSGBOX \n" ) _ALERT("inserted debug msgbox.") end 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.
steve8tch Posted May 26, 2004 Posted May 26, 2004 @JdeB Looks lovely. The one thing I really miss about Crimson editor is the ability to double click a line number to create a bookmark. Is this possible with all the modifications you are making?
Developers Jos Posted May 26, 2004 Author Developers Posted May 26, 2004 @JdeBLooks lovely.The one thing I really miss about Crimson editor is the ability to double click a line number to create a bookmark. Is this possible with all the modifications you are making?Double click is selecting the whole line in Scite.Ctrl+F2 does the Bookmark toggle. TextPad and also Crimson does it the same way.Its something build into the Editor as far as i know and don't think it can be configured. 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.
Josbe Posted May 27, 2004 Posted May 27, 2004 Great Jos! Scite for me, it's the best editor for AutoIt, to date. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Developers Jos Posted May 27, 2004 Author Developers Posted May 27, 2004 Have made to following changes to the setup file:*** Updated Debug LUA Script to insert the msgbox below the line. (see earlier in this thread.)*** Added LUA Manual and Scite-LUA iFACE files to Helpfile for those interested to have a closer look at LUA.*** Updated Gettingstarted page in helpfile with better quality pictures.Interested in just the helpfile update --> http://www.autoitscript.com/fileman/users/jdeb/scite4autoit3.chm 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.
Valik Posted May 27, 2004 Posted May 27, 2004 JdeB, can you keep the source (At least) and SciLexer.dll posted seperately, too? I don't need to download the whole setup package because I use CVS builds of SciTE/Scintilla (Which is why I would like the source available) and have configured the other stuff how I like them as well.
Valik Posted May 27, 2004 Posted May 27, 2004 JdeB, I don't know if you have these or not, but here are 2 Lua functions I wrote (to make posting to the forum easy for myself). One converts tabs to spaces and the other spaces to tabs (Based on the tabsize property). It does the entire document, not what's highlighted or some other range. Here is the code: function ReplaceTabsWithSpaces() s = editor:textrange(0, editor.Length) s, n = string.gsub(s, "\t", string.rep(" ", editor.TabWidth)) editor.TargetStart=0 editor.TargetEnd=editor.Length _ALERT("Converting tabs to spaces: " .. n .. " tabs converted") editor:ReplaceTarget(s) end function ReplaceSpacesWithTabs() s = editor:textrange(0, editor.Length) s, n = string.gsub(s, string.rep(" ", editor.TabWidth), "\t") editor.TargetStart=0 editor.TargetEnd=editor.Length _ALERT("Converting spaces to tabs: " .. n .. " tabs inserted") editor:ReplaceTarget(s) end And the additions to the Tools menu (No shortcut keys and available for all file types): command.name.13.*=Replace Tabs With Spaces command.subsystem.13.*=3 command.13.*=ReplaceTabsWithSpaces command.save.before.13.*=2 command.name.14.*=Replace Spaces With Tabs command.subsystem.14.*=3 command.14.*=ReplaceSpacesWithTabs command.save.before.14.*=2
Developers Jos Posted May 27, 2004 Author Developers Posted May 27, 2004 (edited) JdeB, can you keep the source (At least) and SciLexer.dll posted seperately, too? I don't need to download the whole setup package because I use CVS builds of SciTE/Scintilla (Which is why I would like the source available) and have configured the other stuff how I like them as well.Sure.. http://www.autoitscript.com/fileman/users/jdeb/test/lexau3.cxxWas intending to sent it to Neil at the end of the week when there are no reports of any bugs in the new lexer code... Edited May 27, 2004 by JdeB 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.
Valik Posted May 27, 2004 Posted May 27, 2004 Thanks. Too bad you didn't get it in sooner. Neil is about to release 1.61 soon. After that comes out, he said he will fix the problem with colon's in CallTips. Hopefully by then I'll have gotten a good iface parser written and can get the API file out for Lua.
Developers Jos Posted May 27, 2004 Author Developers Posted May 27, 2004 (edited) JdeB, I don't know if you have these or not, but here are 2 Lua functions I wrote (to make posting to the forum easy for myself). One converts tabs to spaces and the other spaces to tabs (Based on the tabsize property). It does the entire document, not what's highlighted or some other range. Here is the code: function ReplaceTabsWithSpaces() s = editor:textrange(0, editor.Length) s, n = string.gsub(s, "\t", string.rep(" ", editor.TabWidth)) editor.TargetStart=0 editor.TargetEnd=editor.Length _ALERT("Converting tabs to spaces: " .. n .. " tabs converted") editor:ReplaceTarget(s) end function ReplaceSpacesWithTabs() s = editor:textrange(0, editor.Length) s, n = string.gsub(s, string.rep(" ", editor.TabWidth), "\t") editor.TargetStart=0 editor.TargetEnd=editor.Length _ALERT("Converting spaces to tabs: " .. n .. " tabs inserted") editor:ReplaceTarget(s) end And the additions to the Tools menu (No shortcut keys and available for all file types): command.name.13.*=Replace Tabs With Spaces command.subsystem.13.*=3 command.13.*=ReplaceTabsWithSpaces command.save.before.13.*=2 command.name.14.*=Replace Spaces With Tabs command.subsystem.14.*=3 command.14.*=ReplaceSpacesWithTabs command.save.before.14.*=2Maybe is a good plan to compile a list of these function and update the included AutoIt3.LUA in the installset. I don't use it myself since i run Tidy before posting and have that set to space... EDIT: Do you only replace leading TAB/Spaces with these functions? Edited May 27, 2004 by JdeB 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.
Valik Posted May 27, 2004 Posted May 27, 2004 string.gsub is the equivalent to AutoIt's StringReplace() so I assume it replaces every tab it can find no matter where it is. The same holds true for spaces. Any 4 spaces (4 by my settings, it may be higher or lower for different users) are replaced by a tab character.
Developers Jos Posted May 27, 2004 Author Developers Posted May 27, 2004 (edited) string.gsub is the equivalent to AutoIt's StringReplace() so I assume it replaces every tab it can find no matter where it is. The same holds true for spaces. Any 4 spaces (4 by my settings, it may be higher or lower for different users) are replaced by a tab character.... i guess i knew the answer but wanted to give a hint .... Ofcourse i meant to say : shouldn't it only do the leading spaces / tabs because you now have the risk that some of the literals will be screwed up... Edited May 27, 2004 by JdeB 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.
Valik Posted May 27, 2004 Posted May 27, 2004 Well, I never imbed tabs, I use @Tab, so it wasn't something I considered. This was really meant to be just a quick conversion and not something permanent or anything.
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