Leaderboard
Popular Content
Showing content with the highest reputation on 11/29/2016 in all areas
-
How to write output of this command line tool to file in autoit?
Nikolas92 reacted to InunoTaishou for a topic
ShellExecute("doctotext.exe", "--doc %~1 >> " & @UserProfileDir & "\desktop\Text.txt", Path to doctotext.exe) Should do it1 point -
1 point
-
Txt to CSV and some other information...
FrancescoDiMuro reacted to SadBunny for a topic
You need to prefix every underscore by a space. (Press ctrl+H in Scite to search&replace, then replace &_ by & _ (so with a space between them). After that, this code still doesn't work on its own because there's a bunch of undeclared variables, but the syntax error should be gone.1 point -
Creating a loop in array
Hielper reacted to InunoTaishou for a topic
Global $windows [13] ;- $windows[0] = "WIN_10" $windows[1] = "WIN_81" $windows[2] = "WIN_8" $windows[3] = "WIN_7" $windows[4] = "WIN_VISTA" $windows[5] = "WIN_XP" $windows[6] = "WIN XPe" $windows[7] = "WIN_2016" $windows[8] = "WIN_2012R2" $windows[9] = "WIN_2012" $windows[10] = "WIN_2008R2" $windows[11] = "WIN_2008" $windows[12] = "WIN_2003" Global $sInvalidVersions = "" Global $sValidVersion = "" For $i = 0 to UBound($windows) - 1 If ($windows[$i] == @OSVersion) Then $sValidVersion = $windows[$i] Else $sInvalidVersions &= @TAB & $windows[$i] & " niet gesupport" & @CRLF EndIf Next MsgBox("", "Results", "Valid Version:" & @CRLF & @TAB & $sValidVersion & @CRLF & @CRLF & "Invalid Versions:" & @CRLF & StringTrimRight($sInvalidVersions, 2))1 point -
Creating a loop in array
Hielper reacted to InunoTaishou for a topic
Are you using Windows Vista? Because once you get to your system OS version you're exiting your whole script. Global $windows [13] ;- $windows[0] = "WIN_10" $windows[1] = "WIN_81" $windows[2] = "WIN_8" $windows[3] = "WIN_7" $windows[4] = "WIN_VISTA" $windows[5] = "WIN_XP" $windows[6] = "WIN XPe" $windows[7] = "WIN_2016" $windows[8] = "WIN_2012R2" $windows[9] = "WIN_2012" $windows[10] = "WIN_2008R2" $windows[11] = "WIN_2008" $windows[12] = "WIN_2003" ;- For $i = 0 to UBound($windows) - 1 If ($windows[$i] == @OSVersion) Then MsgBox("", "", "Your OS version is " & $windows[$i]) ExitLoop ; ExitLoop, not exit. This finishes the for loop Else msgbox(0, "", "windows niet gesupport") EndIf Next1 point -
Creating a loop in array
Hielper reacted to InunoTaishou for a topic
For $i = 0 to UBound($windows) - 1 If ($windows[$i] = @OSVersion) Then ; ... Do stuff EndIf Next1 point -
MiniSMART v0.2
argumentum reacted to ripdad for a topic
yes - give me a little bit of time, maybe an hour or so.1 point -
MiniSMART v0.2
argumentum reacted to ripdad for a topic
I edited the script and inserted an image. Sorry, try again.1 point -
You know what...I suspect there may be some clipboard magic going on there. When you copy a "cell" in Excel I don't think you are truly copying the text of the cell, but some kind of object/reference (just a guess). Ok, I think I found your issue. It looks like a good ol @CRLF is appended to the cell value in the clipboard. I'd still recommend using the UDF I mention below though. ;..... Global $V1 = "AP" & @CRLF ;..... You should look into the Excel UDF. I'm sure there are functions there to read the cell values you need and it is most certainly a more reliable automation method versus sequencing keystrokes. edit: link to example https://www.autoitscript.com/autoit3/docs/libfunctions/_Excel_RangeRead.htm1 point
-
student
MuffinMan reacted to JLogan3o13 for a topic
In the future, when a Mod steps into a thread to request more information, please follow the route of common sense and wait until they say one way or another rather than speaking for us.1 point -
So I've been playing around with libvlc.dll and i'm wondering if anyone's interested in the code and some examples? Can't seem to find anyone who has done this in AutoIt, via the dll. Thanks for your time Edit: Well I'm happy to know someone finds it interesting I'll post the half done stuff here for now, but i will create a post in AutoIt Example Scripts, When i get more examples done . For now, any feedback would be great The file itself: LibVLC.au3 Note: Before running the examples you need libvlc.dll, libvlccore.dll and the plugins folder from VLC. If you have it installed, you can copy them from your install folder, however i would recommend a fresh download, as i personally had some old plugins that gave me annoying message-boxes i have yet to find a way to deal with. So getting the files without installing: download the windows installer (2.2.4 is the current as of this post). Open the exe with 7zip or your preferred program and extract the files and folder to the folder you wish to run the examples. As i have not looked into rules and legal matters with VLC files i won't upload them ^^' Example: #include "LibVLC.au3" Opt("GuiOnEventMode", 1) $hWnd = GUICreate("AutoIt + VLC Example", 700, 320) GUISetState(@SW_SHOW, $hWnd) ;pick a short video/audio-file, if you want to get the event $sFilePath = FileOpenDialog("Select VLC compatible file", "", "All (*.*)", 1+2, "", $hWnd) If @error<>0 Then Exit $hLibVLC_dll = DllOpen("libvlc.dll") $hVLC = libvlc_new($hLibVLC_dll, 0, 0) $m = libvlc_media_new_path($hLibVLC_dll, $hVLC, $sFilePath);path object $mp = libvlc_media_player_new_from_media($hLibVLC_dll, $m);player object libvlc_media_release($hLibVLC_dll, $m);release the path object. We're done with it. $mp_em = libvlc_media_player_event_manager($hLibVLC_dll, $mp);player event manager ;Create dllcallback to function and set to event: media player end reached $pEndReached = DllCallbackRegister("_VLC_Event_EndReached", "none:cdecl", "handle;handle") libvlc_event_attach($hLibVLC_dll, $mp_em, $libvlc_MediaPlayerEndReached, DllCallbackGetPtr($pEndReached), 0) libvlc_media_player_set_hwnd($hLibVLC_dll, $mp, $hWnd) libvlc_media_player_play($hLibVLC_dll, $mp) ;~ OnAutoItExitRegister("_CleanUp") GUISetOnEvent(-3, "_MyExit", $hWnd) While 1 Sleep(10) WEnd Func _CleanUp() libvlc_media_player_stop($hLibVLC_dll, $mp);stop the video libvlc_media_player_release($hLibVLC_dll, $mp) libvlc_release($hLibVLC_dll, $hVLC) DllClose($hLibVLC_dll) DllCallbackFree($pEndReached) GUIDelete($hWnd) EndFunc Func _MyExit() _CleanUp() Exit EndFunc Func _VLC_Event_EndReached($event, $data); the event function ConsoleWrite("EndReached"&@CRLF) EndFunc The script sometimes won't shut down. Not sure what's causing it. Found a possible cause from a discussion, suggesting it may be something to do with certain functions having problems being called from the main thread. I plan to experiment and post my results soon. Edit2 (19th March 2017): First of all, sorry about the lack of updates on this project. I always start too many projects and end up ignoring old projects, if I run into problems ^^'. So I've started moving my AutoIt scripts to GitHub. I will still post the most recent script version here. Edit3 (12th April 2017): So I've uploaded the example on my Github repository with the files needed (except a video file) to run the example. Sometimes the example will freeze. I found a thread suggesting that calling libvlc_media_player_stop and related functions from the same thread with the window message handling, may result in the problem occurring. I have a possible solution, but am unable to currently test it, as some needed code is hiding in my unorganized mess of projects.1 point
-
1 point