Zach Posted September 8, 2005 Share Posted September 8, 2005 (edited) Just figured I would throw this out here, though it wont work as is because of external file needs. Dont know if there is anything of use inside my mad rambling of hodgepodge scavenger of a script , but only saw one of these and it was a bit different. I also have a tray menu that controls the size of the message window, and the speed at which it stays.One question, I have looked every where for a way to remove the damn taskbar window, but I am either slow, or something - cause I aint finding it. Since this is something that runs non stop, I dont really want it taking up taskbar space, and I also dont want it to have a trayicon - which it doesnt - since its controlled from a simple tray menu script. Anyway, any simple way that I am overlooking to make it not appear on the taskbar?To make this run you need the cwebpage.dll (which I will remove the need for later), and you will need to fake the input coming in, should be able to just assign the variables something. Probably want to remove #notrayicon also.Just so you know what the hell I am talking about - - to see the whole thing run properly you would need http://sportsforum.ws/dist/SportsDeskSetUp.exe (though unless you are into sports, probably dont to mess with it)expandcollapse popup#include <INet.au3> #include <Process.au3> #Include <date.au3> #include <Constants.au3> #include <GUIConstants.au3> #NoTrayIcon FileOpen("updates.open", 2) FileClose("updates.open") WinWaitClose("Player Updates") FileDelete("updates.open") opt("GUIEventCompatibilityMode", 1) opt("GuiOnEventMode", 1) MouseUp("primary") $HTCAPTION = 2 $WM_NCLBUTTONDOWN = 0xA1 $dll = DllOpen("cwebpage.dll") $width = 350 $tfile = "\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\conf\ups" If FileExists($tfile) Then $file = FileOpen($tfile, 0) $widthhold = FileReadLine($file) FileClose($file) EndIf $speed = IniRead("\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\conf\sportsdesk", "playerupdates", "speed", "2000") $height = 120 $width = 350 AutoItSetOption("WinTitleMatchMode", 4) $s = WinGetPos("classname=Shell_TrayWnd", "") $bh = $s[3] $wi = @DesktopWidth - $width - 1; $hi = @DesktopHeight - $height - 1 - $bh; $gonext = 1 $hwnd = GUICreate("Player Updates", $width, $height, $wi, $hi, $WS_POPUP + $WS_EX_TOOLWINDOW + $WS_EX_TRANSPARENT) $begin = 1; ;$min = GUICtrlCreateLabel("", 314, 3, 15, 9) ;GUICtrlSetOnEvent($min, "Minimize") ;GUICtrlSetTip($min, "Minimize") ;GUICtrlSetStyle($min, -1, $WS_EX_TRANSPARENT); To select $min ;GUICtrlSetBkColor($min,0xFF00FF); To select $min $close = GUICtrlCreateLabel("", 331, 3, 15, 9) GUICtrlSetOnEvent($close, "Close") GUICtrlSetTip($close, "Close") GUICtrlSetStyle($close, -1, $WS_EX_TRANSPARENT); To select $close ;GUICtrlSetBkColor($close,0xFF00FF); To select $close $gnext = GUICtrlCreateLabel("", 279, 3, 33, 9) GUICtrlSetOnEvent($gnext, "gnext") GUICtrlSetTip($gnext, "Get next Player Update") GUICtrlSetStyle($gnext, -1, $WS_EX_TRANSPARENT); To select $close ;GUICtrlSetBkColor($gnext,0xFF00FF); To select $close $gop = GUICtrlCreateLabel("", 10, 10, 150, 30) GUICtrlSetOnEvent($gop, "gop") GUICtrlSetTip($gop, "Go to Player Page") GUICtrlSetStyle($gop, -1, $WS_EX_TRANSPARENT); To select $close ;GUICtrlSetBkColor($gop,0xFF00FF); To select $close $holding = 0 WinSetTrans("Player Updates", "", 0) GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "capture") $a = ""; DllCall($dll, "long", "EmbedBrowserObject", "hwnd", $hwnd) GUISetState() DllCall($dll, "long", "DisplayHTMLPage", "hwnd", $hwnd, "str", "about:blank") GUICtrlSetResizing(-1, $GUI_DOCKAUTO) $a2 = "" $down = 255 $up = 0 AutoItSetOption("WinTitleMatchMode", 4) $s = WinGetPos("classname=Shell_TrayWnd", "") $bh = $s[3] $t1 = @DesktopHeight $t2 = @DesktopWidth - $width $cnt = 1 $tr = 0 $holdx = $wi $holdy = $hi $maxcnt = 7 $tfile = "\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\maxcnt.txt" If FileExists($tfile) Then $file = FileOpen($tfile, 0) $maxcnt = FileReadLine($file) FileClose($file) EndIf $die = 0 $shown = 1 WinSetOnTop("Player Updates", "", 1) If $widthhold = 1 Then $size = WinGetPos("Player Updates") WinMove("Player Updates", "", $size[0] + 200, $size[1], 150, 120) EndIf $olda = "" TraySetToolTip("FSW Sports Desk Player Updates") While 1 If FileExists("updates.open") Then Exit EndIf $speed = IniRead("\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\conf\sportsdesk", "playerupdates", "speed", "2000") If Not $a2 Then $foo = Run(@ComSpec & " /c php latestname.html", "\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $av = "" While 1 $av = $av & StdoutRead($foo) If @error = -1 Then ExitLoop WEnd Else $av = $a2 EndIf If $av Then $size = WinGetPos("Player Updates") $temp = $size[0] If $holding Then WinMove("Player Updates", "", $holdx, $holdy) $holding = 0 EndIf $foo = Run(@ComSpec & " /c php latest.html", "\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $a = "" While 1 $a = $a & StdoutRead($foo) If @error = -1 Then ExitLoop WEnd DllCall($dll, "long", "DisplayHTMLStr", "hwnd", $hwnd, "str", $a) For $i = 1 To 510 + $speed Step 8 If $i = 1 Then If $olda = $a Then $i = 5000 $olda = $a EndIf If $gonext = 2 Then $i = 256 $tr = 255 EndIf $gonext = 1 If $i < 256 Then $up = $up + 8 If $up < 256 Then WinSetTrans("", "", $up) EndIf Sleep(20) ElseIf $i < 255 + $speed Then Sleep(20) ElseIf $i < 255 + $speed Then $foo = Run(@ComSpec & " /c php latestname.html", "\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $a2 = "" While 1 $a2 = $a2 & StdoutRead($foo) If @error = -1 Then ExitLoop WEnd $i = 510 + $speed; If $a2 Then ExitLoop EndIf Else $down = $down - 8 If $down > - 1 Then WinSetTrans("", "", $down) Else WinSetTrans("", "", 0) $down = 255 $up = 0; ExitLoop EndIf Sleep(20) EndIf Next EndIf $dif = TimerDiff($begin) If $dif > 25000 Then $begin = TimerInit() $foo = Run(@ComSpec & " /c php fsw" & $cnt & ".html", "\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\", @SW_HIDE) ProcessSetPriority("php.exe", 1) ; $rc = _RunDos("php ""\Program Files\FSW SportsDesk\www\htdocs\localhost\public_html\fsw" & $cnt & ".html""") $cnt = $cnt + 1 If $cnt >= $maxcnt Then $cnt = 1 EndIf ; WinSetState("Player Updates", "", @SW_HIDE) ; sleep(25000) EndIf If $a = "" Then If $holding Then Sleep(5000) Else $holding = 1 $size = WinGetPos("Player Updates") $holdx = $size[0] $holdy = $size[1] WinMove("Player Updates", "", 999999, 999999) Sleep(5000) EndIf EndIf $av = 0 $a = "" $s_URL = 0 WEnd Func gop() Run(@ScriptDir & "\SportsDesk.exe " & $av) ProcessSetPriority("SportsDesk.exe", 3) EndFunc ;==>gop Func gnext() $i = 3000; EndFunc ;==>gnext Func Close() Exit EndFunc ;==>Close Func Minimize() GUISetState(@SW_MINIMIZE) EndFunc ;==>Minimize Func Capture() DllCall("user32.dll", "int", "ReleaseCapture") DllCall("user32.dll", "int", "SendMessage", "hWnd", $hwnd, "int", $WM_NCLBUTTONDOWN, "int", $HTCAPTION, "int", 0) EndFunc ;==>Capture Edited September 8, 2005 by Zach Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now