• Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Bablosoft

Как поменять цвет текста выводимого в лог?

Scheduled Pinned Locked Moved Поддержка
4 Posts 4 Posters 770 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DmitryRayhmanD Offline
    DmitryRayhmanD Offline
    DmitryRayhman
    wrote on last edited by
    #1

    Как поменять цвет текста выводимого в лог?

    0 tet-viviT 2 Replies Last reply
    0
  • 0 Offline
    0 Offline
    000
    replied to DmitryRayhman on last edited by
    #2

    @VlFi
    https://www.google.com/search?as_q=цвет+лога&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=https%3A%2F%2Fcommunity.bablosoft.com&as_occt=any&safe=images&as_filetype=&as_rights=

    1 Reply Last reply
    0
  • tet-viviT Offline
    tet-viviT Offline
    tet-vivi
    replied to DmitryRayhman on last edited by
    #3

    @VlFi https://community.bablosoft.com/topic/3521/лайфхаки-bas

    1 Reply Last reply
    0
  • M Offline
    M Offline
    maxsiman
    wrote on last edited by
    #4

    http://community.bablosoft.com/topic/8803/logger

    1 Reply Last reply
    0

  • D

    Как сделать время в логах в миллисекундах?

    Scheduled Pinned Locked Moved Поддержка
    0 Votes
    9 Posts
    943 Views
    D

    Добавил еще ведущие нули к миллисекундам, если кому-то еще когда-то этот код понадобится

    log = function (text, color, define){ var id, time, thread, logHtml, textLog; define = (typeof define == 'string') ? define.split(/[\s,.|:;]+/g) : define; if(typeof define === 'object' && define !== null){ if(Array.isArray(define)){ id = define.indexOf('id') > -1; time = define.indexOf('time') > -1; thread = define.indexOf('thread') > -1; } else{ id = define.id == true; time = define.time == true; thread = define.thread == true; } } else id = time = thread = true; id = id ? '<a href="action://action' + ScriptWorker.GetCurrentAction() + '" style="color:gray;">[' + ScriptWorker.GetCurrentAction() + ']</a>' : ''; time = time ? ' ' + getTime() : ''; thread = thread ? ' Поток №' + thread_number() : ''; logHtml = (id || time || thread) ? id + '<span style="color: white">' + time + thread + ' : </span>' : ''; logHtml += '<span style="color:' + (color ? color : 'white') + '">' + text + '</span>'; textLog = '[' + ScriptWorker.GetCurrentAction() + ']' + time + thread + ' : ' + text function getTime(){ var checkTime = function(i){ return (i < 10) ? "0" + i : i; }; var checkMilliSeconds = function(ms){ if (ms < 10) { return "00" + ms; } else if (ms < 100) { return "0" + ms; } else { return ms; } }; var d = new Date(); var hh = checkTime(d.getHours()); var mm = checkTime(d.getMinutes()); var ss = checkTime(d.getSeconds()); var ms = checkMilliSeconds(d.getMilliseconds()); return '[' + hh + ':' + mm + ':' + ss + '.' + ms + ']'; }; Logger.WriteHtml(logHtml, textLog); }
  • mocardM

    Как получить элемент списка по наличию в нем определённого текста

    Scheduled Pinned Locked Moved Поддержка
    0 Votes
    2 Posts
    502 Views
    MetaferssanceM

    Получить Индекс
    Получить Элемент

    Одним действием не знаю, двумя можно

  • K

    Как сделать сравнение текста?

    Scheduled Pinned Locked Moved Поддержка
    0 Votes
    7 Posts
    774 Views
    lotraL

    @Dodok пфф и что? Тут многие развлекаются, мой видел? Знаешь что у меня он значит? https://classes.ru/all-byelorussian/dictionary-byelorussian-russian2-term-22617.htm То что человека веселит называться многологинами мне безразлично.

  • R

    Как занести каждый элемент из строки в в переменную?

    Scheduled Pinned Locked Moved Поддержка
    0 Votes
    15 Posts
    1560 Views
    R

    Да это в точку,просто думал есть специальный инструмент

  • M

    Как получить host url в произвольном коде?

    Scheduled Pinned Locked Moved Поддержка
    0 Votes
    2 Posts
    2422 Views
    supportS

    @myweb101 класс URL пока не поддерживается, но скоро будет nodejs

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
  • Login

  • Don't have an account? Register

  • Login or register to search.