Who "broke" my macro??
-
For years now, I have a little macro that allows me to convert an SQL command to a Visual Basic multiline string and it worked beautifully! The keystroke sequence was
- Home
- Home
- "
- End
- " & vbcrlf & _
- Down Arrow
I would position the cursor at the top and then run to end of file.
<code>
If I position my cursor on a line:
FROM database.dbo.table
with the current version of Notepad++, instead of getting the expected:
“FROM database.dbo.table” & vbcrlf & _
I get
"“FROM datavase.dbo.table” & vbcrlf & _ [vbcrlf ]
. [vbClientBasic]
and the macro STOPS!
</code>How do I turn off this new “feature” and get back my desired behavior??
-
don’t know who broke it but did you check shortcuts.xml?
It has a macro section which should have the steps of your macro.If you can’t figure out how to revert the changes, post the macro.
Cheers
Claudia -
The steps of my macro are in shortcuts.xml:
<Macro name="SQL quoting for VB" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2453" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2453" wParam="0" lParam="0" sParam="" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam='"' /> <Action type="0" message="2306" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2451" wParam="0" lParam="0" sParam="" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam='"' /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="&" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="v" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="b" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="c" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="r" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="l" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="f" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="&" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="_" /> <Action type="0" message="2300" wParam="0" lParam="0" sParam="" /> </Macro>It is when I try to use this macro that a little box appears, apparently questioning my action, that stops the repeated execution of the macro. Notepad++ thinks it knows what I want better than I do! How do I turn this off and allow the macro to repeat until the end of file?
-
the problem happens because of the autocompletion function.
You either can disable it or change your macro with one additional line
(should be placed as second to last line<Action type="0" message="2325" wParam="0" lParam="0" sParam="" />which basically means you would press Esc before Arrow down.
<Macro name="SQL quoting for VB" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2453" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2453" wParam="0" lParam="0" sParam="" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam='"' /> <Action type="0" message="2306" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2451" wParam="0" lParam="0" sParam="" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam='"' /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="&" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="v" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="b" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="c" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="r" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="l" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="f" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="&" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="_" /> <Action type="0" message="2325" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2300" wParam="0" lParam="0" sParam="" /> </Macro>This should do the trick
Cheers
Claudia
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login