Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/10/2020 in all areas

  1. Version 6.1.6.0

    5,015 downloads

    zPlayer is a standalone, intuitive, and fully functional media player. Built to suit my purpose, it is customizable to your taste. zPlayer is powered by winmm.dll, an integral part of Windows. Features No 3rd Party Dependencies: Utilizes only Windows components and standard AutoIt UDFs. Universal Playback: Supports all digital media formats, provided proper codecs are installed. Independent Video Window: Separate video window with a minimal GUI for music. Versatile Loading Options: Load files, folders, or an audio CD for playback. Marquee Style Display: Long file names are displayed in smooth, infinite marquee style. Smart Playlists: Automatically generated playlists and easy-to-make custom playlists. Hidden Playlist: Playlist is hidden by default but available on demand in shuffled or sorted formats. Context Menus: Options include Play This File, File Properties, Search Internet, Go to This Folder, Move Playlist Item, and Remove from Playlist. Interactive Interface: Double-click any item to play it, search strings in the playlist, and use hotkeys for most functions. Playback Controls: Forward, backward, pause, and change folder. Repeat Functions: A-B repeat, current file repeat, and multiple-file repeat. Volume Control: Increase, decrease, or mute sound volume, synchronized with Windows volume mixer. Unmutes audio device on startup. Playback Environment Save: Save playback environment on session termination and resume in the next session. Resume Playback: Option to resume playback from where it was left off, with audio fade-in. Efficient Performance: Very low CPU and memory usage. Technical Information The script runs or compiles in x64 mode. To change this setting, comment out #AutoIt3Wrapper_UseX64=Y. The attached zPlayer.exe was compiled in x64 mode and is not flagged by Windows Defender as malicious. Compiling to x86 may result in false positive flags by Windows Defender. Feedback If you find an error, please download the latest version, as it may already be corrected. Otherwise, I would appreciate it if you could kindly let me know. zPlayer-NoUI.au3 The download section includes zPlayer-NoUI.au3. This is an abbreviated version of zPlayer, which is a music player controlled by hotkeys only, without a GUI. Note: zPlayer was tested to work in Windows 10 and 11. It should work in Windows 7, too. I would like to know if there is any compatibility problem.
    1 point
  2. I needed a function to automate programs at work that can't be fully automated via Autoits built in functions. For example a virtual machine running on your physical machine, meaning you would need to run an extra script within the virtual machine (if it is even running Windows) in order to automate everything. I came across OpenCV which allows matching/finding a picture in another picture. This would also allow searching for a button/text on the screen in order to press the exact position. Fortunately @mylise already translated all the required OpenCV functions to Autoit, I just had to remove all unnecessary functions to make the script as small as possible. The problem: Using this method, you will never be able to fully automate everything dynamically, as it will only work on the machine with same resolution/dpi settings, same theme etc.. This is only a last resort for programs that can't be automated using the built in Autoit functions. Features: Find a given picture on the entire screen (all monitors) or a certain area on the screen and execute mouse clicks on this position. Adjust the threshold so that the picture doesn't have to match 100%. Debugging options like logging and marking the screen where the picture was found etc. Includes a Snapshot-Tool that creates snapshots of a certain area(buttons, text etc.) on the screen and generates the code that is required for the matching. It can also be used to get the coordinates to a marked area on the screen in order to check only on a certain area for the match picture. Example: Note: The example will probably not work on your computer, depending on the display resolution and dpi settings, as the picture has to match the exact same size on the screen. Please use the included Snapshot-Tool to generate new match pictures and code very easily. #AutoIt3Wrapper_UseX64=n ; In order for the x86 DLLs to work #include "OpenCV-Match_UDF.au3" _OpenCV_Startup();loads opencv DLLs _OpenCV_EnableLogging(True,True,True) ;Logs matches, errors in a log file and autoit console output. ;Please note that these examples might not work as the match pictures have to be found with the exact same size on your screen. ;Example 1 ShellExecute("http://www.tv.com/");Open Website tv.com $Match1 = _MatchPicture(@ScriptDir&"\Match\1.png", 0.70,False,10,500);Try to find the match picture on the screen. Number of tries: 10, Sleep between each try: 500ms. If Not @error Then _MarkMatch($Match1) ;Debugging: Draws a rect on the screen/coordinates of the match to show the user where the match was found Sleep(100) _ClickMouse($Match1, "left",1) ;Calculates the center of the match and clicks the left mouse once on click position EndIf Sleep(1000) ;Example 2, matching on a specific area of the screen ShellExecute("notepad.exe");open nodepad WinWait("[CLASS:Notepad]","",5) WinMove("[CLASS:Notepad]","",0,0,500,500) Local $sCoords[4] = [0, 0, 500,500] $Match2 = _MatchPicture(@ScriptDir&"\Match\2.png", 0.80,$sCoords,3,500) If Not @error Then _MarkMatch($Match2) Sleep(100) _ClickMouse($Match2, "left", 1) EndIf _OpenCV_Shutdown();Closes DLLs So basically, all you need to do is provide a path to the match picture and the function will return you the coordinates (x1,y1,x2,y2) of where the picture has been found on the screen. With these, you can either calculate an exact position for the mouse click or use the "_ClickMouse" function which will execute a mouse click on the center of the coordinates where the picture was found. Credits: @mylise for the OpenCV UDF Download: Includes the required .DLL files of OpenCV. You can also manually download them on the website of OpenCV (Version 3.x doesn't include these anymore, you need to download 2.x). OpenCV_Match.zip
    1 point
  3. pixelsearch

    [Solved] WM_CONTEXTMENU

    My mind was so filled with the script that I forgot the 'like' button So, negating $bContextDisplay in WM_CONTEXTMENU was a good thing. I wonder why I modified the other line you mentioned. I'll let you know... in case I ever remember the reason !
    1 point
  4. Nine

    [Solved] WM_CONTEXTMENU

    That seems to be working fine. As I said there shouldn't be any form of Sleep (even a small loop within the GUI loop can be calculated as a sleep). So by removing the sleep and creating a pseudo-loop outside the Switch, I think I got the result you were looking for : #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global $bContextDisplay = False $hGUI = GUICreate("Test #3 - Right-click (short then long) inside GUI", 500, 200, _ -1, -1, -1, $WS_EX_TOPMOST) Local $idContext_Menu = GUICtrlCreateContextMenu() Local $idContext_Save = GUICtrlCreateMenuItem("Save", $idContext_Menu) GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_CONTEXTMENU, "WM_CONTEXTMENU") Local $hTimer, $aPos, $fDiff While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_SECONDARYDOWN ConsoleWrite("secondary" & @CRLF) $bContextDisplay = True $hTimer = TimerInit() Case $GUI_EVENT_SECONDARYUP $bContextDisplay = False Case $idContext_Save ConsoleWrite("Code for Save Image" & @CRLF) EndSwitch If $bContextDisplay Then $aPos = GUIGetCursorInfo($hGUI) If Not IsArray($aPos) Then $bContextDisplay = False ContinueLoop EndIf If $aPos[3] = 1 Then $fDiff = TimerDiff($hTimer) ConsoleWrite("timer diff " & $fDiff & @CRLF) If $fDiff > 250 Then ; Cancel crop $bContextDisplay = False ConsoleWrite("Code for Cancel Crop" & @CRLF) EndIf EndIf EndIf WEnd GUIDelete($hGUI) ;================================================= Func WM_CONTEXTMENU($hwnd, $iMsg, $wParam, $lParam) #forceref $hwnd, $iMsg, $wParam, $lParam Local Static $iCounter = 0 $iCounter += 1 ConsoleWrite("WM_CONTEXTMENU #" & $iCounter & @CRLF) If Not $bContextDisplay Then Return 0 ; prevents the Context menu to appear Return $GUI_RUNDEFMSG EndFunc ;==>WM_CONTEXTMENU
    1 point
  5. @MRAJ You continue to provide only minimal details in your responses. You can't expect us to work harder than you to try to solve your problem. Therefore, I am unwilling to help you further until you can show that you've researched the issue and tried some of the recommended solutions.
    1 point
  6. A little clarification. When the flag $iForward is true (1), which is the default value, it searches forward. To make it search backward the flag should be set to false (0).
    1 point
  7. I stand corrected, its absolutely possible. Thanks.
    1 point
  8. To answer the OP's question, this could work $txt = StringRegExpReplace(FileRead("example.ini"), '(?m)^[^=]+=\h*$\R?', "") Msgbox(0,"", $txt)
    1 point
  9. Example() Func Example() ; Create a constant variable in Local scope of the filepath that will be read/written to. Local Const $sFilePath = "Test.ini" ; Create an INI section structure as an array. The zeroth element is how many items are in the array, in this case 3. Local $aSection[4][2] = [[3, ""], ["Test", "AutoIt"], ["Test", @AutoItVersion], ["Test", @OSVersion]] ; Write the array to the section labelled 'General'. IniWriteSection($sFilePath, "General", $aSection) EndFunc ;==>Example
    1 point
  10. Read in the section with IniReadSection. Modify the resulting array to remove the desired entries. Use IniWriteSection to output the modified array, thus overwriting the prior section
    1 point
  11. #include <GUIConstantsEx.au3> #include <EditConstants.au3> Local $hGUI = GUICreate("No Button GUI", 600, 400) Local $input1 = GUICtrlCreateInput("1", 8, 8, -1, -1, BitOR($ES_RIGHT, $ES_NUMBER)) Local $input2 = GUICtrlCreateInput("1", 8, 32, -1, -1, BitOR($ES_RIGHT, $ES_NUMBER)) Local $input3 = GUICtrlCreateInput("0", 8, 56, -1, -1, BitOR($ES_RIGHT, $ES_NUMBER)) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($hGUI) ExitLoop Case ($input2 Or $input1) GUICtrlSetData($input3, GUICtrlRead($input1) + GUICtrlRead($input2)) EndSwitch WEnd
    1 point
  12. $o_URL = ObjCreate("Shell.Application") $o_URL.Open($s_URL) http://www.autoitscript.com/fileman/users/jpm/AutoIt3-gui/
    1 point
  13. Hi Exit I have test this latest version but I have some problems see the errors what can the problem was.
    0 points
×
×
  • Create New...