Solved

IE Based options

Posted on 2004-03-23
8
265 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …
Progress

631 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