lee321987 Posted January 3, 2010 Share Posted January 3, 2010 I'm trying to create an abbreviation that includes a backslash followed by the letter "t", but when I try to utilize the abbreviation it's inserting a tab in place of these two chars. I guess I need to escape the backslash -- how? Double slashes does not work. TIA Link to comment Share on other sites More sharing options...
Minikori Posted January 3, 2010 Share Posted January 3, 2010 Quite confused at your question, are you saying that in strings it replaces \t with a tab? Like \n does a carriage return? For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
lee321987 Posted January 3, 2010 Author Share Posted January 3, 2010 (edited) @Minikori Yes. This function is described at the top of the file abbrev.properties. No mention of a bypass is made. Edited January 3, 2010 by lee321987 Link to comment Share on other sites More sharing options...
Malkey Posted January 3, 2010 Share Posted January 3, 2010 I'm trying to create an abbreviation that includes a backslash followed by the letter "t", but when I try to utilize the abbreviation it's inserting a tab in place of these two chars. I guess I need to escape the backslash -- how? Double slashes does not work. TIA Note result of example. \t produces a horizontal tab white space; \\t produces \t ConsoleWrite(StringFormat('"\n12\t3\\t4\t5%d\n\n"', 6)) #cs Result is:- " 12 3\t4 56 " #ce Link to comment Share on other sites More sharing options...
lee321987 Posted January 3, 2010 Author Share Posted January 3, 2010 It doesn't work in an abbreviation. Thanks for the effort. Link to comment Share on other sites More sharing options...
martin Posted January 3, 2010 Share Posted January 3, 2010 It doesn't work in an abbreviation.Thanks for the effort.What do you mean by an abreviation? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
lee321987 Posted January 3, 2010 Author Share Posted January 3, 2010 (edited) What do you mean by an abreviation? Into this file: "C:\Program Files\AutoIt3\SciTE\Properties\au3.keywords.abbreviations.properties" I add this entry: snd Into this file: C:\Documents and Settings\<user name>\abbrev.properties I add this entry: snd=SoundPlay("C:\Windows\Media\\tomtom_double.wav", 1)\n| Then in SciTE I type this: snd Immediately upon typing the "d", the entire "snd" turns red in color (indicating it's an abbreviation), I then hit {SPACE] key to activate the abbreviation, but instead of this SoundPlay("C:\Windows\Media\tomtom_double.wav", 1) i get this: SoundPlay("C:\Windows\Media\ omtom_double.wav", 1) (sorry if this is over-explanatory -- I've had a lot of caffine) Edited January 3, 2010 by lee321987 Link to comment Share on other sites More sharing options...
Developers Jos Posted January 3, 2010 Developers Share Posted January 3, 2010 Try using Ctrl+B in stead of space to expand. Think you hit on a bug here in the LUA code. 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...
Developers Jos Posted January 3, 2010 Developers Share Posted January 3, 2010 (edited) Try using Ctrl+B in stead of space to expand. Think you hit on a bug here in the LUA code. Jos Replace the current AutoItTools:Abbreviations Func in AutoItTools.lua with this "simple" func: function AutoItTools:Abbreviations() editor:DeleteBack() scite.MenuCommand(IDM_ABBREV) end This should fix the issue. Edited January 3, 2010 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...
lee321987 Posted January 3, 2010 Author Share Posted January 3, 2010 (edited) @post # 8:Try using Ctrl+B in stead of space to expand.Think you hit on a bug here in the LUA code.JosThat worked.I just had to rewrite it so all the backslashes are escaped (when using {SPACE} to expand it wasn't required)."C:\\Windows\\Media\\tomtom_double.wav" Edited January 4, 2010 by lee321987 Link to comment Share on other sites More sharing options...
lee321987 Posted January 4, 2010 Author Share Posted January 4, 2010 @post # 9: OK, I replaced the AutoItTools:Abbreviations Func, and now it works like it should with space or CTRL+b. Just two things left: 1) In case this helps -- I now have to escape all backslashes (even if I use space to expand). 2) Is it OK for me to leave this Func like this? Thanks for the help. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 4, 2010 Developers Share Posted January 4, 2010 @post # 9:OK, I replaced the AutoItTools:Abbreviations Func, and now it works like it should with space or CTRL+b.Just two things left:1) In case this helps -- I now have to escape all backslashes (even if I use space to expand).2) Is it OK for me to leave this Func like this?Thanks for the help.Yea,this is really the way it should have been to begin with. I tried to rewrite the Ctrl+B function in LUA which was not needed at all as we know now.I will update this for the next release of SciTE4AutoIt3.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...
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