Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/19/2016 in all areas

  1. Gianni

    ascii art clock

    Just for fun Idea from here: http://codegolf.stackexchange.com/questions/73259/output-the-current-time-in-ascii-art Edit: Also added an analogue experimental version in post #11 #include <GUIConstants.au3> HotKeySet("{ESC}", "End") Local $hClock, $sDelim = ";", $aChar, $sScanLines, $aScanLine[6], $aFont[13] = [ _ ' ___ ; / _ \ ; | | | | ; | | | | ; | |_| | ; \___/ ', _ ; 0 ' __ ; /_ | ; | | ; | | ; | | ; |_| ', _ ; 1 ' ___ ; |__ \ ; ) | ; / / ; / /_ ; |____| ', _ ; 2 ' ____ ; |___ \ ; __) | ; |__ < ; ___) | ; |____/ ', _ ; 3 ' _ _ ; | || | ; | || |_ ; |__ _| ; | | ; |_| ', _ ; 4 ' _____ ; | ____| ; | |__ ; |___ \ ; ___) | ; |____/ ', _ ; 5 ' __ ; / / ; / /_ ; | _ \ ; | (_) | ; \___/ ', _ ; 6 ' ______ ; |____ | ; / / ; / / ; / / ; /_/ ', _ ; 7 ' ___ ; / _ \ ; | (_) | ; > _ < ; | (_) | ; \___/ ', _ ; 8 ' ___ ; / _ \ ; | (_) | ; \__, | ; / / ; /_/ ', _ ; 9 ' ; _ ;(_); _ ;(_); ', _ ; : " ; ; __ _ _ __ ;/ _` | ' \;\__,_|_|_|_|; ", _ ; am " ; ; _ __ _ __ ;| '_ \ ' \;| .__/_|_|_|;|_|"]; pm Global $hAsciiClock = GUICreate("Ascii clock", 390, 80, 10, 10, $WS_POPUPWINDOW, BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE, $WS_EX_COMPOSITED)) $hClock = GUICtrlCreateLabel("", 0, 0, 390, 80, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont(-1, 7, 0, 0, "Courier new") GUISetState() While 1 $sTime = StringFormat("%02s", @HOUR - (12 * (@HOUR > 12))) & "A" & @MIN & "A" & @SEC & Hex(11 + Number(@HOUR > 12), 1) For $x = 1 To StringLen($sTime) $achar = StringSplit($aFont[Dec(StringMid($sTime, $x, 1))], $sDelim, 3) For $i = 0 To 5 If $x = StringLen($sTime) Then ; last char (am or pm) $aScanLine[$i] = StringFormat('%-65s', $aScanLine[$i]) & $achar[$i] Else $aScanLine[$i] &= $achar[$i] EndIf Next Next For $i = 0 To 5 $sScanLines &= $aScanLine[$i] & @CRLF $aScanLine[$i] = "" Next GUICtrlSetData($hClock, $sScanLines) $sScanLines = "" Sleep(1000) WEnd Func End() If WinActive("[ACTIVE]") = $hAsciiClock Then Exit EndFunc ;==>End
    3 points
  2. Glory Glory Man United! Descendents of the smarter UK folk who kept walking west until it got warm and flat. edit: they say our hick accents are very liverpool-ish, but when I watch the 51st State I think we sound more mancunian, and this scene is so epic
    1 point
  3. Yup, just a bonus line feed, this leaves the carraige returns behind to keep it all nice like $sFile = FileRead("February2016_205xxxx.csv") $sFile = stringreplace($sFile , @LF , "") FileWrite("Newcsv.csv" , $sFile)
    1 point
  4. ....... ....... ....... _Example() Func _Example() ....... ..... Local $oIE_DIV_MarBarTop = _IEGetObjById($oIE,'mar_bar_top') ; first approach Local $oIE_ObjectToClick1 = $oIE_DIV_MarBarTop.nextElementSibling.nextElementSibling _IEAction($oIE_ObjectToClick1,'click') ; second approach Local $oIE_ObjectToClick2 = $oIE_DIV_MarBarTop.nextSibling.nextSibling _IEAction($oIE_ObjectToClick2,'click') EndFunc EDIT: Some reference documentation: https://msdn.microsoft.com/en-us/library/ms535240(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/ff974796(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/ms534189(v=vs.85).aspx
    1 point
  5. Maybe also _IELinkGetCollection ... For the regex way something like this should work $aRes = StringRegExp($html, '(?i)href="([^"]+)', 3)
    1 point
  6. @REchard_Long, Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. (there is also a link link in my signature) Please read them now particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. Jos
    1 point
  7. MsgBox is a Blocking Function. While active the entire script is on hold. It will not proceed to send enter until you click "OK" to resume the script. You may just want to put a timeout value on your MsgBox if you intend for it to go away on it's own without user interaction.
    1 point
  8. The easiest way to use AutoIt with other databases besides SQLite is using ADO. You can start by looking at the information in these links: AutoIt ADO Wiki, Connecting to a PostgreSQL database and ADO Programmer's Reference. In post 2 in second link you can find AdoSQL.au3 which contains the function _AdoSQL_GetData2d. I think this is the direct replacement of _SQLite_GetTable2d. To search the AutoIt forums you can Google in this way: oracle site:autoitscript.com If you have more questions related to ADO you'll get better answers in "AutoIt General Help and Support" forum. I'm not at all an ADO expert.
    1 point
  9. _StringEncrypt and friends is (was) buggy as hell and is incompatible with the now-correct _Crypt_* functions. So your best bet is to use the buggy _StringDecrypt to read back olf stuff to plaintext then switch to _Crypt* functions from there on.
    1 point
×
×
  • Create New...