Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/2016 in all areas

  1. careca

    Beats Player

    Version 4.66

    2,109 downloads

    Music player, supports most known filetypes and flac, with a low memory and processor usage, designed to be used in the traybar, drag-drop files/folders to listview, save and load playlists, 5 recent folders (stores last imported folders), playback available with media keys, 1 click in tray icon to hide/show, double click title bar to hide to tray, and much more. It was made for me, and my needs, but im open to sugestions. Modifier key: +Arrows Up/Down Change volume, +P Pause/Resume, Play from start if stopped, +S Stops playback, +Arrows Left/Right Jump to previous/next track, +numbers 1,2,3.. being 1=10%, 2=20% etc and 0 being 100% volume of the player, (not numpad) (modifier key can be changed in the menu.) None of this would be possible without the help of the community! Coment or send PM for suggestions of improvement or issues you have. Thank ya'll.
    1 point
  2. Thanks to Joachim Bauch's tutorial about Loading a DLL from memory. Here comes the easiest way to run the codes written in other language. All you need to do are make a DLL, convert it to HEX format, and embed into your script. For now, only stdcall is supported (up to four parameters) (There is no limit now, see update note). BTW, this script is only tested on Windows XP SP3. If you can run it in other systems, please let me know, thanks. Demo how to use: (this 3k md5.dll is written by myself and anyone is welcome to use it. But the machine code version of MD5 should be better choice in AutoIt) ; ------------------------------------------------------------- ; ; Step 1: Try to use the DLLs in the normal method (by DllCall) ; ; ------------------------------------------------------------- $String = "The quick brown fox jumps over the lazy dog" $Digest = DllStructCreate("byte[16]") DllCall("md5.dll", "str", "md5", "str", $String, "uint", StringLen($String), "ptr", DllStructGetPtr($Digest)) $Hash = DllStructGetData($Digest, 1) $Digest = 0 MsgBox(0, 'MD5 Hash', $Hash) ; ---------------------------------------------------------------------------- ; ; Step 2: Use MemoryDllGen.au3 to convert the DLL to script form and paste it. ; ; ---------------------------------------------------------------------------- Dim $DllBinary = ''; this line is too long to omit, check the attachment ; -------------------------------------------------------------------------------- ; ; Step 3: Replace DllCall to MemoryDllCall, and use $DllBinary instead of dll name ; ; -------------------------------------------------------------------------------- #Include "MemoryDll.au3" MemoryDllInit() $String = "The quick brown fox jumps over the lazy dog" $Digest = DllStructCreate("byte[16]") MemoryDllCall($DllBinary, "str", "md5", "str", $String, "uint", StringLen($String), "ptr", DllStructGetPtr($Digest)) $Hash = DllStructGetData($Digest, 1) $Digest = 0 MsgBox(0, 'MD5 Hash', $Hash) MemoryDllExit() ; ------------------------------------------------------------------------- ; ; Step 4: Finally, you have the functions in Pure AutoIt Scirpt. Have fun ! ; ; -------------------------------------------------------------------------MemoryDll.zip (4.67K) Number of downloads: 253 08/08/03 Update Note: Rearrange the return array of MemoryDllCall, now it's return should just like DllCall.Add support to accept more than four parameters, but in this case, some return value will be destoryed.Add a little Tutorial.MemoryDll.zip (9.17K) Number of downloads: 251 08/08/18 Update Note: I finally found a perfect trick to call a function in memory. So this UDF now supports DLL functions in both stdcall and cdecl mode with any number of parameters. In theory, DllCall now can be fully replaced by MemoryDllCall.There is a new func called MemoryFuncCall in this version. It is a new way to call a memory address. Compared to CallWindowProc (old method), MemoryFuncCall is flexible (supports cdecl, etc. ), but a bit slower.There are also two new utility scripts in attachment. AESFile uses the dll downloaded from http://adeil.com. It encrypt/decrypt files by a key of 32, 48 or 64 bytes long. SHA2 is written by Brian Gladman and compiled to DLL by me. It generates SHA2 hash of 224, 256, 384, or 512 bits long. Thanks to -Ultima- and ProgAndy's suggestion.MemoryDll.zip (50.27K) Number of downloads: 441 08/12/06 Update Note: Improves compatibility. Now MemoryDllCall should work better under Vista.Example of AESFile and SHA512 are removed. Please see my other post about AES and Hashes.MemoryDll.zip (8.95K) Number of downloads: 1118 2010/10/18 Update Note: Avoiding DEP issue.Improves compatibility. Now BASS.DLL is supported.MemoryDll.zip 2011/04/03 Update Note: Rewritten all code in AutoIt. Now both x86 and x64 DLL are supported.MemoryDllInit(), MemoryDllExit(), and old examples are removed.Add new example, MemoryDll version of SQLite.au3.Ps. I think old version are still good or even better when only used under x86 mode.But this version support x64 and has better compatibility I guess.MemoryDll.zip 2015/01/08 Update Note: Update the machine code version. Both x86 and x64 DLL are supported.TLS callback are supported.Remove all MemoryFuncXXX() related functions. Use build-in DllCallAddress instead.Add MemoryDllLoadString(), MemoryDllLoadResource() Add _WinAPI_MemoryFindResource(), _WinAPI_MemoryFindResourceEx(), _WinAPI_MemorySizeOfResource(), _WinAPI_MemoryLoadResource(), _WinAPI_MemoryLoadString(), _WinAPI_MemoryLoadStringEx()Using BinaryCall.au3 to loading the machine code.MemoryDll.zip 2015/01/23 Update Node: Add ability to load a DLL that needs other DLLs. For example: libcurl.dll needs libeay32.dll and ssleay32.dll for https support. Now you can load all of them by MemoryDll UDF. Before this version, only libcurl.dll can loaded by MemoryDll, other files must store on the disk.Add ability to call functions by ordinal value.Add MemoryDllRun(). It run a EXE file from memory. Relocation table in EXE file is required. Most PE rebuilding tools remove the section to reduce the file size.Add a script to demonstrate all the new features.This version of MemoryDll can works together with BinaryCall UDF. Binary machine code can call functions in DLL loaded by MemoryDll. MemoryDll.zip
    1 point
  3. @falcontechnics, thank you. But this UDF is only to detect if a registry's key is changed or not... It not (properly) change a registry's key. See this funcionts: https://www.autoitscript.com/autoit3/docs/functions/RegWrite.htm RegDelete, RegEnumKey, RegEnumVal, RegRead Br
    1 point
  4. Ok, so add _WinHttpAddRequestHeaders ( $hRequest, 'Referer: http://www.audiodump.com/' ) to your request.
    1 point
  5. I would suggest using _FFXpath to find the desired element and then _FFClick to click on it.
    1 point
  6. dynamitemedia, Once I sorted out the awful mess you had made of the code when adding the initial picture, it works fine for me: #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WinAPI.au3> #include <File.au3> #include <Date.au3> #include <Array.au3> #include "GUIScrollbars_Ex.au3" ; Declare global arrays to hold ControlIDs Global $aImage, $aButton, $aLabel ; Declare image count Global $iCount ; Max buttons per row Global $iCol_Count = 5 Global $hActive, $iRow_Count, $hDialog, $fFocusMain = True, $cCurrFocus = 9999 Global $f1stTimeOpened = True Global $sImg2load1stTime = @ScriptDir & "\www\img\maxresdefault.jpg" Global $idLblTime ; Create listing filter Global $sListFilter = "" ; Set max dialog size $iDialog_Width = 1265 $iDialog_Depth = 720 ; Determine button width $iButton_Dim = Floor(($iDialog_Width - 10 - _WinAPI_GetSystemMetrics(2)) / $iCol_Count) ; Determine required depths $iVisRows = 0 While 1 $iVisRows += 1 If $iButton_Dim * $iVisRows > $iDialog_Depth Then $iVisRows -= 1 ExitLoop EndIf WEnd $iDialog_Depth = ($iButton_Dim * $iVisRows) + 10 ; Add the space for the buttons to get the main GUI size $iMain_Depth = $iDialog_Depth + 200 Mainscript() Func Mainscript() ; Liat the images to display $aImage = _List_Images($sListFilter) $iCount = UBound($aImage) ; Create arrays to hold button and label ControlIDs Global $aButton[$iCount], $aLabel[$iCount] ; Determine rows required $iRow_Count = Ceiling($iCount / $iCol_Count) ; Create main GUI $hGUI = GUICreate("MainGUI", $iDialog_Width, $iMain_Depth) $cPrograms = GUICtrlCreateButton("Functions", ($iDialog_Width / 2) - 320, 20, 300, 60) $cNetWorks = GUICtrlCreateButton("Constants", ($iDialog_Width / 2) + 20, 20, 300, 60) $clockDepth = $iMain_Depth - 60 $idLblTime = GUICtrlCreateLabel(" ", ($iDialog_Width - 200), 36, 300, 65) $iLastSec = @SEC GUICtrlSetFont(-1, 20, 600, 0, "Arial") $sAddDate = _DateTimeFormat(_NowCalc(), 1) $idLblDate = GUICtrlCreateLabel($sAddDate, 40, $clockDepth, 420, 65) GUICtrlSetFont(-1, 20, 600, 0, "Arial") ;Create a combobox control. Local $idComboBox = GUICtrlCreateCombo("Category 1", 40, 32, 250, 250) GUICtrlSetFont(-1, 20, 600, 0, "Arial") ;Add additional items to the combobox. GUICtrlSetData($idComboBox, " test 1 | test 12 |Category 2| test 124 | test 124", "test 12") GUICtrlSetFont(-1, 20, 600, 0, "Arial") GUISetState() ; Create dialog $hDialog = GUICreate("", $iDialog_Width, $iDialog_Depth, 0, 100, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor(0xFFFFFF) If $iRow_Count > $iVisRows Then _GUIScrollbars_Generate($hDialog, 0, $iButton_Dim * $iRow_Count) EndIf Local $idPic = GUICtrlCreatePic($sImg2load1stTime, 30, 30, 500, 450) ; Create dummy controls $cDummy_Up = GUICtrlCreateDummy() $cDummy_Dn = GUICtrlCreateDummy() $cDummy_Left = GUICtrlCreateDummy() $cDummy_Right = GUICtrlCreateDummy() $cDummy_PgDn = GUICtrlCreateDummy() $cDummy_PgUp = GUICtrlCreateDummy() GUISetState() ; Set the Up/Down/Left/Right keys as accelerators - they will only act like this when your GUI is active Local $aAccelKeys[6][2] = [["{UP}", $cDummy_Up], ["{DOWN}", $cDummy_Dn], ["{LEFT}", $cDummy_Left], ["{RIGHT}", $cDummy_Right], ["{PGUP}", $cDummy_PgUp], ["{PGDN}", $cDummy_PgDn]] GUISetAccelerators($aAccelKeys, $hGUI) GUISetAccelerators($aAccelKeys, $hDialog) While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop Case $cPrograms If $f1stTimeOpened Then GUICtrlDelete($idPic) $f1stTimeOpened = False EndIf If $sListFilter <> "Functions" Then $sListFilter = "Functions" _Load_Images($sListFilter) EndIf Case $cNetWorks If $f1stTimeOpened Then GUICtrlDelete($idPic) $f1stTimeOpened = False EndIf If $sListFilter <> "Constants" Then $sListFilter = "Constants" _Load_Images($sListFilter) EndIf Case $cDummy_Up _Move_Focus($hDialog, 1) Case $cDummy_Dn _Move_Focus($hDialog, 2) Case $cDummy_Left _Move_Focus($hDialog, 3) Case $cDummy_Right _Move_Focus($hDialog, 4) Case $cDummy_PgUp GUICtrlSetState($cPrograms, $GUI_FOCUS) Case $cDummy_PgDn GUICtrlSetState($cCurrFocus, $GUI_FOCUS) Case 0 ; Do nothing - needed because button array is empty when first started Case Else For $i = 0 To $iCount - 1 If $iMsg = $aButton[$i] Then MsgBox($MB_SYSTEMMODAL, "Pressed", GUICtrlRead($aButton[$i])) ExitLoop EndIf Next EndSwitch ; Get focused control $hCurrFocus = _WinAPI_GetFocus() ; If it has changed If $hCurrFocus <> $hActive Then ; See if it is a button For $i = 0 To $iCount - 1 If $hCurrFocus = GUICtrlGetHandle($aButton[$i]) Then ; Reset all the labels For $j = 0 To $iCount - 1 GUICtrlSetBkColor($aLabel[$j], 0xFFFFFF) Next ; Highlight the correct label GUICtrlSetBkColor($aLabel[$i], 0x00FF00) ; Store ControlID $cCurrFocus = $aButton[$i] ExitLoop EndIf Next $hActive = $hCurrFocus EndIf _UpdateTime() WEnd EndFunc ;==>Mainscript Func _Draw_Images() ; Create labels For $i = 0 To $iRow_Count - 1 For $j = 0 To $iCol_Count - 1 $iIndex = $j + ($i * $iCol_Count) If $iIndex > $iCount - 1 Then ExitLoop $aLabel[$iIndex] = GUICtrlCreateLabel("", 10 + ($iButton_Dim * $j), 10 + ($iButton_Dim * $i), $iButton_Dim - 10, $iButton_Dim - 10) GUICtrlSetBkColor($aLabel[$iIndex], 0xFFFFFF) GUICtrlSetState($aLabel[$iIndex], $GUI_DISABLE) GUICtrlSetResizing($aLabel[$iIndex], $GUI_DOCKALL) Next Next ; Create buttons For $i = 0 To $iRow_Count - 1 For $j = 0 To $iCol_Count - 1 $iIndex = $j + ($i * $iCol_Count) If $iIndex > $iCount - 1 Then ExitLoop $aButton[$iIndex] = GUICtrlCreateButton($aImage[$iIndex], 15 + ($iButton_Dim * $j), 15 + ($iButton_Dim * $i), $iButton_Dim - 20, $iButton_Dim - 20, $BS_BITMAP) GUICtrlSetImage($aButton[$iIndex], $aImage[$iIndex]) GUICtrlSetResizing($aButton[$iIndex], $GUI_DOCKALL) Next Next ; Set default button GUICtrlSetState($aButton[0], $GUI_FOCUS) GUICtrlSetBkColor($aLabel[0], 0x00FF00) $hActive = GUICtrlGetHandle($aButton[0]) EndFunc ;==>_Draw_Images Func _Load_Images($sListFilter) ; Remove current images, buttons and labels For $i = 0 To $iCount - 1 GUICtrlDelete($aButton[$i]) GUICtrlDelete($aLabel[$i]) Next ; Liat the images to display $aImage = _List_Images($sListFilter) $iCount = UBound($aImage) ; Create arrays to hold button and label ControlIDs Global $aButton[$iCount], $aLabel[$iCount] ; Determine rows required $iRow_Count = Ceiling($iCount / $iCol_Count) ; Redraw buttons _Draw_Images() ; Scrol to top, hide and if required reset the scrolling _GUIScrollbars_Scroll_Page($hDialog, 0, 1) _GUIScrollBars_ShowScrollBar($hDialog, $SB_BOTH, False) If $iRow_Count > $iVisRows Then _GUIScrollbars_Generate($hDialog, 0, $iButton_Dim * $iRow_Count) EndIf EndFunc ;==>_Load_Images Func _List_Images($sFilter) ; Here you would have your FileListToArray lines to get a list of the images to display ; But for this example we will look in the AutoIt include folder and show files with/without "Constant" in the name Local $sIncludeFolder = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", Default, -1)) & "Include" Local $aList = _FileListToArray($sIncludeFolder, "*.au3", $FLTA_FILES) ; Now filter according to the setting For $i = $aList[0] To 1 Step -1 Switch $sFilter Case "Functions" If StringInStr($aList[$i], "Constant") Then _ArrayDelete($aList, $i) $aList[0] -= 1 EndIf Case "Constants" If Not StringInStr($aList[$i], "Constant") Then _ArrayDelete($aList, $i) $aList[0] -= 1 EndIf EndSwitch Next ; Remove the count element _ArrayDelete($aList, 0) ; And return the list Return $aList EndFunc ;==>_List_Images Func _Move_Focus($hDialog, $iMode) Local $iNext_Button, $iRow, $iNewRow Local $iRow_Count = Ceiling($iCount / $iCol_Count) ; Get active control $hActive = _WinAPI_GetFocus() For $i = 0 To $iCount - 1 ; If it is a button If $hActive = GUICtrlGetHandle($aButton[$i]) Then ; Determine row $iRow = Int($i / $iCol_Count) $iNewRow = $iRow ; Set default value for next button $iNext_Button = $i Switch $iMode Case 1 ; Not if in top row If $iRow Then $iNext_Button -= $iCol_Count ; Set new row $iNewRow -= 1 EndIf Case 2 ; Not if in bottom row or there no button below If ($iRow < $iRow_Count - 1) And ($i + $iCol_Count < $iCount) Then $iNext_Button += $iCol_Count ; Set new row $iNewRow += 1 EndIf Case 3 ; If not first button If $i <> 0 Then $iNext_Button -= 1 $iNewRow = Int($iNext_Button / $iCol_Count) EndIf Case 4 ; If not last button If $i <> $iCount Then $iNext_Button += 1 $iNewRow = Int($iNext_Button / $iCol_Count) EndIf EndSwitch ; Set focus to new button GUICtrlSetState($aButton[$iNext_Button], $GUI_FOCUS) ; Get button into view by scrolling to page which includes button _GUIScrollbars_Scroll_Page($hDialog, 0, Int($iNewRow / 2) + 1) ; No point in looking further ExitLoop EndIf Next EndFunc ;==>_Move_Focus Func _UpdateTime() Static Local $iLastSec = @SEC $iCurrSec = @SEC If $iCurrSec <> $iLastSec Then $iLastSec = $iCurrSec GUICtrlSetData($idLblTime, "" & _NowTime()) EndIf EndFunc ;==>_UpdateTime Please ask if you have any questions about how I have recast the code to make it work. M23
    1 point
  7. #include<array.au3> Local $aArray[8] = ["a", "a", "b", "b", "c" , "c" , "c" , "d"] Local $aOut[0][2] for $i = ubound($aArray) - 1 to 0 step -1 $aFound = _ArrayFindAll($aArray , $aArray[$i]) _ArrayAdd($aOut , $aArray[$aFound[0]] & "|" & ubound($aFound) , 0) _ArrayDelete($aArray , _ArrayToString($aFound , ";")) $i -= ubound($aFound) - 1 next _ArrayDisplay($aOut)
    1 point
  8. If you are asking your self: How can I debug my script ? Then visit: https://www.autoitscript.com/wiki/FAQ#How_can_I_debug_my_script.3F If you already were there, so visit again as was edited today. Regards, mLipok
    1 point
  9. The initial Full-Screen 'embedded' browser window is by design, or am I just missing something? Anyone else?
    1 point
  10. Yes I did that Melba. Just wanted to publicly display my interest I suppose.
    1 point
  11. Shikuri, Welcome to the AutoIt forums. You could do it like this: #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> $hGUI = GUICreate("Test", 500, 500) $cButton = GUICtrlCreateCheckbox("On", 10, 10, 80, 30, $BS_PUSHLIKE) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton Switch GUICtrlRead($cButton) Case $GUI_CHECKED GUICtrlSetData($cButton, "Off") MsgBox($MB_SYSTEMMODAL, "Button", "ON") Case Else GUICtrlSetData($cButton, "On") MsgBox($MB_SYSTEMMODAL, "Button", "OFF") EndSwitch EndSwitch WEnd As you are a complete beginner to AutoIt (and we all were at one point, so no problem at all) reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at this excellent tutorial - you will find other tutorials in the Wiki (the link is at the top of the page). M23
    1 point
  12. Something like this here? #include <Array.au3> $sText = 'AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.' & @CRLF & _ 'It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys).' & @CRLF & _ 'AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required!' $aTest = MostRepeatedWords($sText) _ArrayDisplay($aTest) Func MostRepeatedWords($sText) Local $aSplit = StringRegExp($sText, "(w+)", 3) Local $aUnique = _ArrayUnique($aSplit) Local $aResult[UBound($aUnique)][2], $i, $c, $aTmp For $i = 1 To $aUnique[0] $aResult[$i][0] = $aUnique[$i] $aTmp = _ArrayFindAll($aSplit, $aUnique[$i], 0, 0, 2) $aResult[$i][1] = UBound($aTmp) Next $aResult[0][0] = $aUnique[0] _ArraySort($aResult, 1, 1, 0, 1) Return $aResult EndFunc Br, UEZ
    1 point
×
×
  • Create New...