We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/// <reference path="C:\Users\<user>\AppData\Local\Microsoft\VisualStudio\14.0\Macros\dte.js" /> debugger; dte.SuppressUI = true var objSelection = dte.ActiveDocument.Selection objSelection.StartOfDocument() While(objSelection.FindText("#region", vsFindOptions.vsFindOptionsMatchInHiddenText)) alert ( " found something") Loop objSelection.StartOfDocument() dte.SuppressUI = false
This code gives the error vsFindOptions is undefined. How do we match lines?
My goal here is to run though the active document and collapse any line that has the text "#region" or "function" in the line
Any help appreciated.
Thanks Colin
The text was updated successfully, but these errors were encountered:
vsFindOptions is an enum - there's no equivalent in JScript 3 so you'll need to use named values:
vsFindOptions
enum
var vsFindOptions_MatchInHiddenText = 512; // https://learn.microsoft.com/en-us/dotnet/api/envdte.vsfindoptions?view=visualstudiosdk-2022 do { var findResult = objSelection.FindText("#region", vsFindOptions_MatchInHiddenText ); if( findResult.Etc ) break; } while( true ); // etc
Also, your code as-posted is won't work:
debugger;
IActiveScript
While.. Loop
do { } while( expr ):
while( expr ) { }
alert()
Sorry, something went wrong.
No branches or pull requests
This code gives the error vsFindOptions is undefined. How do we match lines?
My goal here is to run though the active document and collapse any line that has the text "#region" or "function" in the line
Any help appreciated.
Thanks
Colin
The text was updated successfully, but these errors were encountered: