#88017 - 2002-09-18 09:56 AM
Re: devel of new checker
|
MightyR1
MM club member
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
I was just about to say it didn;t work...
Wil try again with this one.
{edit}
added the new checker source to make the topic longer...
code:
; ; BBChecker II - KiXtart Bulleting Board New Post Checker ; ; Dependencies: ; Wkix32 - GUIfriendly KiXtart 4.11 ; kixforms.dll - KiXForms 2.0.5 ; IE5 ; ; -Lonkero ; ; Break on Gosub "init" $msg.show While $m.visible $=Execute($m.doevents) Loop Gosub "final" Exit 0
Function update() parse() If $s $msg.caption=$s $hlurl.listindex=0 $msg.value=$hlurl.text $msg.show $m.caption=$s+" - BBChecker II" If $Beep Play "1g256t1d500f1g256t1d400f1g256t1d600f" EndIf If $sslider slide($s,$hlurl.text) EndIf EndIf EndFunction
Function parse() $httpObj.Open("GET",$org) $httpObj.send() While $httpObj.readystate<>4 $=Execute($m.doevents(1)) Sleep 0.02 Loop $data=$httpObj.Responsetext If 5000<Len($data) $data=SubStr($data,InStr($data,'ubb=get_profile')+10) $bl.clear $bll.clear If InStr($data,'ubb=get_profile')<InStr($data,'guest(s)') $data=SubStr($data,InStr($data,'ubb=get_profile')) $users=SubStr($data,1,InStr($data,' and')) For Each $user in Split($users,'</a>, ') $bll.additem(SubStr($user,InStr($user,';u=')+3,InStr($user,'">')-3-InStr($user,';u=')),-1) $bl.additem(SubStr($user,InStr($user,'">')+2),-1) Next $bl.removeitem($bl.listcount-1) EndIf For $c=0 to 7 $data=SubStr($data,InStr($data,' <a href=')+15) $y[$c]=SubStr($data,1,InStr($data,'"')-1) $data=SubStr($data,InStr($data,'>')+1) $x[$c]=SubStr($data,1,InStr($data,'</a>') - 1)+" " $x[$c]=join(Split($x[$c],"""),'"') $x[$c]=join(Split($x[$c],"&"),'&') $data=SubStr($data,InStr($data,Chr(10))+1) If InStr(SubStr($data,1,1),"<") $users=SubStr($data,7,InStr($data,Chr(10))-7) Else $users=SubStr($data,1,InStr($data,Chr(10))-1) EndIf $x[$c]=$x[$c]+$users If $my AND InStr($users,$logon) $old[$c]=$x[$c] EndIf Next $s=0 For $=0 to 7 If $x[$]<>$old[$] $s=$x[$] $hl.additem($x[$]+" "+Left(@time,5)+" on @mdayno. of "+Left(@month,3)+" {"+$forum[$]+"}",0) $httpObj.Open("GET",$org+"ubb=forum&f="+$forumN[$]+"&DaysPrune=1&submit=Go") $httpObj.send() While $httpObj.readystate<>4 $nul=Execute($m.doevents(1)) Sleep 0.02 Loop $data=$httpObj.Responsetext $data=SubStr($data,InStr($data,$y[$])) $nul=SubStr($data,"</td>") If InStr($nul,'</a> <font face="Verdana, Helvetica, sans-serif" size="1"> Pages: <a') $nul=SubStr($nul,InStrRev($nul,"</a>")-1,1) Else $nul=1 EndIf $data=SubStr($data,InStr($data,"#f7f7f7")) $data=SubStr($data,1,InStr($data,"</font>")-1) $data=Val(SubStr($data,InStrRev($data,">")+1)) $hlurl.additem($y[$]+";p=$nul"+"#"+Right("00000$data",6),0) EndIf Next EndIf $old=$x EndFunction
Function show($) $m.height=$m.height+(100*$) If $m.height=340 $hl.top=102 $hbh.top=275 $hbo.top=275 $hba.top=275 Else $hl.top=2 $hbh.top=175 $hbo.top=175 $hba.top=175 EndIf If $=2 $hl.show $hbh.show $hbo.show $hba.show Else $bl.show $blt.show $bbh.show $bbp.show $bbr.show $bbm.show EndIf $m.top=$screen-taskbar()+3-$m.height $msg.top = $m.height-38 $fbe.top = $m.height-20 $fbh.top = $fbe.top $fbb.top = $fbe.top $fbs.top = $fbe.top $m.show(1) EndFunction
Function hide($) $m.height=$m.height-(100*$) If $=1 $fbb.enabled=1 $bl.hide $bbh.hide $bbp.hide $bbr.hide $bbm.hide $blt.hide Else $fbh.enabled=1 $hl.hide $hbh.hide $hbo.hide $hba.hide EndIf $m.top=$screen - (taskbar() + $m.height - 3) $msg.top = $m.height-38 $fbe.top = $m.height-20 $fbh.top = $fbe.top $fbb.top = $fbe.top $fbs.top = $fbe.top $hl.top=2 $hbo.top=175 $hba.top=175 $hbh.top=175 $m.show(1) EndFunction
Function TaskBar() If @dos=="4.0" $_S="StuckRects" Else $_S="StuckRects2" EndIf $TaskBar=Val("&"+SubStr(ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\$_S","settings"),41,2)) EndFunction
Function slide($sc,$scv) Dim $t,$d,$l,$c,$p $t = $screen - taskbar() $d = 1 $p = CreateObject("Kixtart.Form") $p.BorderStyle = 0 $p.Height = 22 $p.Width = 300 $p.fontsize = 10 $p.fontname = "helvetica" $p.forecolor = 0 $p.fontbold = 1 $p.BorderStyle = 1 $p.backcolor = $p.RGB(255,255,0) $p.Top = $t $p.Left = $m.screen.width-760 $p.ShowInTaskbar = 0 $l = $p.hyperlink("$sc",2,2,296,18) $l.Backcolor = $p.RGB(255,255,0) $l.value = $scv $c = $p.Timer(20) $c.OnTimer = " If $$d=1 $$p.Top=$$p.Top-1 If $$p.top<($$t-40) $$c.Interval=3000 $$d=0 EndIf Else If $$d=2 $$c.Interval=20 $$p.Top=$$p.Top + 1 If $$p.top>$$t $$c.Enabled=0 $$p.Hide EndIf Else $$d=2 EndIf EndIf " $p.Show $p.TopMost = 1 While $p.Visible $=Execute($p.DoEvents) Loop EndFunction
Function misc() $f = CreateObject("kixtart.form") $f.caption = "bbChecker II - Miscellaneous" $f.clientwidth = 250 $f.clientheight = 330 $f.top = $screen/2-100 $f.Left = $f.screen.width-720 $f.fontbold=1 $f.fontname = "Bookman Old Style" $f.printxy(20,10,"bbChecker II 1.1.2") $f.fontbold=0 $f.printxy(20,30,"Based on:") $f.printxy(20,45,"Kixtart 4.11 (wkix32.exe)") $f.printxy(20,60,"KixForms GUI (KixForms.dll)") $f.printxy(20,80,"Special thanks for helping me out") $f.printxy(20,95,"and making things possible go to:") $f.fontitalic=1 $f.printxy(20,110,"Ruud Van Velsen") $f.printxy(20,125,"Shawn Tassie") $f.printxy(20,140,"Chris S. ,Patrick Rutten ...") $f.printxy(20,155,"everyone contributing to kixtart.org bbs") $f.fontitalic=0 $f.fontname = "helvetica" $fp = $f.checkbox("Don't show my posts",20,235,130,15) $f.printxy(150,220,"Logonname:") $fpt = $f.textbox($logon,150,235,65,17) $lt=$f.combobox(,150,258,40,17) For $=10 to 99 $lt.additem($) Next $lt.value=$looptime $f.printxy(20,260,"Post check interval (secs):") $fo = $f.checkbox("Beep on post",20,280,110,15) $fs = $f.checkbox("Show slider",20,300,90,15) $fp.value = $my If $fp.value $fpt.show Else $fpt.hide EndIf $fo.value = $Beep $fs.value = $sslider $fb = $f.button("OK",170,305,75,20) $fb.onclick = '$$f.hide' $f.show While $f.visible Sleep 0.02 $=Execute($f.doevents(1)) If $fp.value $fpt.show Else $fpt.hide EndIf If 99<Val($lt.value) OR 10>Val($lt.value) $lt.value=$looptime EndIf Loop $looptime = Val($lt.value) $Beep = $fo.value $sslider = $fs.value $my = $fp.value $logon=$fpt.text $=WriteValue($bk,"looptime",""+$looptime,"reg_sz") $=WriteValue($bk,"beep",""+$Beep,"reg_sz") $=WriteValue($bk,"slider",""+$sslider,"reg_sz") $=WriteValue($bk,"my",""+$my,"reg_sz") $=WriteValue($bk,"logon",""+$logon,"reg_sz") $Loop.interval=1000*$looptime EndFunction
:init $m = CreateObject("kixtart.form") Global $x[7] $forum=Split("Starters Scripts General COM UDF Beta Suggestions FAQ") $forumN=1,2,14,13,12,3,4,10 $old=$x $y=$x $screen=$m.screen.height $runie = "run '"+ReadValue("HKEY_CLASSES_ROOT\htmlfile\shell\open\command","")+" " $org="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?" $m.caption = "BBChecker II" $m.icon=@scriptdir+"\bb.ico" $m.width = 430 $m.height = 40 $m.Left = $m.screen.width - $m.width - 20 $m.borderstyle = 0 $m.fontsize = 8 $m.fontname = "helvetica" $m.forecolor = 0 $m.fontbold = 0 $msg = $m.hyperlink("Loading elements...",15,2,410,15) $m.top = $screen - (taskbar() + $m.height - 3) $fbe = $m.button("Exit",2,20,65,19) $fbe.onclick = "$$m.visible = 0" $fbs = $m.button("Miscellaneous",69,20,80,19) $fbs.onmouseup = "$$m.show(2) misc() $$m.show" $fbh = $m.button("History",$m.width - 68,20,65,19) $fbh.enabled=0 $fbh.onclick = "$$fbh.enabled=0 show(2)" $fbb = $m.button("Buddies",$fbh.Left - 68,20,65,19) $fbb.enabled=0 $fbb.onclick = "$$fbb.enabled=0 show(1)" $m.visible = 1
;history block $hl = $m.listbox(0,2,2,426,170) $hl.visible = 0 $hl.OnDblClick = "$$m.show(2) $$hlurl.listindex=$$hl.listindex $runie "+Chr(34)+"'+$$hlurl.text+'"+Chr(34)+"'" $hl.mousepointer=16 $hbh = $m.button("Hide",$m.width - 80,175,75,20) $hbh.visible = 0 $hbh.onclick = "hide(2)" $hbo = $m.button("Show Topic",5,175,75,20) $hbo.visible = 0 $hbo.onclick = "$$m.show(2) $$hlurl.listindex=$$hl.listindex $runie "+Chr(34)+"'+$$hlurl.text+'"+Chr(34)+"'" $hba = $m.button("Today's Active topics",150,175,130,20) $hba.visible = 0 $hba.onclick = "$$m.show(2) $runie "+Chr(34)+$org+"ubb=get_daily"+Chr(34)+"'" $hlurl = $m.listbox(0,0,0,0,20) $hlurl.visible = 0
;buddies block $bl = $m.listbox(0,2,15,200,80) $bl.visible = 0 $bll = $m.listbox(0,0,0,0,20) $bll.visible = 0 $blt = $m.label("Logged on users:",5,2,150,12) $blt.visible = 0 $bbh = $m.button("Hide",$m.width - 80,15,75,20) $bbh.visible = 0 $bbh.onclick = "hide(1)" $bbp = $m.button("Show Profile",210,15,78,20) $bbp.visible = 0 $bbp.onclick = "$$m.show(2) $$bll.listindex=$$bl.listindex $runie "+Chr(34)+$org+"ubb=get_profile;u='+$$bll.text+'"+Chr(34)+"'" $bbr = $m.button("Recent Posts",210,40,78,20) $bbr.visible = 0 $bbr.onclick = "$$m.show(2) $$bll.listindex=$$bl.listindex $runie "+Chr(34)+$org+"ubb=recent_user_posts;u='+$$bll.text+'"+Chr(34)+"'" $bbm = $m.button("Send Message",210,65,78,20) $bbm.visible = 0 $bbm.onclick = "$$m.show(2) $$bll.listindex=$$bl.listindex $runie "+Chr(34)+$org+"ubb=private_message;u='+$$bll.text+'"+Chr(34)+"'"
;settings $bk="HKEY_CURRENT_USER\Software\Jooel\bbChecker" If NOT KeyExist($bk) $=MessageBox("bbChecker II installation corruption!@crlfThis propably is due to unclean installation@crlfRe-install needed","bbChecker II",16) Exit 0 EndIf $looptime=Val(ReadValue($bk,"looptime")) $Beep=Val(ReadValue($bk,"beep")) $sslider=Val(ReadValue($bk,"slider")) $my=Val(ReadValue($bk,"my")) $logon=ReadValue($bk,"logon")
;xmlhttp related func $xK="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" $cache=ReadValue($xK,"SyncMode5") $=WriteValue($xK,"SyncMode5","3","reg_dword") $httpObj = CreateObject("microsoft.xmlhttp")
;at some point might want to have one instance for every forum for speed... ;global $forumIE[7] ;for $=0 to 7 $forumIE[$]=CreateObject("microsoft.xmlhttp") next
;finalize starting parse() $hl.clear $hlurl.clear $hl.additem("started at @time @date") $hlurl.additem($org) $hl.listindex=0 $bl.listindex=0 $s=0 $fbb.enabled=1 $fbh.enabled=1 $msg.caption = "" $msg.value="" $Loop = $m.timer(1000*$looptime) $Loop.ontimer="update()" Return
:final $=WriteValue($xK,"SyncMode5",$cache,"reg_dword") Return
[ 18. September 2002, 09:57: Message edited by: MightyR1 ]
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
|
Top
|
|
|
|
#88029 - 2002-09-18 01:35 PM
Re: devel of new checker
|
MightyR1
MM club member
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
Jooel,
check out this checker... The DOS box display "slider.top slider.bottom slider.height". Can you explain the jump from 2 to 27 at the beginning?
Does your checker take more time to load the elements too???
code:
Break on $d = 1 $h = 22 $h1 = 18 $w = 300 $p = CreateObject("Kixtart.Form") $q = $p.screen.width $p.BorderStyle = 0 $p.height = 0 $p.width = $w + 6 $p.fontsize = 10 $p.fontname = "helvetica" $p.forecolor = 0 $p.fontbold = 1 $p.BorderStyle = 1 $p.backcolor = $p.RGB(255,255,0) $p.Top = $t $p.Left = $q-$p.width $p.ShowInTaskbar = 0 $poplabel = $p.label($sc,2,$h1,$w,$h1) $poplabel.backcolor = $p.rgb(255,255,0) $poplabel.borderstyle = 0 $poplabel.alignment = 2 $p.onmousemove="$$poplabel.fontbold=1 $$poplabel.fontunderline=0" $poplabel.onmousemove="$$poplabel.fontbold=1 $$poplabel.fontunderline=1" $poplabel.onmouseup="$runie "+Chr(34)+$scv+Chr(34)+"' sleep 0.5 $$p.visible=0 " $c = $p.Timer(20) $c.OnTimer = " If $$d=1 $$p.Top=$$p.Top - 1 $$p.height=$$p.Height+1 If $$p.top<($$t-3*$h1) $$c.Interval=3000 $$d=0 EndIf Else If $$d=2 $$c.Interval=20 $$p.Top=$$p.Top + 1 $$p.height=$$p.Height-1 If $$p.top>$$t $$c.Enabled=0 $$p.Hide EndIf Else $$d=2 EndIf EndIf " $p.Show $p.TopMost = 1 While $p.Visible $=Execute($p.DoEvents) Loop
[ 18. September 2002, 13:49: Message edited by: MightyR1 ]
_________________________
Greetz, Patrick Rutten
- We'll either find a way or make one... - Knowledge is power; knowing how to find it is more powerful... - Problems don't exist; they are challenges...
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 507 anonymous users online.
|
|
|