#87729 - 2002-09-13 01:23 AM
Re: BBChecker II - Update - Continued
|
MightyR1
MM club member
![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif)
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
|
Top
|
|
|
|
#87734 - 2002-09-13 02:02 AM
Re: BBChecker II - Update - Continued
|
MightyR1
MM club member
![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif)
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
Jooel,
if you use the old formlink code, you're able to put more text in the link,
try this
code:
; ; BBChecker II - KiXtart Bulleting Board New Post Checker ; ; Dependencies: ; Wkix32 - GUIfriendly KiXtart 4.11 ; kixforms.dll - KiXForms 2.0.3 ; IE5 ; ; -Lonkero ; ;
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Break ON Gosub "init" Play "1g256t1d600f1g256t1d600f1g256t1d600f1g256t4d400f" $msg.show ;Enable following two lines for testing the slider slide("Yahoo, Jooel is buying me a six-pack of Heineken!!!","www.kixtart.org") Exit 0 While $m.visible $=Execute($m.doevents) Loop Gosub "final" Exit 0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Function update() parse() If $show $msg.caption=$show $hlurl.listindex=0 $msg.value=$hlurl.text $msg.show $m.caption=$show+" - BBChecker II" If $Beep Play "1g256t1d500f1g256t1d400f1g256t1d600f" EndIf If $fo=0 AND $sslider $m.show(2) slide($show,$hlurl.text) EndIf EndIf EndFunction
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Function parse() $httpobj.Open("GET","http://kixtart.org/cgi-bin/ultimatebb.cgi?", NOT 1) $httpobj.send() $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 $show=0 For $=0 TO 7 If $x[$]<>$old[$] $show=$x[$] $hl.additem($x[$]+" "+Left(@time,5)+" on @mdayno. of "+Left(@month,3)+" {"+$forum[$]+"}",0) $hlurl.additem($y[$],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.visible=1 $hbh.visible=1 $hbo.visible=1 $hba.visible=1 Else $bl.visible=1 $blt.visible=1 $bbh.visible=1 $bbp.visible=1 $bbr.visible=1 $bbm.visible=1 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.visible=0 $bbh.visible=0 $bbp.visible=0 $bbr.visible=0 $bbm.visible=0 $blt.visible=0 Else $fbh.enabled=1 $hl.visible=0 $hbh.visible=0 $hbo.visible=0 $hba.visible=0 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 $h = 22 ;PR ADDED $h1 = 18 ;PR ADDED $w = 500 ;PR ADDED $p = CreateObject("Kixtart.Form") $p.borderstyle = 0 $p.height = 0 ;PR $p.Height = 22 $p.width = $w + 6 ;PR $p.Width = 200 $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-$p.width-1 ;PR $p.Left = $m.screen.width-660 $p.showintaskbar = 0 ;PR $l = $p.hyperlink($sc,2,2,296,18) ;PR $l = $p.hyperlink($sc,2,2,196,18) ;PR $l.backcolor = $p.rgb(255,255,0) ;PR $l.borderstyle = 0 ;PR $l.alignment = 2 ;PR $l.value = $scv $poplabel = $p.label($sc,2,$h1,$w,$h1) ;PR ADDED $poplabel.backcolor = $p.rgb(255,255,0) ;PR ADDED $poplabel.borderstyle = 0 ;PR ADDED $poplabel.alignment = 2 ;PR ADDED $p.onmousemove="$$poplabel.fontbold=1 $$poplabel.fontunderline=0" ;PR ADDED $poplabel.onmousemove="$$poplabel.fontbold=1 $$poplabel.fontunderline=1" ;PR ADDED $poplabel.onmouseup="$runie "+Chr(34)+$scv+Chr(34)+"' sleep 0.5 $$p.visible=0 " ;PR ADDED $c = $p.timer(20) $c.ontimer = " If $$d=1 $$p.top=$$p.top-1 $$p.height=$$p.Height+1 ;PR added If $$p.top<($$t-3*$h1) ;PR If $$p.top<($$t-40) $$c.interval=3000 $$d=0 EndIf Else If $$d=2 $$c.interval=20 $$p.top=$$p.Top + 1 $$p.height=$$p.Height-1 ;PR added 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.width = 250 $f.height = 350 $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") $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.textbox($looptime,150,258,25,17) $f.printxy(20,260,"Post check interval (secs):") $foc = $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.enabled=1 Else $fpt.enabled=0 EndIf $foc.value = $Beep $fs.value = $sslider $fb = $f.button("OK",170,305,75,20) $fb.onclick = 'if val($$lt.text)<10 $$lt.text="10" else $$f.visible=0 endif' $f.show While $f.visible $=Execute($f.doevents) If $fp.value $fpt.enabled=1 Else $fpt.enabled=0 EndIf If 99<Val($lt.text) $lt.text="99" EndIf Loop $looptime = Val($lt.text) $Beep = $foc.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") $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?ubb=" $fo=1 $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 $m.onlostfocus = "$$fo=0" $m.ongotfocus = "$$fo=1" $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 = "misc()" $fbs.tooltip="Checker's Settings and info" $fbh = $m.button("History",$m.width - 68,20,65,19) $fbh.enabled=0 $fbh.onclick = "$$fbh.enabled=0 show(2) $$m.setfocus()" $fbb = $m.button("Buddyes",$fbh.Left - 68,20,65,19) $fbb.enabled=0 $fbb.onclick = "$$fbb.enabled=0 show(1) $$m.setfocus()" $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.onclick="$$m.setfocus()" $hl.tooltip="Posts since checker started. hint: doubleclick to open topic" $hbh = $m.button("Hide",$m.width - 80,175,75,20) $hbh.visible = 0 $hbh.onclick = "hide(2) $$fo=1" $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)+"'" $hbo.tooltip="Show selected topic in browser" $hba = $m.button("Today's Active topics",150,175,130,20) $hba.visible = 0 $hba.onclick = "$$m.show(2) $runie "+Chr(34)+$org+"get_daily"+Chr(34)+"'" $hba.tooltip="Show today's active topics in browser. Note:days are switches by board time." $hlurl = $m.listbox(0,0,0,0,20) $hlurl.visible = 0 ;buddyes block $bl = $m.listbox(0,2,15,200,80) $bl.visible = 0 $bl.onclick="$$m.setfocus()" $bll = $m.listbox(0,0,0,0,20) $bll.visible = 0 $bll.ongotfocus="$$m.setfocus()" $blt = $m.label("Logged on users:",5,2,150,12) $blt.visible = 0 $blt.ongotfocus="$$m.setfocus()" $bbh = $m.button("Hide",$m.width - 80,15,75,20) $bbh.visible = 0 $bbh.onclick = "hide(1) $$fo=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+"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+"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+"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") ;finalize starting parse() $hl.clear $hlurl.clear $show=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
... Going to bed too (2:02 AM), sleep tight. Don't let the KiX(forms) bugs bite... ... [ 13. September 2002, 08:02: 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
|
|
|
|
#87736 - 2002-09-13 08:37 AM
Re: BBChecker II - Update - Continued
|
MightyR1
MM club member
![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif)
Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
|
Shawn,
here's some code for you to try:
code:
Break ON $m = CreateObject("kixtart.form") $m.caption = "Test .hyperlink object" $m.width = 800 $m.height = 100 $m.top=($m.screen.height - $m.height) / 2 $m.Left = ($m.screen.width - $m.width) / 2 $m.borderstyle = 1 $m.fontsize = 8 $m.fontname = "helvetica" $m.forecolor = 0 $m.fontbold = 0 $m.visible = 1 $x="Hover over a hyperlink to see a tooltip. Notice the tooltip contains the full string!!!" $label = $m.label($x,15,2,750,15) $x = "1 2 3 4 5 6 7 8 9 0 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" $msg = $m.hyperlink($x,15,29,750,15) $x = "This_is_a_very_long_text_without_any_spaces_in_it_to_test_the_.hyperlink_object._As_you_can_see_it_is_able_to_use_a_long_text_as_long_as_there_are_no_spaces_in_it..." $msg1 = $m.hyperlink($x,15,48,750,15) While $m.visible $=Execute($m.doevents) Loop Exit 0
Jooel,
as you can see the bug also appears "outside" the slider...
_________________________
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
|
|
|
|
#87745 - 2002-09-15 01:38 AM
Re: BBChecker II - Update - Continued
|
Shawn
Administrator
![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif) ![*](/forums/images/general/default/star.gif)
Registered: 1999-08-13
Posts: 8611
|
Jooel - I guess the nice thing about having the slider "outside" the script ... is that maybe you could "publish" different sliders ... and plug-and-play them ... you know - some big - some small - some fancy - like you say - modular scripting
See Patrick - that made it so easy - even though I'm not a home right now (no code) - know pretty much what it is ... your aware that the CAPTION property, used after the control is created - still works though (yeah?), example:
$x = "1 2 3 4 5 6 7 8 9 0 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" $msg = $m.hyperlink($x,15,29,750,15) $msg.caption = $x
Thinnk the problem is just in the caption used in the constructor. [ 15. September 2002, 01:39: Message edited by: Shawn ]
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 132 anonymous users online.
|
|
|