Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/10/2021 in all areas

  1. #include <WinAPISys.au3> #include <WinAPIDiag.au3> $tInfo = _WinAPI_GetStartupInfo() _WinAPI_DisplayStruct($tInfo, $tagSTARTUPINFO, "Startup Info") $tTitle = DllStructCreate("wchar string[256]", $tInfo.Title) MsgBox ($MB_SYSTEMMODAL, "", $tTitle.string)
    4 points
  2. Hello Community, today I want to publish my very first AutoIt project... yup, in fact the reason I started AU for , I present to you the AMT - Auto-Movie-Thumbnailer Current Version: v15 (2024-Oct-13) AMT - Auto-Movie-Thumbnailer enables you to create ScreenCaps of any number of movies, located anywhere on your computer, manually or with a time-scheduler, with a free to choose number of caps, the ability to ignore already processed files, a customizable design and most important, it allows you to do it in Batch Mode! The Auto Movie-Thumbnailer is an automation GUI to batch create Screencaps, Thumbnail Index Pictures, Preview Pictures or Contact Sheets for any given number of movies. It supports many different input (AVI, MPG, Quicktime, Real-Media, Windows-Media,.) formats, in fact every input format that is supported by MPlayer. AMT works by remotely controlling the MPlayer, some applications of the ImageMagick Suite and a MediaInfo plugin to perform the screenshoting and Picture creation. Known Problems Short movies might not have enough key-frames (depending on format) for multiple screenshots. E.g. if you want to have 20 screenshots per movie, but the movie only has 10 Key-frames, will get duplicate screenshots. That's because the seek function of MPlayer is controlled by simple math. 20 screenshots means start at 2.5%, next shot 7.5%, 12.5% if now too few key-frames are defined in the movie (during creation process), 7.5% and 12.5% might point to the same key-frame, if for example the movie has a key-frame at 5% and the next at 15%. MPlayer is only capable of seeking key-frames for certain formats. License This program is freeware under Creative Commons License "by-nc-nd 3.0″, and this means, you are free to share, to copy, distribute and transmit the work under the following conditions: Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial - You may not use this work for commercial purposes. No Derivative Works - You may not alter, transform, or build upon this work. See also http://creativecommons.org/licenses/by-nc-nd/3.0 for details. For any form of distribution of this software a link back to the authors website at http://www.amt.cc is required. It works fine at least on the XP-Pro 32-bit SP3 / Win7 / Win8.1 machines I tested it on. If you find bugs please let me know. Kudos to AdmiralAlkex, Richard Robertson, Draygoes, BrettF & Achilles for Beta-Testing! And to all other regular posters on this forum for sharing their knowledge and helping out! The AMT-Installer can be found under it's own domain at: http://www.amt.cc or at https://funk.eu/amt Enjoy AMT, and let me know what you think of it... Best Regards
    1 point
  3. Hi everybody AutoIt 3.3.14.5 , File GuiListView.au3 , function _GUICtrlListView_GetSelectedIndices() Line #2618 : For $iItem = 0 To $iCount Shouldn't it be : For $iItem = 0 To $iCount - 1
    1 point
  4. mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples
    1 point
  5. c.haslam, You are the first person to have mentioned this matter to my knowledge - given that Jon has mentioned that there are roughly 2500 downloads of AutoIt per day (yes, really) I would suggest that you are in a significant minority in this matter. The command opens an MS OpenFile dialog - so that is what the Help file tells you and the vast majority of users seem to understand what this provides. And in answer to your second, my ChooseFileFolder UDF (the link is in my sig) does indeed use a "Select" button to return the files selected. M23 Edit: I see TheXman beat me to it!
    1 point
  6. I see...It is not very good to be remembered for those kinds of reasons
    1 point
  7. Try changing the $iReturn to $FLTAR_FILES(1) + Hidden(4) + System Files(8) example: Local $aFiles = _FileListToArrayRec("C:\", "*.lnk", 13, 1, 1, 2)
    1 point
  8. @Deye interesting approach. Returns an $tagSTARTUPINFO structure that contains the startup information. But how to grab the content returend by that function _WinAPI_GetStartupInfo() ? #include <WinAPISys.au3> $STARTUPINFO = _WinAPI_GetStartupInfo() ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $tagSTARTUPINFO = ' & $tagSTARTUPINFO & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ConsoleWrite("VarType = " & VarGetType($STARTUPINFO) & @CRLF) ConsoleWrite("$STARTUPINFO = '" & $STARTUPINFO & "'" & @CRLF) >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\temp\Get-my-startingLNK.au3" /UserParams +>13:18:10 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0 Keyboard:00000407 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0407) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\admin.AD\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\admin.AD\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\temp\Get-my-startingLNK.au3 +>13:18:10 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\temp\Get-my-startingLNK.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop @@ Debug(6) : $tagSTARTUPINFO = dword Size;ptr Reserved1;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;dword YCountChars;dword FillAttribute;dword Flags;word ShowWindow;word Reserved2;ptr Reserved3;handle StdInput;handle StdOutput;handle StdError >Error code: 0 VarType = DLLStruct $STARTUPINFO = '' +>13:18:10 AutoIt3.exe ended.rc:0 +>13:18:10 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.8752 VarType = "DLLStruct" 🤔 MSDN is giving this information, no clue, how to make use of this info: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfoa Syntax C++ Copy typedef struct _STARTUPINFOA { DWORD cb; LPSTR lpReserved; LPSTR lpDesktop; LPSTR lpTitle; DWORD dwX; DWORD dwY; DWORD dwXSize; DWORD dwYSize; DWORD dwXCountChars; DWORD dwYCountChars; DWORD dwFillAttribute; DWORD dwFlags; WORD wShowWindow; WORD cbReserved2; LPBYTE lpReserved2; HANDLE hStdInput; HANDLE hStdOutput; HANDLE hStdError; } STARTUPINFOA, *LPSTARTUPINFOA;
    1 point
  9. FrancescoDiMuro

    readInput fild?

    @rotac Don't worry. That function is so powerful, but needs a bit of knowledge before digging into it. Here's something that might help you: #include <StringConstants.au3> Test() Func Test() Local $arrTimes[6] = ['23:59', '15:20', '01:72', '14:32', '00:00', '41:59'] For $i = 0 To UBound($arrTimes) - 1 Step 1 ConsoleWrite("Is a correct time " & $arrTimes[$i] & "? " & (_IsTime($arrTimes[$i]) ? "Yes" : "No") & @CRLF) Next EndFunc Func _IsTime($strUserInput) Return StringRegExp($strUserInput, '^[0-2][0-9]:[0-5][0-9]$', $STR_REGEXPMATCH) EndFunc Just use the function _IsTime() when you read the content of the input control, passing what you've read from that control, and checking that the return value is 1
    1 point
  10. Somerset

    readInput fild?

    Click the code button to insert code to paste for an easier format to read.
    1 point
  11. FrancescoDiMuro

    readInput fild?

    Hi @rotac, and to the AutoIt forum! Could you please post the entire script?
    1 point
  12. @Melba23 : could you please be kind enough to comment what follows, thanks The function _GUICtrlListView_GetSelectedIndices is based on a loop which checks each and every item of a Listview to retrieve indices of selected item(s), which means it will loop for example 1000 times when there are 1000 items, even if only 3 items are selected. Basically, this is how the function works actually : $iCount = _GUICtrlListView_GetItemCount($idListView) For $iItem = 0 To $iCount - 1 $iRet = GUICtrlSendMsg($idListView, $LVM_GETITEMSTATE, $iItem, $LVIS_SELECTED) If $iRet Then ... ; do here what needs to be done Next What about if we script it like that, with a loop executed 3 times only instead of 1000 times, maybe it will end faster while bringing back the same result : $iSelectedCount = GUICtrlSendMsg($idListView, $LVM_GETSELECTEDCOUNT, 0, 0) If $iSelectedCount = 0 Then Return $iStart = - 1 ; -1 to find the first item that matches the specified flags (msdn) ; the specified item itself is excluded from the search (+++) For $i = 1 To $iSelectedCount $iSelected = GUICtrlSendMsg($idListView, $LVM_GETNEXTITEM, $iStart, $LVNI_SELECTED) ; do here what needs to be done $iStart = $iSelected Next Thanks for your advice. Edit: I think the message $LVM_GETSELECTEDCOUNT is very fast (tested it on 1000 items) In case one is reluctant to use it (?) then we could do it in another way (gonna find it back in my yesterday's archive folder and post it below asap) Ok... here is the other way (I didn't find it in my archive, grr...) so let's hope I "redo" it correctly. This one is without $LVM_GETSELECTEDCOUNT and the loop is still executed 3 times (3 selected items out of 1000 rows). Then the loop may be partially executed a 4th time (exited with ExitLoop) unless the last item is one of the 3 selected items. $iCount = _GUICtrlListView_GetItemCount($idListView) $iStart = - 1 ; -1 to find the first item that matches the specified flags (msdn) ; the specified item itself is excluded from the search (+++) For $iItem = 0 To $iCount - 1 $iSelected = GUICtrlSendMsg($idListView, $LVM_GETNEXTITEM, $iStart, $LVNI_SELECTED) If $iSelected = - 1 Then ExitLoop ; do here what needs to be done $iStart = $iSelected $iItem = $iSelected Next
    1 point
  13. @Musashi You are just great at explaining the subject
    1 point
  14. Yes ! In your shortcut, set : [Path to your AutoIt3.exe] [Path to your .au3] ["Parameter"] Example : C:\AutoIt\AutoIt3\AutoIt3.exe "C:\AutoIt\Projekte\Test.au3" "Parameter1" Test.au3 : If $CMDLINE[0] Then MsgBox(0, "","Parameter 1 = " & $CMDLINE[1] & @CRLF) Else MsgBox(0, "","no parameters" & @CRLF) EndIf
    1 point
  15. Simply pass a parameter to the au3 script. Read it with CmdLine array.
    1 point
  16. i believe _WinAPI_GetStartupInfo() can be a lead to what you are looking to do here
    1 point
  17. you're welcome Edit: Use ProcessClose($iPID) instead of WinClose($aVar[$i][0]) So the closing of everything will go much faster WinClose is the more graceful way of closing a program, That is allowing a program to do a self cleanup before closing ProcessClose is like WinKill ( "title" [, "text"] ) #include <WinAPIProc.au3> #include <WinAPISysWin.au3> Local $aVar = _WinAPI_EnumWindowsTop() For $i = 1 To $aVar[0][0] - 1 If Not _WinAPI_GetWindowLong($aVar[$i][0], $GWL_HWNDPARENT) And _WinAPI_GetWindowText($aVar[$i][0]) Then Local $iPID = WinGetProcess($aVar[$i][0]) If Not $iPID Then ContinueLoop $sPN = _WinAPI_GetProcessName($iPID) If $sPN = "SciTE.exe" Then ContinueLoop ; youre ProgramName.exe if windowed it needs to remain active ProcessClose($iPID) EndIf Next
    1 point
×
×
  • Create New...