General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
tabs auto-switcher
Posted by: disrupted
Date: April 29, 2009 07:08AM

http://kmeleon.swiftfree.net/files/kmtabswitch.7z

auto switches to the next tab after predefined time interval in minutes.. handy when reading a review article in several pages(tabs) like bbc HYS etc with many tabs .. especially for the super lazy or when reading in bed and keyboard/mouse is out of reach. will also auto-scroll the page..

set the time according to the pages and how fast you'll read them. case one page/tab; tabswitcher will function as an autoscroller.. or you can just use it as an auto scroll by setting a long time interval(60 minutes)

; AutoIt Version: 3.3.0
; Language: English
; Platform: Win9x/NT
; Author: yanni

#NoTrayIcon
#include <GUIConstantS E X.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#Include <String.au3>

$intervals=InputBox("Interval between switches", "Enter time interval in minutes:", "", "", "70", "70")
$smartass=StringIsDigit($intervals)
if $smartass=0 Then
MsgBox(4096, "User error", "please enter numerical values only.", 10)
exit
elseIf $intervals<1 Then
MsgBox(4096, "User error", "please enter value more than 0(minutes).", 10)
exit
else
$seconds=("60000")
$total=($intervals * $seconds)
tabswitch()
;MsgBox(4096, "Test", $total, 10)
endIf

Func tabswitch()
Opt("GUIOnEventMode", 1)
$kmswitch = GUICreate("tabs switcher", 130, 26, 0, 30, BitOR($WS_DLGFRAME, $WS_POPUP, $WS_EX_TOPMOST))
$quitter = GUICtrlCreateButton("Quit Switcher", 0, 0, 130, 26, BitOR($BS_FLAT, $WS_BORDER, $WS_EX_STATICEDGE))
GUICtrlSetOnEvent($quitter, "ENDE")
GUISetState(@SW_SHOW)

WinSetState("[CLASS:KMeleon Browser Window]", "", @SW_MAXIMIZE)
sleep(444)
WinSetOnTop("tabs switcher", "", 1)
sleep(2000)
MouseMove(40, 110)
sleep(8000)
MouseClick("middle", 40, 110, 1, 100)
sleep(1222)
MouseMove(40, 130, 100)
While 1
sleep($total)
if ProcesS E Xists("k-meleon.exe") Then
WinActivate("[CLASS:KMeleon Browser Window]", "")
Send("^{TAB}")
sleep(2000)
MouseMove(40, 110)
sleep(8000)
MouseClick("middle", 40, 110, 1, 100)
sleep(1222)
MouseMove(40, 130, 100)
Else
exit
EndIf
WEnd
EndFunc

Func ENDE()
Exit
EndFunc

(red words=one word)








Options: ReplyQuote


K-Meleon forum is powered by Phorum.