Solved

IE Based options

Posted on 2004-03-23
8
261 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 125
Image decoding from Camera 3 96
Is doing tutor.com teaching in my situation advisable? 2 110
storing csv file in table variable in Python 2 24
This is an explanation of a simple data model to help parse a JSON feed
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

856 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