Solved

IE Based options

Posted on 2004-03-23
8
256 Views
Last Modified: 2010-04-17
Would it be possible to allow someone to PAUSE the count down ? I.e add a PAUSE button and when they click it, it displays PAUSE in the same Dialog box.

As per this question http://www.experts-exchange.com/Programming/Q_20928655.html

Thanks
0
Comment
Question by:gisvpn
  • 4
  • 4
8 Comments
 
LVL 10

Expert Comment

by:Kavar
ID: 10657554
Give me a couple to set this up....
0
 

Author Comment

by:gisvpn
ID: 10657586
No Prob :)
0
 
LVL 10

Accepted Solution

by:
Kavar earned 500 total points
ID: 10658006
Change WindowHeight and WindowWidth to sizes that you like
set maxtime to the max seconds to wait
**************Begin Script*****************
WindowHeight=300
WindowWidth=300
MaxTime=5
If WScript.Arguments.Count then
      Dim ie
      Set ie=CreateObject("InternetExplorer.Application")
      ie.Navigate2 "About:Blank"
      Do While ie.Busy =True
      WScript.Sleep 10
      Loop
      ie.Height = WindowHeight
      ie.Width = WindowWidth
      ie.MenuBar =False
      ie.ToolBar =False
      ie.StatusBar =False
      ie.Document.Title="Message Window"
      ie.Resizable =False
      Set text1=ie.Document.createelement("<Div>")
      Set text2=ie.Document.createelement("<Div>")
      Dim Command
      Set Command=ie.Document.createelement("<INPUT>")
      command.type="Button"
      command.Value="Pause"
      ie.Document.body.appendchild(text1)
      ie.Document.body.appendchild(text2)
      ie.document.body.appendchild(command)
      command.onClick=GetRef("Pause")
      ie.Document.body.onKeyDown=GetRef("KeyPressed")
      text1.innerHTML=WScript.Arguments(0)
      text2.innerHTML=int(MaxTime) & " Second(s) Remain"
      Dim continue
      continue=False
      Dim Paused
      Paused=False

      ie.Visible =True
      TimeLeft=MaxTime

      Do While Continue=False And (TimeLeft Or Paused)
            If paused=False then
                  Text2.innerhtml=int(TimeLeft) & " Second(s) Remain"
                  TimeLeft=TimeLeft-.1
                  If TimeLeft<0 Then TimeLeft=0
            End if
            WScript.Sleep 100
      Loop
      ie.Quit
      Set ie=Nothing
End if
Function KeyPressed()
Continue=True
End Function
Function Pause()
If Paused Then
      command.Value="Unpause"
      Paused = false
 Else
       command.Value="Pause"
       Paused = true
End if
End Function
**************End Script*****************
0
 

Author Comment

by:gisvpn
ID: 10659685
Hi Kavar

If IE disabled on a computer will this still work ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:Kavar
ID: 10659706
IE disabled?  (how is it disabled)

Depending on how... it will continue to work,
But, I can put code in there so that if the IE does not instantiate it reverts to the older method...
0
 

Author Comment

by:gisvpn
ID: 10660456
We have removed the IE executable..

Sorry has only occured to me  ! Sorry..

Is there any other way to do this without using IE ? :)
0
 
LVL 10

Expert Comment

by:Kavar
ID: 10660718
Not that I can see without writing an executable...
(I am a programmer for hire so if you guys need one ,I am really cheap :} )
0
 

Author Comment

by:gisvpn
ID: 10661188
Ok thats cool...

You know there may be some work you could do for us, later in the year.

Could you send some details ( what you do | costs )  to  : oliver.a.koh@groupis.co.uk

Thank you !

:)


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now