Recently Browsing 0 members
No registered users viewing this page.
AutoIt3 Lua Wrapper
This is an AutoIt3 wrapper for the Lua scripting language. Consider it beta software, but since I will be using it in commercial product, expect it to evolve.
It has been developped with Lua 5.3.5. Updates will come for new Lua version.
Everything works just fine, except one (big) limitation: Anything that throws a Lua error (using C setjmp/longjmp functionality) will crash your AutoIt program. That means that it is impossible to use throw errors from an AutoIt function called by Lua (luaL_check*, lua_error...).
It is hosted in Github: https://github.com/matwachich/au3lua
#include <lua.au3> #include <lua_dlls.au3> ; Initialize library _lua_Startup(_lua_ExtractDll()) OnAutoItExitRegister(_lua_Shutdown) ; create new execution state $pState = _luaL_newState() _luaopen_base($pState) ; needed for the lua's print function $iRet = _luaL_doString($pState, 'print("Hello, world!")') If $iRet <> $LUA_OK Then ; read the error description on top of the stack ConsoleWrite("!> Error: " & _lua_toString($pState, -1) & @CRLF) Exit EndIf ; close the state to free memory (you MUST call this function, this is not AutoIt's automatic memory management, it's a C library) _lua_close($pState)
I'm trying to build a script that will eventually create a log with time stamps of the active windows used on a workstation throughout the day, but I'm having a problem figuring out how to actually get this information. For example, if someone has Microsoft Word open, I'd like to be able to pop-up/log "word.exe" along with the full path to that file if at all possible (sort of like seeing the application DETAILS name in Windows Task Manager and being able to right-click on the name and choose "Open FIle Location" to get the full path to the file).
Is what I'm asking even possible within the realm of AutoIt? I have the below script as a test that gets me the current active window handle and title in a message box every 6 seconds, but for the life of me, I don't know what code I need to use to get the actual .EXE name/path of the active window.
#include <MsgBoxConstants.au3> Local $i = 0 Do Global $handle = WinGetHandle("[ACTIVE]") Global $title = WinGetTitle("[ACTIVE]") MsgBox(0,"Active Handle & Title",$handle & " - " & $title, 3) $i = $i + 1 Sleep(3000) Until $i = 100 Any help or suggestions would be greatly appreciated. I don't mind figuring out the code myself, if someone could just point me in the right direction.
I am not very sure if I am all right to post here tho. Due to other forums have no respond at all.
So I have my custom make google chrome extension, and it will load unpack into Portable Google Chrome, but it keep pop up the alert box
Is there any way to disable it? Because my Portable Google Chrome will load as Kiosk mode, so that user can't be uninstall/disable the extension.
Many thanks in advance.
Hi dear, I have a question please
I designed a function to read the content of the playlist
I succeeded in that
I have a problem
For VLC player playlists
If the path of the files in Arabic language the path is be as follows
I did not know how to decrypt this text to be readable
This is the function that i used
func M3UImport($M3UFile) dim $AM3UItems local $fileOpen = FileOpen($path, bitOr($FO_OVERWRITE,$FO_CREATEPATH,$FO_ANSI)) _FileReadToArray ($fileOpen, $AM3UItems) if @error then return setError(1) local $M3UPath for $i = 1 to $AM3UItems $AM3UItems[$i] = stringReplace($AM3UItems[$i], "file:///", "") $AM3UItems[$i] = stringReplace($AM3UItems[$i], "/", "\") $AM3UItems[$i] = stringReplace($AM3UItems[$i], "%20", " ") $M3UPath = _fileGetDirPath($AM3UItems[$i]) if $M3UPath = "" then $M3UPath = @WorkingDir if not StringTrimRight($M3UPath, 1) = "\" then $M3UPath &= "\" $AM3UItems[$i] = $M3UPath & $AM3UItems[$i] endIf local $ext = _GetFileExt($AM3UItems[$i]) if fileExists($AM3UItems[$i]) and not (StringInStr($FilesExt, $ext) = 0) then $aListItems += 1 GUICtrlCreateListViewItem(_GetFileName($AM3UItems[$i]) & Opt("GUIDataSeparatorChar") & " : " & Opt("GUIDataSeparatorChar") & $AM3UItems[$i], $list) endIf next return "" endFunc
I ask for your help in this work
with my Greetings and thanks in advance