Jump to content

Nisteo

Active Members
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    1

Nisteo last won the day on February 14 2023

Nisteo had the most liked content!

Recent Profile Visitors

443 profile views

Nisteo's Achievements

  1. Opt("SendKeyDelay", 25) Opt("SendKeyDownDelay", 25) ControlSend simulates keystrokes, so technically it sends shift and dash when you want to send underscore. If delay between keystrokes is too short, some keys may not be sent at all.
  2. Nisteo

    Python Code

    https://pypi.org/project/formation-studio/
  3. New laptop has different screen resolution?
  4. Nim, Golang, Python. But JavaScript still best option for this task 🤔
  5. I see 2 undefined functions and 1 wrong macro
  6. Can be used as a night light. Looks better than standard yellow night light in Windows 10.
  7. @mistersquirrle Thank you. My problem was in trailing whitespace 😁 Execute(StringStripWS($sStdIn, 2))
  8. My idea is to run functions interactively from a console window. But "Execute" can never execute, lol. #AutoIt3Wrapper_Change2CUI=y Global $sStdIn, $sExecReturn While 1 $sStdIn = ConsoleRead() If $sStdIn <> "" Then $sExecReturn = Execute($sStdIn) If @error Then MsgBox(16, "Error", "Cannot execute: " & $sStdIn) Else ConsoleWrite($sExecReturn) EndIf EndIf Sleep(10) WEnd If I add quotes like this: Execute('"' & $sStdIn & '"') then "Execute" just returns $sStdIn without executing. Also, if I compile it in GUI mode and pipe STDIN of this script to STDOUT of another non-console application, then everything works as expected. What I'm doing wrong?
  9. They should read the cheat sheet about web development. 🤣🤣🤣
  10. @SOLVE-SMART I found a mini bug, lol 😂 If you copy-paste one of the example strings, then syntax checker will throw an error. Because there are some invisible characters between the quotes.
  11. @SOLVE-SMART But in help file I found this: Not ("string1" == "string2") 🤔
  12. I continued my silly experiments. I compiled a python extension (PYD) using the Nim language (Nim has a Python-like syntax, which is good). Then I called python from autoit and imported this compiled extension. mymodule.nim: import nimpy proc hello: string {.exportpy.} = return "Hello World from Python compiled extension" autoit: $py = ObjCreate("Python.Interpreter") $py.exec("import sys") $py.exec("sys.path.insert(0, 'D:\\AutoIt Scripts\\Examples\\Nimpy_Demonstration')") $py.exec("import mymodule") $py.exec("hello = mymodule.hello()") $hello = $py.eval("hello") MsgBox(64, "", $hello)
  13. #include <File.au3> _FileReadToArray() This func from standart library supports 2D arrays, btw 🤔
  14. Wiki page: https://en.wikipedia.org/wiki/Invidious Website: https://invidious.io/ API docs: https://docs.invidious.io/api/ By sending requests to Invidious API, you can get various information about YouTube videos, such as title, description, subtitles, available formats, direct links, and much more. #include "JSON.au3" ;URL for sorted JSON list of API instances Const $INVAPI_INSTANCE_LIST_URL = "https://api.invidious.io/instances.json?sort_by=type,api,users" ;Get list of API instances $sResponse = BinaryToString(InetRead($INVAPI_INSTANCE_LIST_URL)) ;Parse response and get first URL from list $sFirstInstanceURL = (_JSON_Parse($sResponse)[0])[1].uri ;API request Const $TEST_YOUTUBE_VIDEO_ID = "aqz-KE-bpKQ" $sResponse = BinaryToString(InetRead($sFirstInstanceURL & "/api/v1/videos/" & $TEST_YOUTUBE_VIDEO_ID & "?fields=videoId,title,description")) ;Parse response and output it $JsonData = _JSON_Parse($sResponse) MsgBox(64, "Info", _ "Video ID: <" & ($JsonData).videoId & ">" & @CRLF & @CRLF & _ "Title: <" & ($JsonData).title & ">" & @CRLF & @CRLF & _ "Description: <" & ($JsonData).description & ">") For this example I used AspirinJunkie's JSON UDF.
×
×
  • Create New...