bustasnipe Posted November 4, 2015 Posted November 4, 2015 Hello I have been going to this forum regularly for a couple weeks, getting all sorts of good info from you people.So first off thanks, you are all gentlemen/women and scholars.I just wanted to point out that I think it would be neat if you could double click either side of the quotation marks in the Scite editor to select the string of text within. Instead of having to manually select all the text within, which is not hard, but u may sometimes miss a extra character or something. Just like how you can select variables and single words by double clicking. Thanks to all those who have worked on and continue to work on Autoit, I love it.
Developers Jos Posted November 4, 2015 Developers Posted November 4, 2015 The current suggestion I can offer as alternative is to put you caret after the start quotation mark, press Ctrl+Shift and hit the right-arrow till you are at the end quotation mark.The other option probably is to make your own LUA functions that does this for you and assign a shortcut to it.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.
bustasnipe Posted November 4, 2015 Author Posted November 4, 2015 Thanks Jos,The CTRL + Shift then > will go past the quotes if there is no space between the last char and the end quote.Even though this account is almost 6 years old, I only recently started doing anything code related so I will likely not attempt making an lua for a while yet, but I will certainly keep that in mind.All the best, Chris
JohnOne Posted November 4, 2015 Posted November 4, 2015 The CTRL + Shift then > will go past the quotes if there is no space between the last char and the end quote.Does not do that for me. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Developers Jos Posted November 4, 2015 Developers Posted November 4, 2015 (edited) Ok, just for fun:Add the below func to the personalTools.lua in %localappdata\AutoIt v3\SciTE-------------------------------------------------------------------------------- -- demo() LUA script -- to be able to use this script you add the following to your SciTEUSer.properties (without the leading "--"): --#x lua test func --command.name.41.$(au3)=Test --command.mode.41.$(au3)=subsystem:lua,savebefore:no --command.shortcut.41.$(au3)=Ctrl+Shift+F --command.41.$(au3)=InvokeTool PersonalTools.Demo -- -------------------------------------------------------------------------------- function PersonalTools:Demo() editor.SelectionStart = editor.CurrentPos if editor.StyleAt[editor.CurrentPos] == SCE_AU3_STRING then for i = editor.CurrentPos, editor.LineEndPosition[editor:LineFromPosition(editor.CurrentPos)] do if editor.StyleAt[i] ~= SCE_AU3_STRING then editor.SelectionEnd = i-1 break end end end end.. and add the commented lines in your SciTEUser.properties and remove the " --" at the start of the lines.Ctrl+Shift+F will select till the end of a String.Jos Edited November 4, 2015 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.
Developers Jos Posted November 4, 2015 Developers Posted November 4, 2015 This one will find the full string and you can place the caret anywhere in the literal string:function PersonalTools:Demo() editor.SelectionStart = editor.CurrentPos if editor.StyleAt[editor.CurrentPos] == SCE_AU3_STRING then -- find the beginning of the string for i = editor.CurrentPos, editor:PositionFromLine(editor:LineFromPosition(editor.CurrentPos)),-1 do if editor.StyleAt[i] ~= SCE_AU3_STRING then editor.SelectionStart = i+2 break end end -- find the end of the string for i = editor.CurrentPos, editor.LineEndPosition[editor:LineFromPosition(editor.CurrentPos)] do -- Make sure we don't count brackets in strings. if editor.StyleAt[i] ~= SCE_AU3_STRING then editor.SelectionEnd = i-1 break end end end endJos 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.
bustasnipe Posted November 5, 2015 Author Posted November 5, 2015 Jos you're the Boss, this works great, thank you!
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