Archive - March 2011

"It is not enough to have a good mind; the main thing is to use it well"  - Rene Descartes 
 



Index

bar1
Show Time
Change Background Colors Automatically
Frameless Partylight With Text Overlay
Progress Bar
IT Department Text Effect
Basic Text Fade
Install Java Update 6.0.240
The WPL Format
Simple Text Scroller
Pop-up Tooltip Messages
Install IE8
Drag & Drop Files Onto Script
Launch Process in System Account
Party Light For Your Pictures
Enlarge Picture on Hover

Place Online Flash Video into HTA
Basic Text Highlight
Scanning Menu Highlight Effect
Install Print Driver in Windows 7 - no Pop-ups
Install Print Driver in Windows 7
HTA Roll-over Color Change
Print Directory in HTA
Press Button Effect in HTA
Simple Progress Bar in HTA
Read Items into Array from Config File
bar1
    



 
Δ Thursday, March 31st, 2011
bar1
   
      

Δ Show Time
 
How to show time in a popup dialogue box; you could add this to a button


Demo:
demo

Javascript

           

bar1
<script type="text/javascript">
<!--
function showtime1(){
var now = new Date()
var hours = now.getHours()
var minutes = now.getMinutes()
var seconds = now.getSeconds()
var timeValue = " " + (hours > 12 ? hours - 12 : hours)
timeValue += (minutes < 10 ? ":0" : ":") + minutes
timeValue += (seconds < 10 ? ":0" : ":") + seconds
timeValue += (hours >= 12 ? " p.m." : " a.m.")
timerID = setTimeout("showtime1()",1000)

document.title=timeValue //This line displays the time in the title bar

window.status =timeValue // This line displays the time in the status bar

document.clock1.button.value = timeValue // This line displays the button clock in the body section

document.getElementById("clock2").innerHTML = timeValue // This line displays the text clock in the body section

document.getElementById("clock3").innerHTML=timeValue // This line displays the time within a line of text

document.getElementById("bgclock").innerHTML = timeValue

// Delete the display lines you do not require
}

// add onload="showtime1()" to the opening BODY tag

//-->
</script>


<script type="text/javascript">
<!--
function showTime2() {
var now = new Date();
alert("It is now " + now.toLocaleString());
}
//-->
</script>

<form>
<INPUT TYPE="button" VALUE="Show time" onClick="javascript:showTime2()">
</form>
bar1





      
Δ Change Background Colors Automatically
 
How to change your background to cycle through colors; web page effect


Demo:
demo

HTML/Javascript

           

bar1
<HTML>
<HEAD>
<TITLE>Javascript Cycling Background Color</TITLE>
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
<!--
bcolors = new Array("red","green","blue","orange","black", "brown", "yellow")
bgit = -1
bgout = bcolors.length
function colorit(){
if (document.images) {
bgit++
if (bgit == bgout) {
bgit = 0}
document.bgColor=bcolors[bgit]
setTimeout("colorit()", 5 * 100) } }
// -->
</SCRIPT>

<body onload="colorit()">
</body>
</html>
bar1

       





      
Δ Frameless Partylight With Text Overlay
 
How to show animated light with text on top


Demo:
demo

HTML/Javascript

           

bar1
<html>
<body bgcolor=#000000>
</html>

<html>
<HEAD>
<HTA:APPLICATION
ApplicationName="AnimatedPartyLight"
ID = "AnimatedPartyLight"
BORDERSTYLE="normal"
Border="none"
INNERBORDER="no"
SingleInstance="Yes"
WindowsState="normal"
Scroll="No"
Navigable="No"
MaximizeButton="No"
SysMenu="no"
Caption="no"
showInTaskBar="no"
>
</HEAD>

<!-- add a small white.bmp here-->
<BODY onload="init()" background="white.bmp" ID="picture" STYLE="filter:Light;" ALIGN="left" >


<script language="vbscript">
Window.ReSizeTo 125,200
Window.moveTo 100, 100
</script>


<script type="text/javascript">
<!--
function initArray(num) { for (var j=0; j < num; j++) this[j] = 0; }

// try to speed up by pre-calculating sines and cosine values:
var sinLookup = new initArray(360), cosLookup = new initArray(360);

for (var j=0, h; j < 360; j++) {
h = j * Math.PI / 180;
sinLookup[j] = Math.sin(h);
cosLookup[j] = Math.cos(h);
}

var x = new initArray(3), y = new initArray(3); //(x,y) coordinates
var px = new initArray(3), py = new initArray(3); //define center of circles
var angles = new initArray(3); //specify angle that light will be rotated from previous (x,y)

var r, z = 84, w = -1;

function init() {
with (picture) {
width = 125
height = 200
r = width >> 2; // set radii for all circles

//set up centers of the 3 light circles
x[0] = px[0] = width >> 1;// divide by 2...looks cooler and faster ;-)
x[1] = px[1] = width * (1/3);
x[2] = px[2] = width * (2/3);

y[0] = py[0] = height * (1/3);
y[1] = py[1] = height * (2/3);
y[2] = py[2] = height * (2/3);

filters.Light.AddPoint(x[0], y[0], z, 0xFF, 0x00, 0x00, 90);
filters.Light.AddPoint(x[1], y[1], z, 0x00, 0xFF, 0x00, 90);
filters.Light.AddPoint(x[2], y[2], z, 0x00, 0x00, 0xFF, 90);
}

rotateCircles();
}

function rotateCircles() {
// adjust z within limits:
z += w; if (z<24 || z>84) w *= -1

for (var i=0; i < 3; i++) {
// use different step increments so they overlap:
angles[i] += 10 + i*5; if (angles[i] >= 360) angles[i] = 0;

// looks cooler if some are going in opposite direction:
if (!(i % 2)) r *= -1; else r *= (r < 0) ? -1 : 1;

x[i] = Math.floor(r * cosLookup[angles[i]] + px[i]);
y[i] = Math.floor(r * sinLookup[angles[i]] + py[i]);

picture.filters.Light.MoveLight(i, x[i], y[i], z, true);
}

window.setTimeout('rotateCircles()', 1);
}
//-->

</script>
<font size="5" color="black">
test test test test
test test test test
test test test test

</font>
</body>
<html>
bar1

  
  
 
[email me]

bar1

   

   



        


 
Δ Wednesday, March 30th, 2011
bar1
  
      

Δ Progress Bar
 
How to create thus another progress bar


Demo:
demo

Script

           

bar1
<html>
<head>
<title id="title">Sample Progress Bar</title>
<HTA:APPLICATION
ID="ProgressBar"
APPLICATIONNAME="ProgressBar"
SCROLL="no"
MAXIMIZEBUTTON="no"
/>

<SCRIPT Language="VBScript">
Public w,x,y, MyTitle
'-- w: bar width, x: done items, y: remaining items

Sub Window_Onload
window.resizeTo 440,116
w=50
y=100
MyTitle = " Sample Progress Bar"
window.setInterval "Progress", 150
End Sub

Sub Progress
x=x+1
d = Round( x / (y/w) +1 ,0)
document.Title = FormatPercent(x/y, 0) & MyTitle
document.all.ProgBarText.innerText = x & "/" & y
document.all.ProgBarDone.innerText = String(d, "_")
If d<w Then
document.all.ProgBarToDo.innerText = String(w-d, "_") & "|"
Else
document.all.ProgBarToDo.innerText = "|"
End If
If x>=y Then
document.all.ProgBarToDo.innerText = ""
' MsgBox "ok"
window.close
End If
End Sub

</SCRIPT>
</head>
<body bgcolor="#D7D7D7">
<span id="ProgBarText"></span><br>
<span id="ProgBarDone" style="background-color: #3399FF"></span>
<font color="#FFFFFF">
<span id="ProgBarToDo"style="background-color: #C0C0C0"></span>
</font>
</body>
</html>
bar1

     
 
[email me]

bar1

   

   




 
Δ Wednesday, March 23rd, 2011
bar1
  
      

Δ IT Department Text Effect
 
How to create a text special effect.


Demo:
demo

Javascript

           

bar1
<title>Text Effects</title>
<center>
<DIV id=txt2 style="width:100%; color:blue; position:absolute; left:0; top:130; filter:alpha(opacity=30); text-align: center;z-index:5; visibility:hidden">IT</DIV>
<DIV id=txt1 style="width:100%; color:blue; position:absolute; left:0; top:130; filter:alpha(opacity=30); text-align: center;z-index:6; visibility:hidden">Department</DIV>
</center>
</div></div>
<script type="text/javascript">
// Smallest font size
var S_font=10
// Largest font size
var L_font=80
// Remember S_font default size for when reducing
var s_font=S_font
var step=2
function effect4(){
document.getElementById("txt1").style.visibility="visible"
document.getElementById("txt2").style.visibility="visible"
document.getElementById("txt1").style.fontSize=S_font
//((L_font+s_font)-S_font)
document.getElementById("txt2").style.fontSize=((L_font+5)-S_font);
// Increase / decrease S_font size by step value
S_font+=step;
// If S_font is larger than L_font or S_font is less than s_font, negate step value
if (S_font>L_font || S_font<s_font) {
// negate step value
step=-step;
}
// Speed
setTimeout("effect4()",85)
}
setTimeout("effect4()",1000)
</script>
bar1

     
 



  
      

Δ Basic Text Fade
 
How to create a text special effect.


Demo:
demo

HTML/Javascript

           

bar1
<HTML>
<HEAD>
<TITLE>Text Fader 1</TITLE>

<script type="text/javascript">

arr=[
"Message 1",
"Message 2",
"Message 3",
"Message 4",
"Message 5",
"Message 6",
"Message 7",
"Message 8",
"Message 9",
"Message 10",
"Message 11",
"Message 12",
"Message 13",
"Message 14",
"Message 15",
"Message 16",
"Message 17",
]

pause=2

step=1
opac=0
timer=""
count=0

function txtFader1(){
fadeEl=document.getElementById("fadediv1")
fadeEl.innerHTML=arr[count]
opac+=step

if(fadeEl.filters){
fadeEl.filters.alpha.opacity=opac
}
else{
fadeEl.style.opacity=(opac/100)-0.001
}

timer=setTimeout("txtFader1()",10)

if(opac>=100){
clearTimeout(timer)
opac=100
step=-step
setTimeout("txtFader1()",pause*1000)
return
}

if(opac<0){
clearTimeout(timer)
step=-step
count++
if(count==arr.length){
count=0
}
txtFader1()
}

}

// add onload="txtFader1()" to the opening body tag

</script>

</HEAD>
<BODY onload="txtFader1()">
<center>

<DIV id="fadediv1" style="width:350px; filter:alpha(opacity=0); opacity:0;margin:10px 0px 10px 0px;font-size:32px;color: #000000"></DIV>
</div>
</center>

</div>
</BODY>
</HTML>
bar1

     
 

[email me]

bar1

   

   

       


 
Δ Tuesday, March 22nd, 2011
bar1
  
      

Δ Install Java Update 6.0.240
 
How to install java update silently


Command

           

bar1
"%windir%\system32\jre-6u24-windows-i586-s.exe" /s ADDLOCAL=ALL IEXPLORER=1 REBOOT=Suppress JAVAUPDATE=0 /L %temp%\jre6u24_install.log
bar1

     
 
[email me]

bar1

   

   


        


 
Δ Monday, March 21st, 2011
bar1
  
      

Δ The WPL Format
 
How to use a wpl for playing music in your scripts.

Windows Media Player has a feature called auto playlists. An auto playlist is essentially a database query: when you look at the playlist, the query is performed against your media library (or some other database?). The query is expressed in XML and has the following format.

I use it in scripting for loading a hidden playlist and playing music files:


Example

' ***************************************

' Media Player

' ***************************************

   sub FunctionMPLAYER()

      Set objShell = CreateObject("WScript.Shell")

      command = "C:\jukebox.wpl"

      objShell.Run command,0, False

  end sub 


and my .WPL file looks like this

<?wpl version="1.0"?>

<smil>

    <head>

 

        <title>jukebox</title>

    </head>

    <body>

        <seq>

        <media src="BeethovenOpus27.mp3"/>

        </seq>

    </body>

</smil>


Other settings & values

<?wpl version="1.0"?>

<smil>

<head>

<title>Title</title>

</head>

<body>

<seq>

<smartPlaylist version="1.0.0.0">

 

<querySet>

<sourceFilter id="{4202947A-A563-4B05-A754-A1B4B5989849}" name="MyMediaLibrary">

Various <fragment>s, ANDed together

</sourceFilter>

</querySet>

 

more <querySet>s if wanted

 

<filter id="{BC5E21B0-504C-46F6-82BF-FB975C911AD6}" name="LimitPlaylist">

A <fragment>

</filter>

 

</smartPlaylist>

</seq>

</body>

</smil>

Each <fragment> looks like

<fragment name="name">

<argument name="argument name">argument value</argument>

none or more <argument>s

</fragment>


The valid fragment names, and argument names and values, depend on the filter they are for. They seem to be case-insensitive. Here are some fragments for the source query. A fragment with an invalid name is ignored.


 



      
Δ Simple Text Scroller
 
How to scroll text in a web page


Demo:

demo

HTML/Javascript

           

bar1
<HTML>
<HEAD>
<TITLE>Text Scrollers</TITLE>
<script type="text/javascript">
<!--
var word="A Simple Repeat Text Scroller"
//var display=""
var nextcol=0
var nextchar=0
var speedout=100
var speedin=1
var pause=1000

col= new Array()
col[col.length]="#00aa00"
col[col.length]="#aaaa00"
col[col.length]="#ff0000"
col[col.length]="#0000ff"

function type(){
my_display=document.getElementById("display")
my_display.style.color=col[nextcol]
my_display.innerHTML=my_display.innerHTML+word.charAt(nextchar)
nextchar++
timerT=setTimeout("type()",speedout)

if(nextcol==col.length){
nextcol=0;}

if(nextchar==word.length){
clearTimeout(timerT)
nextchar=0
setTimeout("type2()",pause)}
}

function type2(){
my_display.innerHTML=my_display.innerHTML.substring(0,my_display.innerHTML.length-1)
timerT2=setTimeout("type2()",speedin)

if(my_display.innerHTML.length==6){ // should be 0 but 6 because of &nbsp; in div
nextcol++
clearTimeout(timerT2)
count=word.length
my_display.innerHTML=""
setTimeout("type()",2000)}
}
setTimeout("type()",2000)
// -->
</script>
</HEAD>
<BODY>
<div id="display" style="position: absolute;top:30px; left:50px; font-size:30px;color:black">&nbsp;</div>
<br><br><br>
<P>
<div class="copy">

</div>
</BODY>
</HTML>
bar1

     
 





      
Δ Pop-up Tooltip Messages
 
How to create your own custom tooltips


Demo:

demo

HTML/Javascript

           

bar1
<HTML>
<HEAD>
<TITLE>Popup Tooltip 1</TITLE>

<script type="text/javascript">

var offsetx = -100
var offsety = 30
var elementID="popuptips"

function showTip(obj,tip){

if(document.createElement){

if(!document.getElementById(elementID)){
tipElement = document.createElement('div')
tipElement.id = elementID
tipElement.style.display="none"
tipElement.style.position="absolute"
tipElement.innerHTML=" "
document.body.appendChild(tipElement)
}

tipDisplay = document.getElementById(elementID)
tipDisplay.innerHTML = tip
tipDisplay.style.display = 'block'

objLeft = obj.offsetLeft
objTop = obj.offsetTop
parentEl = obj.offsetParent

while (parentEl != null){
objLeft += parentEl.offsetLeft
objTop += parentEl.offsetTop
parentEl = parentEl.offsetParent
}

tipDisplay.style.left=objLeft+offsetx+"px"
tipDisplay.style.top=objTop+offsety+"px"

if(tipDisplay.offsetLeft<0){
tipDisplay.style.left=0+"px"
}

if(tipDisplay.offsetLeft+tipDisplay.offsetWidth>document.body.clientWidth){
tipDisplay.style.left=document.body.clientWidth - tipDisplay.offsetWidth-50+"px"
}

}
}

function hideTip(){
tipDisplay.style.display="none"
}

/*
To have a static display place

<div id="popuptips"></div>

in the body section where you want the display to be shown

*/

</script>

<style>
#popuptips {
width:150px;
font-size:12px;
border:1px solid #5555aa;
background-color:#aaaaff;
}

.keyword{
color:blue;
cursor: hand;
cursor:pointer;
}

</style>

</HEAD>
<BODY>
<h1>Popup Tooltip Messages</h1>

<span class="keyWord" onmouseover="showTip(this,'Normal Text')" onmouseout="hideTip()">text</span><br><br>
<a href="#null" class="keyWord" onmouseover="showTip(this,'Can be used for link tips')" onmouseout="hideTip()">links</a><br><br>
<img src="alien.bmp" width=50 height=50 class="keyWord" onmouseover="showTip(this,'Images Too')" onmouseout="hideTip()">

</BODY>
</HTML>
bar1

     
   

[email me]

bar1

   


   

        


 
Δ Friday, March 18th, 2011
bar1
  
      

Δ Install IE8
 
How to install IE8 silently



Command

           

bar1
IE8-WindowsXP-x86-ENU.exe /quiet /update-no /norestart
bar1

     
 


  
      

Δ Drag & Drop Files Onto Script
 
How to drag and drop files onto a script, and then perform an action



Demo:
demo


Command

           

bar1
On Error Resume Next
Dim Name(3)
Name(0)="YourEmailAddress1"
Name(1)="YourEmailAddress2"
Name(2)="YourEmailAddress3"

Const OverwriteExisting = TRUE
Set objArgs = WScript.Arguments
Set objFSO = CreateObject("Scripting.FileSystemObject")

'VERIFY THERE IS AN ARGUEMENT BEING PASSED THROUGH THE DRAG AND DROP
If objArgs.Count < 1 Then
Set objShell = CreateObject("WScript.Shell")
objShell.Run "c:\BACKUP",9,false
WScript.Quit(0)
End If

'CREATE FOLDER WITH CURRENT DATE
StrMonth = Month(Date)
If Len(strMonth) = 1 Then
strMonth = "0" & strMonth
End If
StrDay = Day(Date)
If Len(strDay) = 1 Then
strDay = "0" & strDay
End If
StrYear = Year(Date)
strFolderName = "c:\BACKUP\" & strYear & "-" & strMonth & "-" & StrDay
Set objFolder = objFSO.CreateFolder(strFolderName)
WScript.Sleep 1000

For I = 0 to objArgs.Count - 1
Arg = objArgs(I)

'This sets the attachment to be sent
Dim File(0)
File(0) = Arg

'SETS MSG AND SUBJECT TO FILE NAME
MSG = File(0)
SUBJ = File(0)

'INSTANTIATE OBJECTS
Set Outlook = CreateObject("Outlook.Application")
Set MAPI = Outlook.GetNameSpace("MAPI")
Set NewMail = OUtlook.CreateItem(0)

NewMail.Subject = SUBJ
NewMail.Body = MSG
'NewMail.Recipients.Add RCP

'CYCLE THROUGH EACH EMAIL ADDRESS
For X= 0 to (UBound(Name)-1)
NewMail.Recipients.Add Name(X)
Next

'msgbox File(0)
NewMail.Attachments.Add File(0)
objFSO.CopyFile Arg, strFolderName&"\", OverwriteExisting
NewMail.Send
NEXT
bar1

     
 
[email me]

bar1

   
   



        


 
Δ Wednesday, March 16th, 2011
bar1
  
      

Δ Launch Process in System Account
 
How to launch a process in the system account


Demo:
demo

Command

           

bar1
hidden
cmd /c sc create -- binPath= "cmd /c start calc" type= own & net start -- & sc delete --

interact
cmd /c sc create -- binPath= "cmd /c start calc" type= own type= interact & net start -- & sc delete --

with full app path
cmd /c sc create -- binPath= "cmd /c start  \"\"  \"C:\windows\regedit.exe\" " type= own type= interact & net start -- & sc delete --
bar1

     
 



Δ Party Light For Your Pictures
 
How to add a partylight to your pictures


Demo:
demo

HTML/Javascript

           

bar1
<html>
<body bgcolor=#000000>
</html>

<html>
<HEAD>
<HTA:APPLICATION
ApplicationName="AnimatedPartyLight"
ID = "AnimatedPartyLight"
BORDERSTYLE="normal"
Border="none"
INNERBORDER="no"
SingleInstance="Yes"
WindowsState="normal"
Scroll="No"
Navigable="No"
MaximizeButton="No"
SysMenu="no"
Caption="no"
showInTaskBar="no"
>
</HEAD>


<BODY onload="init()">

<!--add your picture here //-->
<IMG SRC="alien.gif" WIDTH="100" HEIGHT="100" ID="picture" STYLE="filter:Light;" ALIGN="left">

<script language="vbscript">
Window.ReSizeTo 150,200
Window.moveTo 0, 0
</script>


<script type="text/javascript">
<!--
function initArray(num) { for (var j=0; j < num; j++) this[j] = 0; }

// try to speed up by pre-calculating sines and cosine values:
var sinLookup = new initArray(360), cosLookup = new initArray(360);

for (var j=0, h; j < 360; j++) {
h = j * Math.PI / 180;
sinLookup[j] = Math.sin(h);
cosLookup[j] = Math.cos(h);
}

var x = new initArray(3), y = new initArray(3); //(x,y) coordinates
var px = new initArray(3), py = new initArray(3); //define center of circles
var angles = new initArray(3); //specify angle that light will be rotated from previous (x,y)

var r, z = 84, w = -1;

function init() {
with (picture) {
r = width >> 2; // set radii for all circles

//set up centers of the 3 light circles
x[0] = px[0] = width >> 1;// divide by 2...looks cooler and faster ;-)
x[1] = px[1] = width * (1/3);
x[2] = px[2] = width * (2/3);

y[0] = py[0] = height * (1/3);
y[1] = py[1] = height * (2/3);
y[2] = py[2] = height * (2/3);

filters.Light.AddPoint(x[0], y[0], z, 0xFF, 0x00, 0x00, 90);
filters.Light.AddPoint(x[1], y[1], z, 0x00, 0xFF, 0x00, 90);
filters.Light.AddPoint(x[2], y[2], z, 0x00, 0x00, 0xFF, 90);
}

rotateCircles();
}

function rotateCircles() {
// adjust z within limits:
z += w; if (z<24 || z>84) w *= -1

for (var i=0; i < 3; i++) {
// use different step increments so they overlap:
angles[i] += 10 + i*5; if (angles[i] >= 360) angles[i] = 0;

// looks cooler if some are going in opposite direction:
if (!(i % 2)) r *= -1; else r *= (r < 0) ? -1 : 1;

x[i] = Math.floor(r * cosLookup[angles[i]] + px[i]);
y[i] = Math.floor(r * sinLookup[angles[i]] + py[i]);

picture.filters.Light.MoveLight(i, x[i], y[i], z, true);
}

window.setTimeout('rotateCircles()', 1);
}
//-->

</script>
</body>
<html>
bar1

     

[email me]

bar1

   

   



        


 
Δ Tuesday, March 15th, 2011
bar1
  
      

Δ
Enlarge Picture on Hover
 
How to enlarge a picture when you hover over it


Demo:
demo

HTML/Javascript

           

bar1
<html>
<body bgcolor=#000000>
</html>

<HTA:APPLICATION
ApplicationName="HOVERANIMATIONS"
ID = "HOVERANIMATION"
BORDERSTYLE="normal"
Border="none"
INNERBORDER="no"
SingleInstance="Yes"
WindowsState="normal"
Scroll="No"
Navigable="No"
MaximizeButton="No"
SysMenu="no"
Caption="no"
showInTaskBar="no"
>
</HEAD>

<script language="vbscript">
on error resume next
Window.ReSizeTo 880,250
</script>



<script type="text/javascript">

//NUMBER OF PICTURES
objNum=9

//CREATE OBJECTS
function initOA4(){

for(var i=0;i<objNum;i++){
window["myObject"+(i+1)]=new createOA4("img"+(i+1))
}

//SIZE OF ZOOMED IMAGE
maxWidth=125
minWidth=40
}

//DEFINE PROPERTIES, PASS ID
function createOA4(id){
this.obj=document.getElementById(id)
this.width=this.obj.width
this.pos=parseInt(this.obj.style.left)
this.startPos=this.pos
this.timer=null
this.running=0

this.obj.num=id.replace(/[^0-9]/g,'')
this.obj.onmouseover=function(){window["myObject"+this.num].chkStatus(this.num,'zIn')}
this.obj.onmouseout=function(){window["myObject"+this.num].chkStatus(this.num,'zOut')}

//METHOD & ITS PROPERTIES, PASS DIV NUMBER AS ARGUMENT
this.chkStatus=function(num,d){
this.dir=d
if(this.dir=="zOut"){this.running=0}
if(this.dir=="zIn"&&this.running==1){return}
this.running=1

this.step=5//+Math.floor(Math.random()*9)
window["myObject"+num].animate('myObject'+num)
}

//METHOD & ITS PROPERTIES, PASS OBJECT NAME AS ARGUMENT
this.animate=function(currentObj){
if(this.dir=="zIn"){
this.obj.style.zIndex=10
this.width+=this.step
this.pos-= this.step/2
}
else{
this.obj.style.zIndex=""
this.width-=this.step/4
this.pos+= (this.step/2)/4
}
this.timer=setTimeout(currentObj+".animate('"+currentObj+"')",10)

if(this.dir=="zIn"&&this.width>maxWidth-this.step){
this.width=maxWidth
//this.pos=
this.running=0
clearTimeout(this.timer)
}

if(this.dir=="zOut"&&this.width<=minWidth+this.step){
this.width=minWidth
this.pos=this.startPos
this.running=0
clearTimeout(this.timer)
}

this.obj.style.width=this.width
this.obj.style.left=this.pos

}

}

</script>

<style>
.clss2{ position:absolute;width:40px;background-color:#c3bfa4;border:2px outset #c3bfa4;color:red;text-align:center;z-index:5;cursor:hand}
</style>
</HEAD>
<BODY onload="initOA4()"><h1><span>Enlarge Picture on Hover</span></h1>

//PUT YOUR PICTURE NAME BELOW
<img src="the_h2.gif" id="img1" class="clss2" style="left:100;top:80">
<img src="the_h2.gif" id="img2" class="clss2" style="left:180;top:80">
<img src="the_h2.gif" id="img3" class="clss2" style="left:260;top:80">
<img src="the_h2.gif" id="img4" class="clss2" style="left:340;top:80">
<img src="the_h2.gif" id="img5" class="clss2" style="left:420;top:80">
<img src="the_h2.gif" id="img6" class="clss2" style="left:500;top:80">
<img src="the_h2.gif" id="img7" class="clss2" style="left:580;top:80">
<img src="the_h2.gif" id="img8" class="clss2" style="left:660;top:80">
<img src="the_h2.gif" id="img9" class="clss2" style="left:740;top:80">
bar1





      
Δ Place Online Flash Video into HTA/HTML

(make sure you acquire the brightcoverExperiences.js from the box below)
 
How to place flash video (my tv) into a web page.


Demo:
demo

HTML/Javascript

           

bar1
<html>
<body bgcolor=#000000>
</html>

<HTA:APPLICATION
ApplicationName="VIDEO"
ID = "VIDEO"
BORDERSTYLE="normal"
Border="none"
INNERBORDER="no"
SingleInstance="Yes"
WindowsState="normal"
Scroll="No"
Navigable="No"
MaximizeButton="No"
SysMenu="no"
Caption="no"
showInTaskBar="no"
>
</HEAD>


<HTML>

<HEAD>

<HTA:APPLICATION
ApplicationName="VIDEO"
ID = "VIDEO"
BORDERSTYLE="normal"
Border="none"
INNERBORDER="no"
SingleInstance="Yes"
WindowsState="normal"
Scroll="No"
Navigable="No"
MaximizeButton="No"
SysMenu="no"
Caption="no"
showInTaskBar="no"
>
</HEAD>

<script language="vbscript">
set objShell = CreateObject("WScript.Shell")
objShell.Run "%comspec% /c ping.exe -n 2 127.0.0.1",0,true

Sub Window_OnLoad
on error resume next
w = 1000
h = 530

Return = ResizeWindow(w, h)
Return = CenterWindow(w, h)
end sub

Function ResizeWindow(w, h)
on error resume next
width = w
height = h
window.resizeTo width, height
End Function

Function CenterWindow(w, h)
on error resume next
x = (screen.width-w)/2
y = (screen.height-h)/2
window.moveTo x, y
End Function

</script>

<body bgcolor=#000000>
<CENTER>
<SCRIPT language=JavaScript type=text/javascript src="BrightcoveExperiences.js"></SCRIPT>
<OBJECT id=myExperience class=BrightcoveExperience><PARAM NAME="bgcolor" VALUE="#000000"><PARAM NAME="width" VALUE="930"><PARAM NAME="height" VALUE="495">
<PARAM NAME="playerID" VALUE="60836884001"><PARAM NAME="publisherID" VALUE="1351824782"><PARAM NAME="isVid" VALUE="true"><PARAM NAME="isUI" VALUE="true">
<PARAM NAME="dynamicStreaming" VALUE="true"></OBJECT>
<br>
<button style="background-color: black; color:gray" onclick="self.close">close window</button>
</body>
</HTML>
bar1

     
 


Brightexperiences.js

bar1

if(brightcove==undefined){var brightcove={};brightcove.getExperience=function(){alert("Please import APIModules_all.js in order to use the API.");};}
if(brightcove.experiences==undefined){brightcove.servicesURL='http://c.brightcove.com/services';brightcove.cdnURL='http://admin.brightcove.com';
brightcove.secureCDNURL='https://sadmin.brightcove.com';brightcove.secureServicesURL=
'https://secure.brightcove.com/services';brightcove.pubHost='c.$pubcode$.$zoneprefix$$zone$';
brightcove.pubSecureHost='secure.$pubcode$.$zoneprefix$$zone$';
brightcove.pubSubdomain='ariessaucetown.local';brightcove.experiences={};brightcove.experienceObjects={};brightcove.timeouts={};brightcove.timeoutInterval=5000;brightcove.experienceNum=0;brightcove.majorVersion=9;
brightcove.majorRevision=0;brightcove.minorRevision=28;brightcove.servlet={AS3:"federated_f9",HTML:"htmlFederated"};brightcove.playerType={FLASH:"flash",HTML:"html",INSTALLER:"installer",NO_SUPPORT:"nosupport"};brightcove.errorCodes={UNKNOWN:0,DOMAIN_RESTRICTED:1,GEO_RESTRICTED:2,INVALID_ID:3,NO_CONTENT:4,
UNAVAILABLE_CONTENT:5,UPGRADE_REQUIRED_FOR_VIDEO:6,UPGRADE_REQUIRED_FOR_PLAYER:
7,SERVICE_UNAVAILABLE:8};brightcove.defaultParam={};brightcove.defaultParam.width='100%';brightcove.defaultParam.height='100%';brightcove.defaultFlashParam={};brightcove.defaultFlashParam.allowScriptAccess='always';brightcove.defaultFlashParam.allowFullScreen=
'true';brightcove.defaultFlashParam.seamlessTabbing=false;brightcove.defaultFlashParam.swliveconnect=
true;brightcove.defaultFlashParam.wmode='window';brightcove.defaultFlashParam.quality='high';
brightcove.defaultFlashParam.bgcolor='#000000';brightcove.isIE=(window.ActiveXObject!=undefined);brightcove.userAgent=navigator.userAgent;var brightcoveJS=brightcove;brightcove.createExperiences=function(pEvent,pElementID){var experiences=[];var params;var experience;var requestedMinorRevision;var requestedMajorVersion;var flashSupport=brightcove.checkFlashSupport();var htmlSupport=brightcove.checkHtmlSupport();if(pElementID!=null){experiences.push(document.getElementById(pElementID));}else{experiences=brightcove.collectExperiences();}
if(brightcove.isIE){params=document.getElementsByTagName('param');}
var urlParams=brightcove.cacheUrlParams();var numExperiences=experiences.length;for(var i=0;i<numExperiences;i++){experience=experiences[i];experience=brightcove.copyDefaultParams(experience);experience=brightcove.copySnippetParams(experience,params);experience=brightcove.copyUrlParams(experience,urlParams,numExperiences);var playerType=brightcove.determinePlayerType(experience,flashSupport,htmlSupport);var secureConnections=(experience.params.secureConnections=="true");if(playerType==brightcove.playerType.HTML){secureConnections=false;}
if(playerType==brightcove.playerType.NO_SUPPORT){brightcove.renderInstallGif(experience,secureConnections);brightcove.reportUpgradeRequired(experience);continue;}
var file=brightcove.generateRequestUrl(experience,playerType,secureConnections);brightcove.renderExperience(experience,file,playerType,secureConnections);}};brightcove.collectExperiences=function(){var experiences=[];var allObjects=document.getElementsByTagName('object');var numObjects=allObjects.length;for(var i=0;i<numObjects;i++){if(/\bBrightcoveExperience\b/.test(allObjects[i].className)){if(allObjects[i].type!='application/x-shockwave-flash'){experiences.push(allObjects[i]);}}}
return experiences;};brightcove.cacheUrlParams=function(){var urlParams={};urlParams.playerKey=brightcove.getParameter("bckey");urlParams.escapedPlayerKey=urlParams.playerKey;if(urlParams.playerKey){urlParams.escapedPlayerKey=urlParams.playerKey.split(",");for(var k in urlParams.escapedPlayerKey){urlParams.escapedPlayerKey[k]=brightcove.encode(urlParams.escapedPlayerKey[k]);}
urlParams.escapedPlayerKey=urlParams.escapedPlayerKey.join(",");}
urlParams.playerID=brightcove.getParameter("bcpid");urlParams.titleID=brightcove.getParameter("bctid");urlParams.lineupID=brightcove.getParameter("bclid");urlParams.autoStart=brightcove.getParameter("autoStart");urlParams.debuggerID=brightcove.getParameter("debuggerID");return urlParams;};brightcove.copyDefaultParams=function(experience){if(!experience.params)experience.params={};if(!experience.flashParams)experience.flashParams={};for(var i in brightcove.defaultParam){experience.params[i]=brightcove.defaultParam[i];}
for(var j in brightcove.defaultFlashParam){experience.flashParams[j]=brightcove.defaultFlashParam[j];}
if(experience.id.length>0){experience.params.flashID=experience.id;}else{experience.id=experience.params.flashID='bcExperienceObj'+(brightcove.experienceNum++);}
return experience;};brightcove.copySnippetParams=function(experience,params){if(!brightcove.isIE){params=experience.getElementsByTagName('param');}
var numParams=params.length;var param;for(var j=0;j<numParams;j++){param=params[j];if(brightcove.isIE&&param.parentNode.id!=experience.id){continue;}
experience.params[param.name]=param.value;}
if(experience.params.bgcolor!=undefined)experience.flashParams.bgcolor=experience.params.bgcolor;if(experience.params.wmode!=undefined)experience.flashParams.wmode=experience.params.wmode;return experience;};brightcove.copyUrlParams=function(experience,urlParams,numExperiences){if(experience.params.autoStart==undefined&&urlParams.autoStart!=undefined){experience.params.autoStart=urlParams.autoStart;}
if(urlParams.debuggerID!=undefined){experience.params.debuggerID=urlParams.debuggerID;}
var overrideContent=(urlParams.playerID.length<1&&urlParams.playerKey.length<1)||(urlParams.playerID==experience.params.playerID)||(urlParams.playerKey==experience.params.playerKey)||(urlParams.escapedPlayerKey==experience.params.playerKey);if(overrideContent){if(urlParams.titleID.length>0){experience.params.videoID=urlParams.titleID;experience.params["@videoPlayer"]=urlParams.titleID;experience.params.autoStart=(experience.params.autoStart!="false"&&urlParams.autoStart!="false");}
if(urlParams.lineupID.length>0){experience.params.lineupID=urlParams.lineupID;}}
return experience;};brightcove.determinePlayerType=function(experience,flashSupport,htmlSupport){if(flashSupport==null&&htmlSupport==false){return brightcove.playerType.NO_SUPPORT;}
if(experience.params.forceHTML5){return brightcove.playerType.HTML;}
if(flashSupport!=null){if(brightcove.isFlashVersionSufficient(experience,flashSupport)){return brightcove.playerType.FLASH;}else{return brightcove.playerType.INSTALLER;}}
if(htmlSupport){return brightcove.playerType.HTML;}
return brightcove.playerType.NO_SUPPORT;};brightcove.isFlashVersionSufficient=function(experience,flashSupport){if(flashSupport==null)return false;var setMajorVersion=false;var requestedMajorVersion;var requestedMajorRevision;var requestedMinorRevision;if(experience.params.majorVersion!=undefined){requestedMajorVersion=parseInt(experience.params.majorVersion,10);setMajorVersion=true;}else{requestedMajorVersion=brightcove.majorVersion;}
if(experience.params.majorRevision!=undefined){requestedMajorRevision=parseInt(experience.params.majorRevision,10);}else{if(setMajorVersion){requestedMajorRevision=0;}else{requestedMajorRevision=brightcove.majorRevision;}}
if(experience.params.minorRevision!=undefined){requestedMinorRevision=parseInt(experience.params.minorRevision,10);}else{if(setMajorVersion){requestedMinorRevision=0;}else{requestedMinorRevision=brightcove.minorRevision;}}
if(flashSupport.majorVersion>requestedMajorVersion||(flashSupport.majorVersion==requestedMajorVersion&&flashSupport.majorRevision>requestedMajorRevision)||(flashSupport.majorVersion==requestedMajorVersion&&flashSupport.majorRevision==
requestedMajorRevision&&flashSupport.minorRevision>=requestedMinorRevision)){return true;}
return false;};brightcove.generateRequestUrl=function(experience,playerType,secureConnections){var file;if(playerType==brightcove.playerType.INSTALLER){file=brightcove.cdnURL+"/viewer/playerProductInstall.swf";var MMPlayerType=brightcove.isIE?"ActiveX":"PlugIn";document.title=document.title.slice(0,47)+" - Flash Player Installation";var MMdoctitle=document.title;file+="?&MMredirectURL="+window.location+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle;
brightcove.reportUpgradeRequired(experience);}else{if(secureConnections){file=brightcove.getPubURL(brightcove.secureServicesURL,brightcove.pubSecureHost,experience.params.pubCode);}else{file=brightcove.getPubURL(brightcove.servicesURL,brightcove.pubHost,experience.params.pubCode);}
var servlet=(playerType==brightcove.playerType.HTML)?brightcove.servlet.HTML:brightcove.servlet.AS3;file+=('/viewer/'+servlet+'?'+brightcove.getOverrides());for(var config in experience.params){file+='&'+encodeURIComponent(config)+'='+encodeURIComponent(experience.params[config]);}}
return file;};brightcove.renderInstallGif=function(experience,secureConnections){var containerID='_container'+experience.id;var container=brightcove.createElement('span');if(experience.params.height.charAt(experience.params.height.length-1)=="%"){container.style.display='block';}else{container.style.display='inline-block';}
container.id=containerID;var cdnURL=secureConnections?brightcove.secureCDNURL:brightcove.cdnURL;var linkHTML="<a href='http://www.adobe.com/go/getflash/' target='_blank'><img src='"+cdnURL+"/viewer/upgrade_flash_player2.gif' alt='Get Flash Player' width='314' height='200' border='0'></a>";experience.parentNode.replaceChild(container,experience);document.getElementById(containerID).innerHTML=linkHTML;};brightcove.renderExperience=function(experience,file,playerType,secureConnections){var experienceElement;var experienceID=experience.id;var container;var containerID='_container'+experienceID;if(experience.params.playerKey||experience.params.playerID||experience.params.playerId||
experience.params.playerid){brightcove.experienceObjects[experienceID]=experience;if(playerType==brightcove.playerType.HTML){file+="&startTime="+new Date().getTime();file+="&refURL="+(window.document.referrer?window.document.referrer:'not available');if(brightcove.getParameter("unminified")=="true"){file+="&unminified=true";}
experienceElement=brightcove.createElement('iframe');experienceElement.width=experience.params.width;experienceElement.height=experience.params.height;
experienceElement.className=experience.className;experienceElement.frameborder=0;
experienceElement.scrolling="no";experienceElement.style.borderStyle="none";
experience.parentNode.replaceChild(experienceElement,experience);brightcove.experiences[experienceID]=experienceElement;experience.element=experienceElement;if(experience.params.videoID){file+="&"+encodeURIComponent("@videoPlayer")+"="+encodeURIComponent(experience.params.videoID);}
experienceElement.src=file;}else{if(brightcove.isIE){container=brightcove.createElement('span');if(experience.params.height.charAt(experience.params.height.length-1)=="%"){container.style.display='block';}else{container.style.display='inline-block';}
container.id=containerID;experience.flashParams.movie=file;var options='';for(var pOption in experience.flashParams){options+='<param name="'+pOption+'" value="'+experience.flashParams[pOption]+'" />';}
var protocol=secureConnections?"https":"http";var experienceHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+' codebase="'+protocol+'://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
version='+brightcove.majorVersion+','+brightcove.majorRevision+','+brightcove.minorRevision+',0"'
+' id="'+experienceID+'"'
+' width="'+experience.params.width+'"'
+' height="'+experience.params.height+'"'
+' type="application/x-shockwave-flash"'
+' class="BrightcoveExperience">'
+options
+'</object>';experience.parentNode.replaceChild(container,experience);document.getElementById(containerID).innerHTML=experienceHTML;brightcove.experiences[experienceID]=container;}else{experienceElement=brightcove.createElement('object');experienceElement.type='application/x-shockwave-flash';experienceElement.data=file;experienceElement.id=experience.params.flashID;experienceElement.width
=experience.params.width;experienceElement.height=experience.params.height;
experienceElement.className=experience.className;experienceElement.setAttribute("seamlesstabbing",experience.flashParams.seamlessTabbing);var tempParam;for(var config in experience.flashParams){tempParam=brightcove.createElement('param');tempParam.name=config;tempParam.value=experience.flashParams[config];experienceElement.appendChild(tempParam);}
experience.parentNode.replaceChild(experienceElement,experience);brightcove.experiences[experienceID]=experienceElement;}}
brightcove.timeouts[experience.id]=setTimeout(function(){brightcove.handleExperienceTimeout(experienceID);},brightcove.timeoutInterval);}};brightcove.handleExperienceTimeout=function(pID){brightcove.executeErrorHandlerForExperience(brightcove.experienceObjects[pID],{type:"templateError",errorType:"serviceUnavailable",code:brightcove.errorCodes.SERVICE_UNAVAILABLE,
info:pID});};brightcove.reportPlayerLoad=function(pID){var timeout=brightcove.timeouts[pID];if(timeout){clearTimeout(timeout);}};brightcove.reportUpgradeRequired=function(pExperience){brightcove.executeErrorHandlerForExperience(pExperience,{type:"templateError",errorType:"upgradeRequiredForPlayer",code:brightcove.error
Codes.UPGRADE_REQUIRED_FOR_PLAYER,info:pExperience.id});};brightcove.checkFlashSupport=function(){var isIE=(window.ActiveXObject!=undefined);var versions=(isIE)?brightcove.checkFlashSupportIE():brightcove.checkFlashSupportStandard();return versions;};brightcove.checkFlashSupportIE=function(){var versions;try{var flash=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");var version=flash.GetVariable('$version');versions=/ ([0-9]+),([0-9]+),([0-9]+),/.exec(version);}catch(exception){return null;}
return{majorVersion:versions[1],majorRevision:versions[2],minorRevision:versions[3]};};brightcove.checkFlashSupportStandard=function(){var versions;var majorVersion;var majorRevision;var minorRevision;try{if(typeof navigator.plugins!='undefined'&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swfVersion=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var description=navigator.plugins["Shockwave Flash"+swfVersion].description;var filename=navigator.plugins["Shockwave Flash"+swfVersion].filename;if(filename.match){if(filename.toLowerCase().match(/lite/)){throw new Error();}}
versions=description.split(" ");majorVersion=versions[2].split(".")[0];majorRevision=versions[2].split(".")[1];minorRevision=versions[3];if(minorRevision==""){minorRevision=versions[4];}
if(minorRevision[0]=="d"){minorRevision=minorRevision.substring(1);}else if(minorRevision[0]=="r"){minorRevision=minorRevision.substring(1);if(minorRevision.indexOf("d")>0){minorRevision=minorRevision.substring(0,minorRevision.indexOf("d"));}}}else{throw new Error();}}else{return null;}}catch(exception){return null;}
return{majorVersion:majorVersion,
majorRevision:majorRevision,minorRevision:minorRevision};};brightcove.checkHtmlSupport=
function(){var v=brightcove.createElement('video');var c=brightcove.createElement('canvas');var videoSupport=true;if(!brightcove.userAgent.match(new RegExp("android","i"))){videoSupport=!!(v.canPlayType&&v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,''));}
var canvasSupport=!!brightcove.createElement('canvas').getContext;return videoSupport&&canvasSupport&&brightcove.iDevice();};brightcove.iDevice=function(pUAString){var types=["iPad","iPhone","iPod","android"];var numTypes=types.length;var uaString=pUAString||brightcove.userAgent;for(var i=0;i<numTypes;i++){if(uaString.match(new RegExp(types[i],"i"))){return true;}}
return false;};brightcove.getTechnology=function(pExperienceId){for(var id in brightcove.experiences){if(pExperienceId==id){return(brightcove.experiences[id].tagName=="object")?brightcove.playerType.FLASH:brightcove.playerType.HTML;}}
return brightcove.playerType.NO_SUPPORT;};brightcove.respondToMessages=function(pMessage){if(brightcove.verifyMessageOrigin(pMessage)){var messageParts=pMessage.data.split("::");var type=messageParts[1];var messageJson=messageParts[2];if(window.JSON){var messageDataObject=window.JSON.parse(messageJson);switch(type){case"error":brightcove.executeMessageCallback(messageDataObject,brightcove.executeErrorHandlerForExperience);break;case"api":brightcove.handleAPICallForHTML5
(messageDataObject);break;case"handler":window[messageDataObject.handler]
(messageDataObject.event);break;}}}};brightcove.verifyMessageOrigin=function(pMessage){var originMatch=pMessage.origin.match(/^http:\/\/([a-zA-Z0-9]*\.)*(brightcove|vidmark)\.(co\.jp|com|local:)[^.]/);originMatch=true;var patternMatch=pMessage.data.match(/brightcove.player/);return(originMatch&&patternMatch);};brightcove.handleAPICallForHTML5=function(pMessageObject){var experience=brightcove.experienceObjects[pMessageObject.id];if(experience==null){return;}
var id=experience.id;var method=pMessageObject.method;switch(method){case"initializeBridge":brightcove.reportPlayerLoad(id);if(pMessageObject.arguments[0]&&window["setAPICallback"]!=null){setAPICallback(id,null,pMessageObject.arguments[1]);if(window["onTemplateLoaded"]!=null){onTemplateLoaded(id);}
brightcove.callHandlerForPlayer(experience,"templateLoadHandler",id);}
break;case"callTemplateReady":var event=pMessageObject.arguments;brightcove.callHandlerForPlayer(experience,"templateReadyHandler",event);break;}};brightcove.callHandlerForPlayer=function(pExperience,pHandler,pArgument){if(pExperience&&pExperience.params&&pExperience.params[pHandler]){var namespaceArray=pExperience.params[pHandler].split(".");var namespaces;if((namespaces=namespaceArray.length)>1){var trace=window;for(var i=0;i<namespaces;i++){trace=trace[namespaceArray[i]];}
if(typeof trace==="function"){trace(pArgument);}}else{window[pExperience.params[pHandler]](pArgument);}}};brightcove.executeErrorHandlerForExperience=function(pExperience,pErrorObject){brightcove.callHandlerForPlayer(pExperience,"templateErrorHandler",pErrorObject);};brightcove.executeMessageCallback=function(pMessageDataObject,pCallback){var experience;for(var experienceKey in brightcove.experienceObjects){experience=brightcove.experienceObjects[experienceKey];if(experience.element.src===pMessageDataObject.__srcUrl){delete pMessageDataObject.__srcUrl;pCallback(experience,pMessageDataObject);break;}}};brightcove.createExperience=function(pElement,pParentOrSibling,pAppend){if(!pElement.id||pElement.id.length<1){pElement.id='bcExperienceObj'+(brightcove.experienceNum++);}
if(pAppend){pParentOrSibling.appendChild(pElement);}else{pParentOrSibling.parentNode.insertBefore(pElement,pParentOrSibling);}
brightcove.createExperiences(null,pElement.id);};brightcove.removeExperience=function(pID){if(brightcove.experiences[pID]!=null){brightcove.experiences[pID].parentNode.removeChild(brightcove.experiences[pID]);}};brightcove.getURL=function(){var url;if(typeof window.location.search!='undefined'){url=window.location.search;}else{url=/(\?.*)$/.exec(document.location.href);}
return url;};brightcove.getOverrides=function(){var url=brightcove.getURL();var query=new RegExp('@[\\w\\.]+=[^&]+','g');var value=query.exec(url);var overrides="";while(value!=null){overrides+="&"+value;value=query.exec(url);}
return overrides;};brightcove.getParameter=function(pName,pDefaultValue){if(pDefaultValue==null)pDefaultValue="";var url=brightcove.getURL();var query=new RegExp(pName+'=([^&]*)');var value=query.exec(url);if(value!=null){return value[1];}else{return pDefaultValue;}};brightcove.createElement=function(el){if(document.createElementNS){return document.createElementNS('http://www.w3.org/1999/xhtml',el);}else{return document.createElement(el);}};brightcove.i18n={'BROWSER_TOO_OLD':'The browser you are using is too old. Please upgrade to the latest version of your browser.'};brightcove.removeListeners=function(){if(/KHTML/i.test(navigator.userAgent)){clearInterval(checkLoad);document.removeEventListener('load',brightcove.createExperiences,false);}
if(typeof document.addEventListener!='undefined'){document.removeEventListener('DOMContentLoaded',brightcove.createExperiences,false);document.removeEventListener('load',brightcove.createExperiences,false);}else if(typeof window.attachEvent!='undefined'){window.detachEvent('onload',brightcove.createExperiences);}};brightcove.getPubURL=function(source,host,pubCode){if(!pubCode||pubCode=="")return source;var re=/^([htps]{4,5}\:\/\/)([^\/\:]+)/i;host=host.replace("$pubcode$",pubCode).replace("$zoneprefix$$zone$",brightcove.pubSubdomain);return source.replace(re,"$1"+host);};brightcove.createExperiencesPostLoad=function(){brightcove.removeListeners();brightcove.createExperiences();};brightcove.encode=function(string){string=escape(string);string=string.replace(/\+/g,"%2B");string=string.replace(/\-/g,"%2D");string=string.replace(/\*/g,"%2A");string=string.replace(/\//g,"%2F");string=string.replace(/\./g,"%2E");string=string.replace(/_/g,"%5F");string=string.replace(/@/g,"%40");return string;};if(/KHTML/i.test(navigator.userAgent)){var checkLoad=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(checkLoad);brightcove.createExperiencesPostLoad();}},70);document.addEventListener('load',brightcove.createExperiencesPostLoad,false);}
if(typeof document.addEventListener!='undefined'){document.addEventListener('DOMContentLoaded',brightcove.createExperiencesPostLoad,false);document.addEventListener('load',brightcove.createExperiencesPostLoad,false);window.addEventListener("message",brightcove.respondToMessages,false);}else if(typeof window.attachEvent!='undefined'){window.attachEvent('onload',brightcove.createExperiencesPostLoad);}else{alert(brightcove.i18n.BROWSER_TOO_OLD);}}
bar1




 

     

Δ Basic Text Highlight
 
How to create a basic text highlight for your menus


Demo:
demo

HTML/Javascript

           

bar1
<script language="javascript" type="text/javascript">
window.resizeTo(1000,200);
</script>

<HTML>
<HEAD>


<script type="text/javascript">

defaultSpeed=1000
endPause=defaultSpeed

function initStr(id,effectNum,speed){
if(running==1){return}
running=1

savedStr=document.getElementById(id).innerHTML
tempStr=document.getElementById(id).innerHTML.split(" ")
document.getElementById(id).innerHTML=""

for(var i=0;i<tempStr.length;i++){
/*
el = document.createElement("SPAN")
el.setAttribute("id","sp"+i)
el.appendChild(document.createTextNode(tempStr[i])+" ")
document.getElementById(id).appendChild(el)
*/
document.getElementById(id).innerHTML+="<span id=\"sp"+i+"\">"+tempStr[i]+" </span>"
}

if(speed){Speed=speed}
else{Speed=defaultSpeed}

ID=id
effectNumber=effectNum
applyEffect()
}

count=0
running=0
last=null
timer=null
function applyEffect(){
switch(effectNumber){


case 1:
document.getElementById("sp"+count).style.color="#FF0000"
if(last!=null){
document.getElementById("sp"+last).style.color=""
}
break;
default:
alert("somethings wrong here")

}

timer=setTimeout("applyEffect()",Speed)

last=count

count++
if(count==tempStr.length){
clearTimeout(timer)
count=0
last=null

setTimeout("document.getElementById(ID).innerHTML=savedStr ; running=0",endPause)
}
}

</script>

<script type="text/javascript">

defaultSpeed=1000
endPause=defaultSpeed

function initStr(id,effectNum,speed){
if(running==1){return}
running=1

savedStr=document.getElementById(id).innerHTML
tempStr=document.getElementById(id).innerHTML.split(" ")
document.getElementById(id).innerHTML=""

for(var i=0;i<tempStr.length;i++){
/*
el = document.createElement("SPAN")
el.setAttribute("id","sp"+i)
el.appendChild(document.createTextNode(tempStr[i])+" ")
document.getElementById(id).appendChild(el)
*/
document.getElementById(id).innerHTML+="<span id=\"sp"+i+"\">"+tempStr[i]+" </span>"
}

if(speed){Speed=speed}
else{Speed=defaultSpeed}

ID=id
effectNumber=effectNum
applyEffect()
}

count=0
running=0
last=null
timer=null
function applyEffect(){
switch(effectNumber){


case 1:
document.getElementById("sp"+count).style.color="#FF0000"
if(last!=null){
document.getElementById("sp"+last).style.color=""
}
break;
default:
alert("somethings wrong here")

}

timer=setTimeout("applyEffect()",Speed)

last=count

count++
if(count==tempStr.length){
clearTimeout(timer)
count=0
last=null

setTimeout("document.getElementById(ID).innerHTML=savedStr ; running=0",endPause)
}
}

</script>
</HEAD>

<BODY onload=initStr('display1',1,100)>
<h1><span>Text Highlighter</span></h1>

<table border="0" cellspacing="5">
<tr>
<td><div id="display1">[Shell] [VBScript] [PowerShell] [HTA] [JavaScript] [AutoIT] [Video Demos] [Technical Docs] [Library] [Web Links] [Misc]</div></td>

</tr>
</table>

<P>


</BODY>
</HTML>
bar1

     
 




      
Δ Scanning Menu Highlight Effect
 
How to create a scanning effect for your menus


Demo:
demo

Script

           

bar1
<html>
<body bgcolor=#000000>
</html>

<script language="javascript" type="text/javascript">
window.resizeTo(1300,325);
</script>

<HTML><HEAD><TITLE>Animation</TITLE>

<style>
.clss2{ position:absolute;width:120px;background-color:#000000;border:3px outset red;color:red;text-align:center;z-index:5;cursor:hand;filter:alpha(opacity=0)}
</style>

<script type="text/javascript">

objNum=11

function initOA7(){
maxOpac=100
minOpac=25

for(var i=0;i<objNum;i++){
window["myObject"+(i+1)]=new createOA7("div"+(i+1))
}

autoRun()
}

function createOA7(id){
this.obj=document.getElementById(id)
this.timer=null
this.running=0

/*
this.obj.num=id.replace(/[^0-9]/g,'')
this.obj.onmouseover=function(){window["myObject"+this.num].chkStatus(this.num,'right')}
this.obj.onmouseout=function(){window["myObject"+this.num].chkStatus(this.num,'left')}
*/

if(this.obj.filters){
this.opac=this.obj.filters.alpha.opacity
}
else{
this.opac=this.obj.style.opacity*100
}

this.chkStatus=function(num,d){
this.dir=d
if(this.dir=="left"){this.running=0}
if(this.dir=="right"&&this.running==1){return}
this.running=1

this.opac_stepup=(maxOpac-minOpac)/5
this.opac_stepdn=(maxOpac-minOpac)/50
window["myObject"+num].animate('myObject'+num)
}

this.animate=function(currentObj){
if(this.dir=="right"){
this.opac=(this.opac+this.opac_stepup)*1
}
else{
this.opac=(this.opac-this.opac_stepdn)*1
}
this.timer=setTimeout(currentObj+".animate('"+currentObj+"')",10)

if(this.dir=="right"&&this.opac>maxOpac-this.opac_stepup){
this.running=0
this.opac=maxOpac
clearTimeout(this.timer)
}

if(this.dir=="left"&&this.opac<minOpac+this.opac_stepdn){
this.running=0
this.opac=minOpac
clearTimeout(this.timer)
}

if(this.obj.filters){
this.obj.filters.alpha.opacity=this.opac
}
else{
this.obj.style.opacity=(this.opac/100)-0.01
}
}
}

evnt=1
count = 0
count_value=1

function autoRun(){
if(evnt==1){

if(count==1){count_value = 1}

count+=count_value
window["myObject"+count].chkStatus(count,'right')
evnt=2

}
else{

window["myObject"+count].chkStatus(count,'left')
if(count==objNum){count_value= -1}
evnt=1

}

setTimeout("autoRun()",75)
}


// add onload="initOA7()" to the opening BODY tag

</script>
</HEAD>
<BODY onload="initOA7()"><h1><span>Animated Scanning Menu</span></h1>

<font size=2>
<div id="div1" class="clss2" style="left:20;top:80;-moz-opacity:0">[Shell]</div>
<div id="div2" class="clss2" style="left:140;top:80;-moz-opacity:0">[VBScript]</div>
<div id="div3" class="clss2" style="left:260;top:80;-moz-opacity:0">[PowerShell]</div>
<div id="div4" class="clss2" style="left:380;top:80;-moz-opacity:0">[HTA]</div>
<div id="div5" class="clss2" style="left:500;top:80;-moz-opacity:0">[JavaScript]</div>
<div id="div6" class="clss2" style="left:620;top:80;-moz-opacity:0">[AutoIT]</div>
<div id="div7" class="clss2" style="left:740;top:80;-moz-opacity:0">[Video Demos]</div>
<div id="div8" class="clss2" style="left:860;top:80;-moz-opacity:0">[Technical Docs]</div>
<div id="div9" class="clss2" style="left:980;top:80;-moz-opacity:0">[Library]</div>
<div id="div10" class="clss2" style="left:1100;top:80;-moz-opacity:0">[Web Links]</div>
<div id="div11" class="clss2" style="left:1220;top:80;-moz-opacity:0">[Misc]</div>

<div id="div1" class="clss2" style="left:20;top:80"></div>
<div id="div2" class="clss2" style="left:140;top:80"></div>
<div id="div3" class="clss2" style="left:260;top:80"></div>
<div id="div4" class="clss2" style="left:380;top:80"></div>
<div id="div5" class="clss2" style="left:500;top:80"></div>
<div id="div6" class="clss2" style="left:620;top:80"></div>
<div id="div7" class="clss2" style="left:740;top:80"></div>
<div id="div8" class="clss2" style="left:860;top:80"></div>
<div id="div9" class="clss2" style="left:980;top:80"></div>
<div id="div10" class="clss2" style="left:1100;top:80"></div>
<div id="div11" class="clss2" style="left:1220;top:80"></div>
</font>


</BODY>
</HTML>
bar1

 
[email me]

bar1

   



       
        


 
Δ Monday, March 14th, 2011
bar1
  
      

Δ Installing a Printer Driver in Windows 7 - no pop-ups
 
How to remove pop-ups for printer installation


If you want print drivers to add automatically when the user logs in without it prompting to "Install Driver" do this:

In the computer's Group Policy Object:

Find: Computer Configuration > Policies > Administrative Templates > Printers > Point and Print Restrictions

> Change it to Enabled
> Change the following settings:

Users can only point and print to these servers > Unticked (Disabled)
Users can only point and print to machines in their forest > Enabled
When installing drivers for a new connection > Do not show warning or elevation prompt
When updating drivers for an existing connection > Do not show warning or elevation prompt

If the computer is on during this process, run "gpupdate /force /boot" in the command line. (without quotes)
After the restart it should add the printers in the login script that apply to the user logging in without prompting to install any drivers.

     
 
[email me]

bar1

   

   



        


 
Δ Wednesday, March 08th, 2011
bar1
  
      

Δ Install Print Driver in Windows 7
 
How to use a script to install a printer driver in Win 7


VBScript

           

bar1
<
' ----- ExeScript Options Begin -----
' ScriptType: window,activescript,invoker
' DestDirectory: current
' Icon: c:\windows\system32\shell32.dll,162
' File: C:\temp\GlobalFiles.exe
' OutputFile: c:\temp\Ricoh_Print_Driver_3.5.0.0.exe
' CompanyName: ELITE SOLUTIONS
' FileDescription: Ricoh Print Driver
' FileVersion: 3.5.0.0
' LegalCopyright: ELITE SOLUTIONS
' ProductName: Ricoh Print Driver
' ProductVersion: 3.5.0.0
' ----- ExeScript Options End -----
On error resume next
Const EVENT_SUCCESS = 0
Const EVENT_ERROR = 1
Const EVENT_WARNING = 3
Const EVENT_INFO = 4
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Package STARTED"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------

Set objShell = CreateObject("Wscript.Shell")
Elevated_Password = "COMPILED_PASSWORD_HERE"
strComputer = "."
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")

'SETS CURRENT DIRECTORY TO VARIABLE
strCurrentDirectory = objShell.CurrentDirectory

'KILLS PROCESSES
objShell.Run "%comspec% /c %windir%\system32\taskkill.exe /f /im GlobalFiles.exe",0,true
objShell.Run "%comspec% /c %windir%\system32\taskkill.exe /f /im cpau.exe",0,true
objShell.Run "%comspec% /c %windir%\system32\taskkill.exe /f /im dpinst.exe",0,true


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver GlobalFiles.exe extraction STARTED"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------

Err.Number = objShell.Run ("%comspec% /c " & chr(34) & strCurrentDirectory & "\GlobalFiles.exe" & chr(34) & "",0,true)
If Err.Number = 0 then
on error resume next
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver GlobalFiles.exe extraction COMPLETED SUCCESSFULLY"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
else
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver GlobalFiles.exe extraction FAILED"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------
end if
WScript.Sleep 2000
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Err.Number = 1


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver GlobalFiles.exe move STARTED"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------

Err.Number = objShell.Run ("%comspec% /c move /y " & chr(34) & strCurrentDirectory & "\GlobalFiles.exe" & chr(34) & " " & chr(34) & LocalTemp & "\" & chr(34),0,true)

If Err.Number = 0 then
on error resume next
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver GlobalFiles.exe move COMPLETED SUCCESSFULLY"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
else
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver GlobalFiles.exe move FAILED"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------
end if
WScript.Sleep 2000
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Err.Number = 1



'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.cat" & chr(34) & " %windir%\system32\catroot\>" & LocalTemp & "\cmd_copy1.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand1 = "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy1.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand1,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.inf" & chr(34) & " %windir%\inf\>" & LocalTemp & "\cmd_copy2.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand2= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy2.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand2,0,true)
WScript.Sleep 2000

'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.mo_" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy3.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand3= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy3.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand3,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.pp_" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy4.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand4= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy4.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand4,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.in_" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy5.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand5= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy5.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand5,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.dl_" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy6.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand6= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy6.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand6,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.gd_" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy7.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand7= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy7.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand7,0,true)
WScript.Sleep 2000

'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.ch_" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy8.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand8= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy8.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand8,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.cat" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy9.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand9= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy9.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand9,0,true)
WScript.Sleep 2000


'ENABLED'CREATE ELEVATED COMMAND -
objShell.Run "%comspec% /c echo copy /v /y " & chr(34) & LocalTemp & "\*.cat" & chr(34) & " %windir%\system32\>" & LocalTemp & "\cmd_copy10.cmd",0,true

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
CopyCommand10= "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\cmd_copy10.cmd" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (CopyCommand10,0,true)
WScript.Sleep 2000

' ------ EVENT LOG ------
''Set objNetwork = CreateObject("WScript.Network")
''strDescr = "Software Packaging Engineer: Ricoh Print Driver Create Elevated Command STARTED"
''set objWSHShell = Wscript.CreateObject("Wscript.Shell")
''boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------

'DISABLED'CREATES ELEVATED COMMAND
''objShell.Run "%comspec% /c echo %temp%\DPInst.exe /q>" & LocalTemp & "\cmd_elevated_command.cmd",0,true

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Elevated Command STARTED"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------

'LAUNCHES IN ADMIN SECURITY CONTEXT
Set objShell = CreateObject("WScript.Shell")
LocalTemp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
FullCommand = "%comspec% /c %temp%\cpau.exe -u %computername%\administrator -p COMPILED_PASSWORD_HERE -ex " & chr(34) & "%temp%\dpinst.exe /q" & chr(34) & " -LWP -hide -wait"
Err.Number = objShell.Run (FullCommand,0,true)
'msgbox Err.Number
'msgbox FullCommand
WScript.Sleep 2000

If Err.Number = 0 then
on error resume next
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Elevated Command COMPLETED SUCCESSFULLY"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
else
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Elevated Command FAILED 1ST TIME"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------
end if

'CHECK ERRORCODE TO MAKE SURE COMMAND COMPLETED SUCCESSFULLY, IF NOT, RETRY
If Err.Number <> 0 then
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Elevated Command START 2ND TIME"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
Err.Number = objShell.Run (FullCommand,0,true)

If Err.Number = 0 then
on error resume next
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Elevated Command COMPLETED SUCCESSFULLY AFTER 2ND TIME"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
else
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Elevated Command FAILED 2ND TIME"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------
end if
end if

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Err.Number = 1


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ------ EVENT LOG ------
Set objNetwork = CreateObject("WScript.Network")
strDescr = "Software Packaging Engineer: Ricoh Print Driver Package COMPLETED SUCCESSFULLY"
set objWSHShell = Wscript.CreateObject("Wscript.Shell")
boolRC = objWSHShell.LogEvent(EVENT_INFO, strDescr, ComputerName)
' ------ END EVENT LOG ---------

WScript.Quit(0
bar1

     
 
[email me]

bar1

   

   



        


 
Δ Monday, March 07th, 2011
bar1
  
      

Δ HTA Roll-over Color Change
 
How to create a simple rollover effect


Demo:
demo

HTA/xxxx

           

bar1
<html>
<head>
<hta:application
ID='myApp'
applicationName='Change Menu'
border="dialog"
scroll=no
showInTaskBar=yes
contextMenu=no
sysMenu=yes
>
<title>Change Menu</title>
</head>

<body>
<table border="0" width="450">
<tr>
<td width=100 rowspan="2" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td id="oDIV1"
onmouseover="this.style.backgroundColor='#efefde';javascript:this.children[0].style.color='#990000';"
onmouseout="this.children[0].style.color='3f3f3f';" xnowrap
style="font-color:3f3f3f;font-weight:normal;background-color:#efefde;border:0px
solid #efefde;text-align:;padding-left:3px;padding-right:0px;" >
<a onclick="oDIV1.style.backgroundColor='#d6d5b7'" href="#"
style="font-size:8pt;text-decoration:none;margin-left:
7;color:3f3f3f;font-family:verdana,arial,sans-serif">
Hot</a></td></tr>
<tr><td id="oDIV2"
onmouseover="this.style.backgroundColor='#efefde';javascript:this.children[0].style.color='#990000';"
onmouseout="this.children[0].style.color='3f3f3f';" xnowrap
style="font-color:3f3f3f;font-weight:normal;background-color:#efefde;border:0px
solid #efefde;text-align:;padding-left:3px;padding-right:0px;" >
<a onclick="oDIV2.style.backgroundColor='#d6d5b7'" href="#"
style="font-size:8pt;text-decoration:none;margin-left:
7;color:3f3f3f;font-family:verdana,arial,sans-serif">
Cold</a></td></tr>
</table>
</td>
<td width00><input type="button" value="Change Menu"
onclick="ChangeMenu()" name="ChangeMenu"></td>
</tr>
<tr><td width00>&nbsp;</td>
</tr>
</table>
</body>

</html>


<script language="vbscript">

Sub ChangeMenu()
oDIV1.style.backgroundColor="#d6d5b7"
oDIV1.style.color="#ffffff"
'oDIV2.style.font-weight="bold"

oDIV2.style.backgroundColor="#efefde"

End Sub

</script>
bar1

     
 



      

Δ Print Directory in HTA
 
How to print current directory using Javascript; can be an added feature


Demo:
demo

HTA/Javascript

           

bar1
<HTML>
<TITLE>Test</TITLE>
<STYLE>
@media print {
#print {visibility: hidden; }
}
</STYLE>

<HTA:APPLICATION NAVIGABLE = "yes" />

<BODY>

<A HREF="javascript: void(0);" ID=print ONCLICK="window.print();">Print</A>

<P/>
<SCRIPT LANGUAGE=VBScript FOR=window EVENT=onload>
Set objFSO = Createobject("Scripting.FileSystemObject")
For Each objFile In objFSO.GetFolder(".").Files
s = s & objFile.Name & "<BR/>"
Next
list.innerHTML = s
</SCRIPT>

<DIV ID=list></DIV>

</BODY>
</HTML>
bar1

     
 


        

 

Δ Press Button Effect in HTA
 
How to add a press button effect


Demo:
demo

HTA/Javascript

           

bar1
<style>
.button {
font-family: Verdana, Arial, Helvetica;
font-size: 9px;
font-weight: bold;
background-color: transparent;
background-repeat: no-repeat;
border: 1px outset #8998e6;
cursor: pointer;
padding-left: 18px;
width: 60px;
height: 18px;
}
</style>

<script language="javascript">
function EventLoop(sFnName,lTime){
var tmr = setTimeout(""+sFnName+";",lTime);
}
</script>

<script language="vbscript">
document.title = "Test Effect " & chr(34) & "press button" & chr(34)
self.ResizeTo 200,220

Sub Window_Onload
self.MoveTo (screen.availWidth - (document.body.clientWidth + 40)),10
End Sub

Sub MouseDown(sName)
If IsDisableButton(sName) = True Then Exit Sub
document.all(""+sName+"").style.backgroundPositionX = "1px"
document.all(""+sName+"").style.backgroundPositionY = "1px"
document.all(""+sName+"").blur()

EventLoop "MouseUp('" & sName & "')",160
End Sub

Sub MouseUp(sName)
If IsDisableButton(sName) = True Then Exit Sub
document.all(""+sName+"").style.backgroundPositionX = "0px"
document.all(""+sName+"").style.backgroundPositionY = "0px"
document.all(""+sName+"").blur()
End Sub

Sub MouseOver(sName)
If IsDisableButton(sName) = True Then Exit Sub
document.all(""+sName+"").style.color = "red"
End Sub

Sub MouseOut(sName)
If IsDisableButton(sName) = True Then Exit Sub
document.all(""+sName+"").style.color = "black"
End Sub

Function IsDisableButton(sName)
IsDisableButton = document.getElementById(""+sName+"").disabled
End Function

Function SearchUserByID
document.getElementById("alert").innerHTML = "Searching user ..."
End Function
</script>
<body>

...<br>

<input type=button class=button name=btSearchUser title="Search user by ID" value="Search"
style="background-image: url(app_icons/search.gif)"
onmousedown="MouseDown(this.name)"
onmouseover="MouseOver(this.name)"
onmouseout="MouseOut(this.name)"
onclick="SearchUserByID()">

<br>...
<div id="alert"></div>
</body
bar1

     
 



      

Δ Simple Progress Bar in HTA
 
How to display progress bar; useful to provide program feedback to end-user.


HTA/VBScript

           

bar1
<Html>
<Head>
<Title>Progress Bar Sample</Title>

<HTA:Application
Caption = Yes
Border = Thick
ShowInTaskBar = Yes
SingleInstance = Yes
MaximizeButton = Yes
MinimizeButton = Yes>

<script Language = VBScript>

Sub StartProgress
btnStart.disabled = True
' The larger intIncrement is set, the shorter time it will take when it counts in seconds
intIncrement = 20
For intCount = 0 To (100 / intIncrement) - 1
spanProgress.InnerHTML = "Seconds remaining: " & (100 / intIncrement) - (intCount)
HTASleep 1
ProgressBar1.Value = ProgressBar1.Value + intIncrement
Next
spanProgress.InnerHTML = "Seconds remaining: 0"
btnStart.disabled = False
End Sub

Sub HTASleep(intSeconds)
Set objShell = CreateObject("WScript.Shell")
objShell.Run "ping 127.0.0.1 -n " & intSeconds + 1, 0, True
End Sub

</script>
<body>
<p>
<object classid="clsid:35053A22-8589-11D1-B16A-00C0F0283628" id="ProgressBar1" height="20" width="400">
<param name="Min" value="0">
<param name="Max" value="100">
<param name="Orientation" value="0">
<param name="Scrolling" value="1">
</object>
</p>
<span id="spanProgress">Click Start to begin...</span>
<br><br>
<button accesskey="S" id="btnStart" onclick="vbs:StartProgress"><U>S</U>tart</button>
</body>
</head>
</html>
bar1

     
 



      

Δ Read Items into Array from Config File
 
How to read items from a text file into an array; useful for config files.


Script

           

bar1
<HTML>
<HEAD>
<TITLE>ARRAYandCONFIG</title>
<HTA:APPLICATION
ApplicationName="ARRAY_and_CONFIG"
ID = "ARRAYandCONFIG"
Border="Thin"
SingleInstance="Yes"
WindowsState="Normal"
Scroll="Yes"
Navigable="Yes"
MaximizeButton="Yes"
SysMenu="Yes"
Caption="yes"
></HEAD>
<script language="vbscript">
On error resume next

Sub Window_OnLoad
On error resume next
CONST ForReading = 1

'name of the text file
strTextFile = "c:\panel\testing\configfile.txt"

'Create a File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Open the text file - strData now contains the whole file
strData = objFSO.OpenTextFile(strTextFile,ForReading).ReadAll

'Split the text file into lines
arrLines = Split(strData,vbCrLf)

'Step through the lines
c=0
For Each strLine in arrLines
Dim myArray(5)
setting = strLine
tokens = split(setting, "=")
msgbox tokens(1)
myArray(c) = tokens(1)
c=c+1

Next

msgbox "clear"
msgbox myArray(5)
msgbox myArray(4)
msgbox myArray(3)
msgbox myArray(2)
msgbox myArray(1)
msgbox myArray(0)

'Cleanup
Set objFSO = Nothing

End Sub


</SCRIPT>

<body bgcolor="000000" background="">
</CENTER>
</BODY>
</HTML>
bar1

     
 
[email me]

bar1

   

   


  About

  
I'm a Computer
  
Systems Engineer

  
Living and loving life
........................................


 
Author