Solved

IE Based options

Posted on 2004-03-23
8
255 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
linearIn  challenge 23 65
for loop with Set 4 45
PHP question(s) about order of output 9 42
C Programming - If Statement 8 48
A short article about a problem I had getting the GPS LocationListener working.
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.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

707 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

12 Experts available now in Live!

Get 1:1 Help Now