encoding HTC behaviors with scripting encoder

This question probably doesn't have a solution..
btw a workaround would be magic.
Is there any way to use Microsoft Scripting Encoder (currently in version 1.0)
to encode HTC files aka behaviors developed using a scripting language?
 
adedonatisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

clockwatcherCommented:
Why can't you do it?  I don't have IE5.0 available here, but can't you just set the language to VBScript.Encode and encode your htc files.  Your .HTCs are, of course, going to be IE5 only, and I believe the v5.0 scripting engines included with IE 5.0 should support VBScript.Encode as the language.

I'll try to get to an IE5 installation and test it out.

BTW, 1000 points seems like an awful lot of points for this question.  Was it a mistake?  If it was, you should probably delete it and repost it with a lower point value before someone tries to lock it in.
0
clockwatcherCommented:
Just got around to an IE5 installation and it works no problem.

Simply rename your htc file to an htm.  Run the script encoder on it and rename it back to an htc.

I encoded the following UL.HTC script from MSDN
(http://msdn.microsoft.com/workshop/essentials/versions/IE5behave.asp)

Original script renamed to ul.htm and added encoding flag:

<script language="jscript">
//**Start Encode**

attachEvent("onclick", event_onclick);

function event_onclick()
{
   var i;
   var style;

   if (event.srcElement != element)
      return;

   for (i = 0; i < children.length; i++)
   {
       style = children[i].style;
       if (style.display == "none")
       {
           style.display = "";
       }
       else
       {
           style.display = "none";
       }
   }
}

</script>

Script encoding commands:

  screnc ul.htm ul-encode.htm
  rename ul-encode.htm ul-encode.htc


And here's the final ul-encode.htc:

<script language="JScript.Encode">
//**Start Encode**#@~^zgEAAA==@#@&@#@&mYDlm427nxD`EW      msr13JB~+7+xDmGx1VbmV#I@#@&@#@&0!UmDkGU,+\nUD{Gx1sbmVv#@#@&      @#@&,~P7l.Pbi@#@&,PP7CD,/YHsni@#@&@#@&~P~r6Pc+7nxDRd.12VnhxOPex,+s:xY*@#@&~P,P~PM+O;Mxi@#@&@#@&PP,WGD,`bPxPTI,k~@!,^tbV[.xRsn      oOtp~b_Q*@#@&PP,      @#@&P,P~P,PdOHV+,xP1tk^[.+      $bT /Oz^+I@#@&~P,P~~,k0~ckYzV 9kdaVmXP{',ExKxnJ*@#@&~,PP,~PP@#@&,~~P,P,P~P~dDXs+c[kkwsCHP'~Eri@#@&,~,P~,P)@#@&,P,~P,PnVk+@#@&,PP,~P,      @#@&~~P,P,P~P~~kYzV Nb/2smXPx~rxGxEp@#@&,P,PP,P)@#@&,P~8@#@&N@#@&@#@&I2sAAA==^#~@</script>

And finally here's the page that uses the behavior.

<html>
<head>
<TITLE>UL with Behavior</TITLE>
<STYLE>
..LIST{behavior:url(ul-encode.htc);}
</STYLE>
</head>

<body>
<p>This is an example
  of an expanding/collapsing list
  using DHTML Behaviors

<ul class="LIST" style="cursor: hand;"
  title="Click to toggle the List">
  This is an unordered list
  which has a behavior attached to the ul.
<li> Item 1
<li> Item 2
<li> Item 3
<li> Item 4
</ul>
</BODY>
</html>

Works fine for me with no problems.  BTW as I mentioned earlier, 1000 points is way too high for this question.  If you'd like to delete it and repost a 100 point question for me, that would be fine.  I won't answer the question, so you should be free to delete it, but please don't screw me over by not reposting another question for me.
0
adedonatisAuthor Commented:
Dear clockwatcher this is a 1000 point question because the time can influence the price more than the complexity.
I will make a few tests on your solution and don't worry, If it works u will get 1000 points as deserved.

Thank you.

(BTW: I don't post a lot of questions so I can afford such an expense of points to have a quick answer).

0
adedonatisAuthor Commented:
Dear clockwatcher,

your solution it is excellent.
It is simple but very effective, I should have imagined it, but I didn't.
Please lock the question so I can give u the points.

Thank You.

0
clockwatcherCommented:
Thank you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.