Инструменты пользователя

  • Зашли как Anonymous (Anonymous)
  • Выйти

Инструменты сайта


mantis:simpletv:api:common

Common

utf8String = GetTmpName()

utf8String = GetTmpPath()

utf8String = multiByteToUTF8(string)

string = UTF8ToMultiByte(utf8String)

string = toPercentEncoding(utf8String)

utf8String = fromPercentEncoding(string)

utf8String = UTF16ToUTF8(utf16String)

utf16String = UTF8ToUTF16(utf8String)

boolean = isUTF8(string)

utf8String = replaceUTF8(str - utf8String,from - utf8String,to - utf8String,CaseInsensitive - boolean(optional, by default true))

utf8String = midUTF8(str - utf8String,pos - number,count - number(optional, by default -1))

number = lenUTF8(utf8String)

number = compareUTF8(str1 - utf8String,str2 - utf8String,CaseInsensitive - boolean(optional, by default true))

ret - number = Sleep(number - time in ms)

 ret == 1 if sleep failed (interruption requested or app exit)

userInput - number,key - number,action - number = WaitUserInput(number - time in ms)

 userInput == 1 if was
 key - key code or 0
 action - action number or -1

boolean = IsInterruptionRequested()

boolean = IsExecutionCanceled()

Exit()

Restart()

verNumber,verString = GetVersion()

verNumber = GetVlcVersion()

SetForeground()

string = GetCModuleExtension()

boolean = isX64()

string_utf8 = GetExeName()

path - string_utf8 = GetMainPath(type)

 type - Type of path
  0 - logo absolute path
  1 - work absolute path
  2 - exe  absolute path
  3 - logo relative path

string = CleanPath(string)

dwProcessId = Execute(exe - string_utf8,param(opt) - string_utf8,flags(opt) - number,extFlags(opt) - number)

it's equivalent CreateProcessW
flags - dwCreationFlags
extFlags bitwise WAIT_PROCESS = 1

string = CryptographicHash(inData - string,algorithm- string(opt),encodeInHex - boolean(opt))

   from version 0.5.0 b12.7
   return hash of inData or nil on error
   algorithm - algorithm of hash, optional, by default 'Md5'
     possible algorithms: 'Md4', 'Md5', 'Sha1', 'Sha224', 'Sha256', 'Sha384', 'Sha512',
      'Keccak_224', 'Keccak_256', 'Keccak_384', 'Keccak_512', 'RealSha3_224', 'RealSha3_256',
      'RealSha3_384', 'RealSha3_512', 'Sha3_224', 'Sha3_256', 'Sha3_384', 'Sha3_512'
   encodeInHex - encode result in HEX, boolean, optional, by default true
   
   example:
   local hash = m_simpleTV.Common.CryptographicHash("m_simpleTV","Sha512",true)
deprecated from 0.5
  • DownloadFileInTmp(URL,FileName,ShowWindow)
  • string_fromUTF8(str_UTF8,code_page)
  • string_UnicodeToUTF8(str)
  • string_UTF8ToUnicode(str)
  • string_IsUTF8(str)
  • string path = FolderPicker(string title,string start_path (opt))
  • string_UTF8 path = FolderPicker_UTF8(string_UTF8 title,string_UTF8 start_path (opt))
removed from 0.5
  • HWND = GetHWNDMainFrame()
  • SendMessageToMainFrame(message - number,WPARAM - number, LPARAM - number)
  • PostMessageToMainFrame(message - number,WPARAM - number, LPARAM - number)
mantis/simpletv/api/common.txt · Последние изменения: 2020/05/23 11:46 — SergeyVS