Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IE Based options

Posted on 2004-03-23
8
Medium Priority
?
274 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 2000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:gisvpn
ID: 10659685
Hi Kavar

If IE disabled on a computer will this still work ?
0
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Simple Linear Regression
Starting up a Project

886 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