Jump to content

Edit Looping time interval - (Moved)


Recommended Posts

Hi, im new here...

please refer to my code below, i just want to add an edit box for the sleep function.

for more details if i run this i want this program to show a text box which can edit the looping time interval.

anyone can help me?

 

#include <IE.au3>

HotKeySet("^!p", "_Pause")
$Paused = 0

$oIE = _IECreate("www.google.nl")
$IEhwnd = _IEPropertyGet($oIE, "hwnd")
__IENavigate($oIE, "www.google.nl", 0, 0x800)
__IENavigate($oIE, "www.google.nl", 0, 0x800)

While 1
If WinExists($IEhwnd) Then
    WinActivate($IEhwnd)
Else
    ExitLoop
EndIf

Sleep(5000)
Send("^{TAB}")
WEnd


Func _Pause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
    WEnd
EndFunc

 

 

New.au3

Link to comment
Share on other sites

Do you mean something like this :

#include <IE.au3>

HotKeySet("^!p", "_Pause")
$Paused = 0

$oIE = _IECreate("www.google.nl")
$IEhwnd = _IEPropertyGet($oIE, "hwnd")
__IENavigate($oIE, "www.google.nl", 0, 0x800)
__IENavigate($oIE, "www.google.nl", 0, 0x800)

While 1
  If WinExists($IEhwnd) Then
    WinActivate($IEhwnd)
  Else
    ExitLoop
  EndIf

  ShowCountDown(5)
  Send("^{TAB}")
WEnd

Func _Pause()
  $Paused = Not $Paused
  While $Paused
    Sleep(100)
  WEnd
EndFunc   ;==>_Pause

Func ShowCountDown($nSeconds)
  SplashTextOn("Timer Count", $nSeconds & " sec remaining", 250, 50)
  For $i = $nSeconds - 1 To 0 Step -1
    Sleep(1000)
    ControlSetText("Timer Count", "", "Static1", $i & " sec remaining")
  Next
  SplashOff()
EndFunc   ;==>ShowCountDown

When posting code, use <> (just before emoticon).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...