Open CGB0 opened 7 years ago
vsFindOptions
is an enum
- there's no equivalent in JScript 3 so you'll need to use named values:
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;
statement isn't supported by IActiveScript
(JScript 3),While.. Loop
structure, in JS it's do { } while( expr ):
or while( expr ) { }
.alert()
function (that's from HTML's DOM, not JScript itself).
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