Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/02/2020 in all areas

  1. You're joking I presume This is a typical example on "how to use regular expressions" #Include <Array.au3> $txt = FileRead("test.html") $res = StringRegExp($txt, 'a href="(h[^"]+)', 3) _ArrayDisplay($res) But the try using _StringBetween in post #1 was not so bad ...
    1 point
  2. @seadoggie01 That's right. I used to have an input box at the start of the program to define the file types. But I deleted it because I thought it was so rarely used. Now you can define them by editing the zPlayer.ini file as memntioned in the Help. Once in there, it will remain there unless you edit the ini file again. I will have to elaborate this in the readme.txt. Thank you for pointing that out. And thanks for your positive review.
    1 point
  3. Did you actually test? Because it works fine for me. #include <IE.au3> ShellExecute("Chrome.exe", "192.168.1.1") _IECreate("192.168.1.1")
    1 point
  4. What this script does Extracts the list of GDPR fines from website enforcementttracker.com and returns a 2D array holding all items. N.B. The numbers of the following list can be found in the script as comments. WebDriver functionality used Tested with Firefox Start geckodriver to automate Firefox from a different location (needs to be modified by you in the scripts source) Maximize the browser window Retrieve all values from the "Show n entries" dropdown and select the second to last (50 entries) Sort the table by clicking on a table header Scroll to the end of the page Search and click a button GDPR fines Version 1.au3 GDPR fines Version 2.au3
    1 point
  5. Hi Guys, I've noticed that the SoundGetWaveVolume UDF in an older topic isn't working on Windows Vista, 7, 8, 8.1 and 10. It's probably a Windows XP UDF. The UDF below does work. It successfully returns the volume set by SoundSetWaveVolume. It might need checking by the AutoIt community for some synthax finetuning. ; #FUNCTION# ==================================================================================================================== ; Name...........: _SoundGetWaveVolume ; Description....: Returns app volume of script, Windows Vista, 7, 8, 10 only ; Syntax.........: _SoundGetWaveVolume([$iValueOnError = -1]) ; Parameters.....: $iValueOnError - Value to return when an error occurs ; Return values..: App volume of script or $iValueOnError at an error ; Error values...: @error = 1 - Unable to create Struct ; @error = 2 - Dll file not found ; @error = 3 - Wrong call so not on Windows Vista, 7, 8 or 10 ; @error = 4 - Internal error, array not returned ; @error = 5 - Volume wasn't received ; @error = 6 - Volume couldn't read ; Author.........: Peter Verbeek ; Modified.......: ; =============================================================================================================================== Func _SoundGetWaveVolume($iValueOnError = -1) Local $LPDWORD,$aMMRESULT,$iVolume $LPDWORD = DllStructCreate("dword") If @error <> 0 Then SetError(1) ; 1 = unable to create Struct Return $iValueOnError EndIf ; get app volume of this script $aMMRESULT = DllCall("winmm.dll","uint","waveOutGetVolume","ptr",0,"long_ptr",DllStructGetPtr($LPDWORD)) Switch @error Case 1 SetError(2) ; 2 = dll file not found Return $iValueOnError Case 2,3,4,5 SetError(3) ; 3 = wrong call so not on Windows Vista, 7, 8 or 10 Return $iValueOnError EndSwitch If not IsArray($aMMRESULT) Then SetError(4) ; 4 = internal error, array not returned Return $iValueOnError EndIf If $aMMRESULT[0] <> 0 Then SetError(5) ; 5 = volume wasn't received Return $iValueOnError EndIf $iVolume = DllStructGetData($LPDWORD,1) If @error <> 0 Then SetError(6) ; 6 = volume couldn't read Return $iValueOnError EndIf Return Round(100*$iVolume/4294967295) ; return in range 0 to 100 as SoundSetWaveVolume() EndFunc
    1 point
  6. It's not the solution for your issue, but you can use GUISetAccelerators instead of HotKeySet #include <File.au3> #include <GUIConstants.au3> Global $sPicPath = "C:\Windows\Web\Wallpaper\Architecture" Global $aPics = _FileListToArray($sPicPath, "*.jpg", 1, True) If NOT IsArray($aPics) Then Exit MsgBox(16, "Error", "No picture found in " & $sPicPath) Global $iCurrent = 1 GUICreate("Picture Viewer", 820, 700) GUISetBkColor(0) Global $ID_Pic = GUICtrlCreatePic($aPics[1], 10, 10, 800, 600) Global $ID_Previous = GUICtrlCreateButton("Previous", 50, 620, 200, 30) Global $ID_Next = GUICtrlCreateButton("Next", 570, 620, 200, 30) GUICtrlSetFont($ID_Previous, 15, 700) GUICtrlSetFont($ID_Next, 15, 700) Local $aAccelKeys[2][2] = [["{LEFT}", $ID_Previous],["{RIGHT}", $ID_Next]] GUISetAccelerators($aAccelKeys) GUICtrlSetState($ID_Previous, $GUI_DISABLE) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $ID_Previous If $iCurrent > 1 Then _Previous() Case $ID_Next If $iCurrent < UBound($aPics) - 1 Then _Next() EndSwitch Sleep(10) WEnd Func _Previous() $iCurrent -= 1 If $iCurrent = 1 Then GUICtrlSetState($ID_Previous, $GUI_DISABLE) GUICtrlSetState($ID_Next, $GUI_ENABLE) GUICtrlSetImage($ID_Pic, $aPics[$iCurrent]) EndFunc Func _Next() $iCurrent += 1 If $iCurrent = UBound($aPics) - 1 Then GUICtrlSetState($ID_Next, $GUI_DISABLE) GUICtrlSetState($ID_Previous, $GUI_ENABLE) GUICtrlSetImage($ID_Pic, $aPics[$iCurrent]) EndFunc Oups, edited...
    1 point
×
×
  • Create New...