Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/11/2023 in all areas

  1. CYCho

    WINMM.DLL Media Player

    I implemented A-B repeat function without increasing the size of main GUI. If I click the total media length label, a small GUI appears where I can set up start and end positions. The corresponding portion of the slider changes color to purple. This set-up is effective only for the current file.
    1 point
  2. you guys are geniuses. though it did have the "%1", it didnt have the %*. I patterned it from the computer that is working where i found the %* My OS: Windows 11 Home (OS Build: 22621.1928) Here's how it got fixed: regedit Computer\HKEY_CLASSES_ROOT\Applications\AutoIt3.exe\shell\open\command Change whats there from "c:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" to "c:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %*
    1 point
  3. To add some more information to what @argumentum is saying, check out: https://superuser.com/questions/1456692/how-do-i-set-advance-file-association-in-windows-10-while-passing-app-parameter You may need to setup file associations again, or look into the registery for the au3 association and edit it to include the "%1" Alternatively in SciTE you can set command line params with Shift + F8 for scripts run from SciTE directly. Or compile to .exe and test with that instead of the .au3 file.
    1 point
  4. CYCho

    WINMM.DLL Media Player

    Through this project I learned many aspects of not only winmm.dll but also of how a video image created by it interacts with a GUI window when it is resized, maximized or stretched to full screen. I have implemented most of the basic functionalities of winmm.dll as regards to a digital media player and my update of the code will not be as frequent as has been. Now I am awed by the power of AutoIt, which, with less than 1000 lines of code and without any third party dependency, made this media player possible. I must thank @TheXman, @ioa747, @Skeletor, @ptrex and @Shark007 for their kind words and/or help in this project.
    1 point
  5. Hey all just wanted to share some code if you're struggling to send keys to your web session. Here is how I was able to send an "ENTER" keystroke to my web session: _WD_Action($sSession, 'actions', '{"actions": [{"type": "key", "id": "keyboard", "actions": [{"type": "keyDown", "value": "\uE007"}, {"type": "keyUp", "value": "\uE007"}]}]}') Spent many hours trying to figure the sequence out. Hopefully this can help someone. @giahh - Saw you trying to do this back in 2018 Referenced: https://github.com/jlipps/simple-wd-spec#perform-actions
    1 point
  6. Hi Guys, When I used to scratch the surface with Delphi5, I could only create a simple Notepad program. Now that I'm into AutoIt, I've created just a bare bone Notepad. Can be improved, but maybe this will be useful for those, like me, starting out with programming. I know there are way better notepads out there like Aupad, but, #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <APIDlgConstants.au3> #include <Memory.au3> #include <WinAPIDlg.au3> #include <WinAPIFiles.au3> Opt('WinTitleMatchMode', 3) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Notepad", 620, 440, 192, 124) $MenuItem1 = GUICtrlCreateMenu("File") $MenuItem4 = GUICtrlCreateMenuItem("New" & @TAB & "Ctrl+N", $MenuItem1) $MenuItem5 = GUICtrlCreateMenuItem("Open" & @TAB & "Ctrl+O", $MenuItem1) $MenuItem6 = GUICtrlCreateMenuItem("Save" & @TAB & "Ctrl+S", $MenuItem1) $MenuItem17 = GUICtrlCreateMenuItem("Print" & @TAB & "Ctrl+P", $MenuItem1) $MenuItem7 = GUICtrlCreateMenuItem("Exit" & @TAB & "Ctrl+W", $MenuItem1) $MenuItem2 = GUICtrlCreateMenu("Edit") $MenuItem8 = GUICtrlCreateMenuItem("Undo" & @TAB & "Ctrl+Z", $MenuItem2) $MenuItem9 = GUICtrlCreateMenuItem("Cut" & @TAB & "Ctrl+X", $MenuItem2) $MenuItem10 = GUICtrlCreateMenuItem("Copy" & @TAB & "Ctrl+C", $MenuItem2) $MenuItem11 = GUICtrlCreateMenuItem("Paste" & @TAB & "Ctrl+V", $MenuItem2) $MenuItem12 = GUICtrlCreateMenuItem("Delete" & @TAB & "Del", $MenuItem2) $MenuItem16 = GUICtrlCreateMenu("Format") $MenuItem19 = GUICtrlCreateMenuItem("Word Wrap", $MenuItem16) $MenuItem18 = GUICtrlCreateMenuItem("Font", $MenuItem16) $MenuItem15 = GUICtrlCreateMenu("View") $MenuItem20 = GUICtrlCreateMenuItem("Status Bar", $MenuItem15) $MenuItem3 = GUICtrlCreateMenu("Help") $MenuItem13 = GUICtrlCreateMenuItem("View Help", $MenuItem3) $MenuItem14 = GUICtrlCreateMenuItem("About Notepad" & @TAB & "F1", $MenuItem3) $Edit1 = GUICtrlCreateEdit("", 0, 0, 620, 420, $ES_WANTRETURN) GUICtrlSetFont($Edit1, 10, 400, -1, "Lucida Console") GUICtrlSetData(-1, "") Dim $Form1_AccelTable[11][2] = [["^n", $MenuItem4], ["^o", $MenuItem5], ["^s", $MenuItem6], ["^p", $MenuItem17], ["^w", $MenuItem7], ["^z", $MenuItem8], ["^x", $MenuItem9], ["^c", $MenuItem10], ["^v", $MenuItem11], ["{DEL}", $MenuItem12], ["{F1}", $MenuItem14]] GUISetAccelerators($Form1_AccelTable) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52, "Notepad Closing", "Are you sure you want to exit?") Select Case $iMsgBoxAnswer = 6 ;Yes Exit Case $iMsgBoxAnswer = 7 ;No EndSelect #EndRegion --- CodeWizard generated code Start --- Case $MenuItem4 GUICtrlSetData($Edit1, "") Case $MenuItem5 FileOpenDialog("Open Text File", @DesktopDir, "Text File (*.txt)") Case $MenuItem6 $filesave = FileSaveDialog("Save Text File", @DesktopDir, "Text File (*.txt)") $Edit1_Read = GUICtrlRead($Edit1) FileWrite($filesave, $Edit1_Read) Case $MenuItem7 #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52, "Notepad Closing", "Are you sure you want to exit?") Select Case $iMsgBoxAnswer = 6 ;Yes Exit Case $iMsgBoxAnswer = 7 ;No EndSelect #EndRegion --- CodeWizard generated code Start --- EndSwitch WEnd If you don't attempt something, you never know you can actually achieve that goal.
    1 point
  7. It worked with me once I ran it as Administrator. If you look at the @error you'll know what the issue is. see https://www.autoitscript.com/autoit3/docs/functions/ProcessClose.htm G
    0 points
×
×
  • Create New...