Leaderboard
Popular Content
Showing content with the highest reputation on 05/12/2015 in all areas
-
Bitmap2AscII use Lucida Console font with a size set to 8, so Windows 8/8.1 users need to change their notepad font and size for get a correct display. Image Rescale slider is only available when saving as image. A click on the "PreviewEdit" open AscII string in Notepad. You can save as Text, Html or Image (add the extension you want) Each setting change is immediately applied. Downloads available in the download section Hope you like it !2 points
-
Hi, This time I really do mean for this to be my last contribution (but who knows?): #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <ButtonConstants.au3> #include <Date.au3> $iMargin_X = 10 $iMargin_Y = 10 $iMargin_Inter = 5 $iSize = 50 $iLabel_Level = ($iSize * 5) + $iMargin_Inter + 20 $hGUI = GUICreate("Fibonacci Clock", ($iSize * 8) + ($iMargin_X * 2), $iLabel_Level + 50) GUISetBkColor(0xC4C4C4) $cBack = GUICtrlCreateLabel("", $iMargin_X - $iMargin_Inter, $iMargin_Y - $iMargin_Inter, _ ($iSize * 8) + ($iMargin_Inter * 2), ($iSize * 5) + $iMargin_Inter) GUICtrlSetBkColor($cBack, 0xA0A0A0) $cHiLite_1 = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 2) - $iMargin_Inter, $iMargin_Y - $iMargin_Inter, $iSize + $iMargin_Inter, $iSize + $iMargin_Inter) GUICtrlSetBkColor($cHiLite_1, $GUI_BKCOLOR_TRANSPARENT) $cHiLite_2 = GUICtrlCreateLabel("", $iMargin_X - $iMargin_Inter, $iMargin_Y - $iMargin_Inter, ($iSize * 2) + $iMargin_Inter, ($iSize * 2) + $iMargin_Inter) GUICtrlSetBkColor($cHiLite_2, $GUI_BKCOLOR_TRANSPARENT) $cHiLite_3 = GUICtrlCreateLabel("", $iMargin_X - $iMargin_Inter, $iMargin_Y + ($iSize * 2) - $iMargin_Inter, ($iSize * 3) + $iMargin_Inter, ($iSize * 3) + $iMargin_Inter) GUICtrlSetBkColor($cHiLite_3, $GUI_BKCOLOR_TRANSPARENT) $cLabel_1A = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 2), $iMargin_Y, $iSize - $iMargin_Inter, $iSize - $iMargin_Inter) $cLabel_1B = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 2), $iMargin_Y + $iSize, $iSize - $iMargin_Inter, $iSize - $iMargin_Inter) $cLabel_2 = GUICtrlCreateLabel("", $iMargin_X, $iMargin_Y, ($iSize * 2) - $iMargin_Inter, ($iSize * 2) - $iMargin_Inter) $cLabel_3 = GUICtrlCreateLabel("", $iMargin_X, $iMargin_Y + ($iSize * 2), ($iSize * 3) - $iMargin_Inter, ($iSize * 3) - $iMargin_Inter) $cLabel_5 = GUICtrlCreateLabel("", $iMargin_X + ($iSize * 3), $iMargin_Y, $iSize * 5, ($iSize * 5) - $iMargin_Inter) GUICtrlCreateLabel("Hours:", $iMargin_X, $iLabel_Level + 10, 100, 15) GUICtrlCreateLabel("AM", $iMargin_X + 40, $iLabel_Level, 25, 15, $SS_CENTER) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlCreateLabel("PM", $iMargin_X + 40, $iLabel_Level + 20, 25, 15, $SS_CENTER) GUICtrlSetBkColor(-1, 0x00FFFF) GUICtrlCreateLabel("Min x 5:", $iMargin_X + 110, $iLabel_Level + 10, 100, 15) GUICtrlCreateLabel("AM", $iMargin_X + 155, $iLabel_Level, 25, 15, $SS_CENTER) GUICtrlSetBkColor(-1, 0x00FF00) GUICtrlCreateLabel("PM", $iMargin_X + 155, $iLabel_Level + 20, 25, 15, $SS_CENTER) GUICtrlSetBkColor(-1, 0xFF00FF) GUICtrlCreateLabel("+", $iMargin_X + 185, $iLabel_Level + 10, 15, 15) GUICtrlCreateLabel("", $iMargin_X + 195, $iLabel_Level + 10, 25, 15) GUICtrlSetBkColor(-1, 0x707070) GUICtrlCreateLabel("", $iMargin_X + 197, $iLabel_Level + 12, 21, 11) GUICtrlSetBkColor(-1, 0xC4C4C4) GUICtrlCreateLabel("Both:", $iMargin_X + 240, $iLabel_Level + 10, 100, 15) GUICtrlCreateLabel("AM", $iMargin_X + 270, $iLabel_Level, 25, 15, $SS_CENTER) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x0000FF) GUICtrlCreateLabel("PM", $iMargin_X + 270, $iLabel_Level + 20, 25, 15, $SS_CENTER) GUICtrlSetBkColor(-1, 0xFFFF00) $cShow = GUICtrlCreateCheckbox("Show time", 340, $iLabel_Level - 2, 60, 20, $BS_PUSHLIKE) $cShow_Label = GUICtrlCreateLabel("", 340, $iLabel_Level + 22, 60, 20, $SS_CENTER) GUISetState() $iPrevMin = -1 $bShow = False _Set_Clock() _Set_Min(Mod(@MIN, 5)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cShow $bShow = Not($bShow) If $bShow Then GUICtrlSetData($cShow_Label, @HOUR & ":" & @MIN) GUICtrlSetData($cShow, "Hide time") Else GUICtrlSetData($cShow_Label, "") GUICtrlSetData($cShow, "Show time") EndIf EndSwitch $iCurrMin = @MIN If $iCurrMin <> $iPrevMin Then If $bShow Then GUICtrlSetData($cShow_Label, @HOUR & ":" & @MIN) EndIf $iPrevMin = $iCurrMin _Set_Min(Mod($iCurrMin, 5)) EndIf WEnd Func _Set_Min($iM) GUICtrlSetBkColor($cHiLite_1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetBkColor($cHiLite_2, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetBkColor($cHiLite_3, $GUI_BKCOLOR_TRANSPARENT) Switch $iM Case 4 GUICtrlSetBkColor($cHiLite_3, 0x707070) GUICtrlSetBkColor($cHiLite_1, 0x707070) Case 3 GUICtrlSetBkColor($cHiLite_3, 0x707070) Case 2 GUICtrlSetBkColor($cHiLite_2, 0x707070) Case 1 GUICtrlSetBkColor($cHiLite_1, 0x707070) Case 0 _Set_Clock() EndSwitch EndFunc ;==>_Set_Min Func _Set_Clock() $sDTG = _NowCalc() $iH = Int(StringRegExpReplace($sDTG, "^.*\s(\d\d):.*", "$1")) $iHour_Col = 0xFF0000 $iMin_Colour = 0x00FF00 $iBoth_Colour = 0x0000FF If $iH > 11 Then $iHour_Col = 0x00FFFF $iMin_Colour = 0xFF00FF $iBoth_Colour = 0xFFFF00 $iH = $iH - 12 EndIf $iM = Int(StringRegExpReplace($sDTG, "^.*:(\d\d):.*", "$1") / 5) GUICtrlSetBkColor($cLabel_1A, 0xC4C4C4) GUICtrlSetBkColor($cLabel_1B, 0xC4C4C4) GUICtrlSetBkColor($cLabel_2, 0xC4C4C4) GUICtrlSetBkColor($cLabel_3, 0xC4C4C4) GUICtrlSetBkColor($cLabel_5, 0xC4C4C4) $iState_1A = 0 $iState_1B = 0 $iState_2 = 0 $iState_3 = 0 $iState_5 = 0 While $iH Switch $iH Case 5 To 12 If Not $iState_5 Then $iH -= 5 GUICtrlSetBkColor($cLabel_5, $iHour_Col) $iState_5 = 1 Else ContinueCase EndIf Case 3 To 12 If Not $iState_3 Then $iH -= 3 GUICtrlSetBkColor($cLabel_3, $iHour_Col) $iState_3 = 1 Else ContinueCase EndIf Case 2 To 12 If Not $iState_2 Then $iH -= 2 GUICtrlSetBkColor($cLabel_2, $iHour_Col) $iState_2 = 1 Else ContinueCase EndIf Case Else If $iState_1A Then $iH -= 1 GUICtrlSetBkColor($cLabel_1B, $iHour_Col) $iState_1B = 1 Else $iH -= 1 GUICtrlSetBkColor($cLabel_1A, $iHour_Col) $iState_1A = 1 EndIf EndSwitch WEnd While $iM Switch $iM Case 5 To 12 $bContinueCase = False Switch $iState_5 Case 0 $iM -= 5 GUICtrlSetBkColor($cLabel_5, $iMin_Colour) $iState_5 = 2 Case 1 $iM -= 5 GUICtrlSetBkColor($cLabel_5, $iBoth_Colour) $iState_5 = 2 Case 2 $bContinueCase = True EndSwitch If $bContinueCase Then ContinueCase Case 3 To 12 $bContinueCase = False Switch $iState_3 Case 0 $iM -= 3 GUICtrlSetBkColor($cLabel_3, $iMin_Colour) $iState_3 = 2 Case 1 $iM -= 3 GUICtrlSetBkColor($cLabel_3, $iBoth_Colour) $iState_3 = 2 Case 2 $bContinueCase = True EndSwitch If $bContinueCase Then ContinueCase Case 2 To 12 $bContinueCase = False Switch $iState_2 Case 0 $iM -= 2 GUICtrlSetBkColor($cLabel_2, $iMin_Colour) $iState_2 = 2 Case 1 $iM -= 2 GUICtrlSetBkColor($cLabel_2, $iBoth_Colour) $iState_2 = 2 Case 2 $bContinueCase = True EndSwitch If $bContinueCase Then ContinueCase Case Else Switch $iState_1A Case 2 $iM -= 1 If $iState_1B Then GUICtrlSetBkColor($cLabel_1B, $iBoth_Colour) Else GUICtrlSetBkColor($cLabel_1B, $iMin_Colour) EndIf Case 1 $iM -= 1 If $iState_1B = 0 Then GUICtrlSetBkColor($cLabel_1B, $iMin_Colour) $iState_1B = 1 Else GUICtrlSetBkColor($cLabel_1A, $iBoth_Colour) $iState_1A = 2 EndIf Case Else $iM -= 1 GUICtrlSetBkColor($cLabel_1A, $iMin_Colour) $iState_1A = 1 EndSwitch EndSwitch WEnd EndFunc ;==>_Set_ClockThe changes - AM/PM and single minute timing - should be easy to spot. M231 point
-
You should rather try to parse the html file than doing it by mouse. With parsing the html you can avoid repeating this tedious task 3250 times and donate the multiple of software clicks to people in need. This is one of the basic sliding panels: <!-- ###############[ Start Sliding Panel ]################## --> <tr> <td colspan="7" align="center"> <div class="opener"> <table width="80%" cellspacing="0" cellpadding="0" class="listtable"> <tr> <td height="16" align="left" class="listtable_top" colspan="3"> <b>Ban Details</b> </td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Player</td> <td height="16" class="listtable_1"> Jaenas </td> <!-- ###############[ Start Admin Controls ]################## --> <td width="30%" rowspan="11" class="listtable_2 opener"> <div class="ban-edit"> <ul> <li><a href="#" onclick="" target="_self"><img src="images/demo.gif" border="0" alt="" style="vertical-align:middle" /> No Demos </a></li> </ul> </div> </td> <!-- ###############[ End Admin Controls ]##################### --> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Steam ID</td> <td height="16" class="listtable_1"> STEAM_0:0:117472517 </td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Steam Community</td> <td height="16" class="listtable_1"><a href="http://steamcommunity.com/profiles/76561198195210762" target="_blank">76561198195210762</a></td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Invoked on</td> <td height="16" class="listtable_1">09/05/2015 23:46</td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Banlength</td> <td height="16" class="listtable_1">Permanent </td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Expires on</td> <td height="16" class="listtable_1"> <i><font color="#677882">Not applicable.</font></i> </td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Reason</td> <td height="16" class="listtable_1">Ban evasion (FS)</td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Banned by Admin</td> <td height="16" class="listtable_1"> CONSOLE </td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Banned from</td> <td height="16" class="listtable_1" id="ban_server_3603"> Please Wait... </td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Total Bans</td> <td height="16" class="listtable_1">No previous bans</td> </tr> <tr align="left"> <td width="20%" height="16" class="listtable_1">Blocked (0)</td> <td height="16" class="listtable_1"> <i><font color="#677882">never</font></i> </td> </tr> </table> </div> </td> </tr> <!-- ###############[ End Sliding Panel ]################## --> It looks like alot but the goal is simple. You want to filter the Player and the Steam ID. This is just a big string that you can read and strip down to the key parts. So you want to find the fixed patters that encloses that information and then separate it from the important stuff. Take a look into the String management section in the autoit help file. If you can write a script that returns the Steam ID from following segment I will post the script that scraps all player names and Steam IDs directly from the website to a text file: <td width="20%" height="16" class="listtable_1">Steam ID</td> <td height="16" class="listtable_1"> STEAM_0:0:117472517 </td> To help you start: Save the segment above to a new .txt document (call it segment.txt), create a new autoit file next to it. Now the following code will enable you to work with the segment. Local $hFile = FileOpen(segment.txt) Local $RawString = FileRead($hFile) FileClose($hFile) ; Now you can start working with $RawString1 point
-
Very nice clocks guys. I have a another way to calculate the colors for the clock. I use the Bit Operations. I hope it's okay that I used UEZ script as submission. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <Date.au3> $iMargin_X = 10 $iMargin_Y = 10 $iMargin_Inter = 5 $iSize = 50 $iButton_Level = ($iSize * 5) + $iMargin_Inter + 20 $hGUI = GUICreate("Fibonacci Clock", ($iSize * 8) + ($iMargin_X * 2), $iButton_Level + 100) GUISetBkColor(0xC4C4C4) $cBack = GUICtrlCreateLabel("", $iMargin_X - $iMargin_Inter, $iMargin_Y - $iMargin_Inter, _ ($iSize * 8) + ($iMargin_Inter * 2), ($iSize * 5) + $iMargin_Inter) GUICtrlSetBkColor($cBack, 0x000000) $cLabel_1A = GUICtrlCreateLabel("1", $iMargin_X + ($iSize * 2), $iMargin_Y, $iSize - $iMargin_Inter, $iSize - $iMargin_Inter) $cLabel_1B = GUICtrlCreateLabel("1", $iMargin_X + ($iSize * 2), $iMargin_Y + $iSize, $iSize - $iMargin_Inter, $iSize - $iMargin_Inter) $cLabel_2 = GUICtrlCreateLabel("2", $iMargin_X, $iMargin_Y, ($iSize * 2) - $iMargin_Inter, ($iSize * 2) - $iMargin_Inter) $cLabel_3 = GUICtrlCreateLabel("3", $iMargin_X, $iMargin_Y + ($iSize * 2), ($iSize * 3) - $iMargin_Inter, ($iSize * 3) - $iMargin_Inter) $cLabel_5 = GUICtrlCreateLabel("5", $iMargin_X + ($iSize * 3), $iMargin_Y, $iSize * 5, ($iSize * 5) - $iMargin_Inter) $cUserSet = GUICtrlCreateButton("Set User Time", $iMargin_X, $iButton_Level, 100, 30) $cUserHour = GUICtrlCreateCombo("", $iMargin_X + 120, $iButton_Level, 40, 20) GUICtrlSetData($cUserHour, "00|01|02|03|04|05|06|07|08|09|10|11|12") $cUserMin = GUICtrlCreateCombo("", $iMargin_X + 160, $iButton_Level, 40, 20) GUICtrlSetData($cUserMin, "00|05|10|15|20|25|30|35|40|45|50|55") $cReset = GUICtrlCreateButton("Reset Current Time", $iMargin_X, $iButton_Level + 50, 120, 30) GUICtrlCreateLabel("Hours:" & @CRLF & @CRLF & "Mins:" & @CRLF & @CRLF & "Both:", 250, $iButton_Level, 150, 80) GUICtrlCreateLabel("", 300, $iButton_Level, 50, 20) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlCreateLabel("", 300, $iButton_Level + 25, 50, 20) GUICtrlSetBkColor(-1, 0x00FF00) GUICtrlCreateLabel("", 300, $iButton_Level + 50, 50, 20) GUICtrlSetBkColor(-1, 0x0000FF) GUISetState() _Reset() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cReset _Reset() Case $cUserSet $iHour = GUICtrlRead($cUserHour) $iMin = GUICtrlRead($cUserMin) _Set_Clock($iHour, $iMin) EndSwitch WEnd Func _Reset() $sDTG = _NowCalc() $iHour = StringRegExpReplace($sDTG, "^.*\s(\d\d):.*", "$1") $iMin = StringRegExpReplace($sDTG, "^.*:(\d\d):.*", "$1") _Set_Clock($iHour, $iMin) EndFunc ;==>_Reset Func _Set_Clock($iH, $iM) Local Static $aiColor[4] = [0xC4C4C4, 0x00FF00, 0xFF0000, 0x0000FF] Local $iColor = _FibColor($iH, $iM) GUICtrlSetBkColor($cLabel_1B, $aiColor[BitAND($iColor, 3)]) GUICtrlSetBkColor($cLabel_1A, $aiColor[BitShift(BitAND($iColor, 12), 2)]) GUICtrlSetBkColor($cLabel_2, $aiColor[BitShift(BitAND($iColor, 48), 4)]) GUICtrlSetBkColor($cLabel_3, $aiColor[BitShift(BitAND($iColor, 192), 6)]) GUICtrlSetBkColor($cLabel_5, $aiColor[BitShift(BitAND($iColor, 768), 8)]) EndFunc ;==>_Set_Clock Func _FibColor($iHour, $iMin) Return BitOR(BitShift(BitOR(BitShift(BitOR(BitShift(BitOR(BitShift(BitOR(BitShift(BitAND(_DecToFib(Mod($iHour, 13)), 16) And True, -2), BitAND(_DecToFib(Mod($iHour, 13)), 8) And True), -2), BitAND(_DecToFib(Mod($iHour, 13)), 4) And True), -2), BitAND(_DecToFib(Mod($iHour, 13)), 2) And True), -2), BitAND(_DecToFib(Mod($iHour, 13)), 1) And True), -1), BitOR(BitShift(BitOR(BitShift(BitOR(BitShift(BitOR(BitShift(BitAND(_DecToFib(Mod(Ceiling($iMin / 5), 12)), 16) And True, -2), BitAND(_DecToFib(Mod(Ceiling($iMin / 5), 12)), 8) And True), -2), BitAND(_DecToFib(Mod(Ceiling($iMin / 5), 12)), 4) And True), -2), BitAND(_DecToFib(Mod(Ceiling($iMin / 5), 12)), 2) And True), -2), BitAND(_DecToFib(Mod(Ceiling($iMin / 5), 12)), 1) And True)) EndFunc ;==>_FibColor Func _DecToFib($iNum) Return BitOR(BitShift(BitOR(BitShift(BitOR(BitShift(BitOR(BitShift((BitAND($iNum, 4) And BitAND($iNum, 1)) Or (BitAND($iNum, 4) And BitAND($iNum, 2)) Or BitAND($iNum, 8), -1), (BitAND($iNum, 4) And Not BitAND($iNum, 2) And Not BitAND($iNum, 1)) Or BitAND($iNum, 8)), -1), (Not BitAND($iNum, 4) And BitAND($iNum, 2)) Or (BitAND($iNum, 2) And BitAND($iNum, 1)) Or (BitAND($iNum, 8) And BitAND($iNum, 4))), -1), (Not BitAND($iNum, 4) And BitAND($iNum, 1)) Or (BitAND($iNum, 4) And Not BitAND($iNum, 1))), -1), BitAND($iNum, 8) And BitAND($iNum, 4)) EndFunc ;==>_DecToFib Cythor1 point
-
Func Lolo() Local $file1 = StringRegExp(FileRead($newsdata), '<DIV class=news>(.*?)</DIV></UL>',3) If @error Then Return ; Or If Not IsArray($file1) For $i = 0 To UBound($file1) - 1 MsgBox(0, "", $file1[$i]) FileWrite($newsdata,$file1[$i]&@CRLF) ; Are you sure you what to write in the same file ? Next EndFunc1 point