
ffdshow
Active Members-
Posts
113 -
Joined
-
Last visited
ffdshow's Achievements
-
I use the next code to rename rar volumes named like this:XvQG7zdAUbWju9NL6BDY.part01.rar,XvQG7zdAUbWju9NL6BDY.part02.rar... to something like this: DWhMwdmEk5Csk6ob5IUR.part01.rar, DWhMwdmEk5Csk6ob5IUR.part02.rar... Also, a md5 file present in the source folder will be renamed and I will attach another script to this one, to change filenames inside it. #Include <File.au3> #Include <Array.au3> $Source_Path = "D:\1" $Destination_Path = "D:\1\_Renamed" $Characters_To_Delete = "XvQG7zdAUbWju9NL6BDY" $Characters_To_Write = "DWhMwdmEk5Csk6ob5IUR" $FileList = _FileListToArray($Source_Path, $Characters_To_Delete & "*.*", 1) For $i = 1 To $FileList[0] $Name = StringTrimLeft($FileList[$i],20) ; trim the first 20 characters from the left side of the file name FileMove($Source_Path & "\" & $FileList[$i], $Destination_Path & "\" & $Characters_To_Write & $Name, 1) NextIt's possible to rename those files without use of StringTrimLeft command and how to? Thanks!
-
ffdshow reacted to a post in a topic: Replace string in registry value
-
Replace string in registry value
ffdshow replied to ffdshow's topic in AutoIt General Help and Support
Thanks! The script should look like this: $string = RegRead("HKEY_CURRENT_USER\Software\TechSmith\Camtasia Studio\8.0\Camtasia Recorder\8.0", "RecorderConfig") $replace = "NO_MIC" $new_string = StringRegExpReplace($string, '(?<=<deviceId>)([^<]+)', $replace) RegWrite("HKEY_CURRENT_USER\Software\TechSmith\Camtasia Studio\8.0\Camtasia Recorder\8.0", "RecorderConfig", "REG_SZ", $new_string) -
Hi, I have a large registry value that contain the next string: <audioSettings><deviceId>Realtek Digital Input (Realtek </deviceId> The string "Realtek Digital Input (Realtek" can be "Microphone (SB Audigy)" or else. I want to change "Realtek Digital Input (Realtek" or whatever is between <audioSettings><deviceId> and </deviceId> with "NO_MIC", to look finally like this: <audioSettings><deviceId>NO_MIC</deviceId> How should look the StringRegExpReplace command?
-
ffdshow reacted to a post in a topic: Delete duplicate lines from a file, but with some exceptions
-
A simple script like the next one can delete duplicate lines from files: #include<Array.au3> #include<File.au3> $InputFile = "C:\Test.txt" Local $aFile, $aArray _FileReadToArray($InputFile, $aFile) $aArray = _ArrayUnique($aFile, 1, 1) _FileWriteFromArray($InputFile, $aArray, 1) How can I preserve, for example the duplicate empty lines and the duplicate lines that contain a string like %16422% ?
-
Nice. Thanks in advance!
-
I found this: , but I don't want another program running in system tray.
-
No.
-
Thanks for answer, but I don't know how to use it. I have found another script which set the desktop wallpaper. It's possible to modify the code to work with multiple images from a folder? Here is that script: _ChangeWallpaper("C:\Windows\Web\Wallpaper\Custom\499.jpg",2) ; .bmp file path that you want to set as wallpaper (for other file ; type change 'bmp' below inside the function) Func _ChangeWallpaper($sFile,$iType) ; Changes the wallpaper to $sFilename using $iType as: ; 1 Tiled ; 2 Centered ; 3 Stretched ; any other value (usually 0) unchanged ; ; Returns ; 0 if everything is allright. ; -1 if $sFile does not exist. @error is set to 1 ; -2 if ŁsFile is not a .bmp file. @error is set to 2 If Not FileExists($sFile) Then SetError(1) Return -1 EndIf If StringTrimLeft($sFile,StringInStr($sFile,'.',0,-1)) <> 'jpg' Then SetError(2) Return -2 EndIf Select Case $iType = 1 RegWrite('HKCU\Control Panel\Desktop','TileWallpaper','reg_sz','1') RegWrite('HKCU\Control Panel\Desktop','WallpaperStyle','reg_sz','0') Case $iType = 2 RegWrite('HKCU\Control Panel\Desktop','TileWallpaper','reg_sz','0') RegWrite('HKCU\Control Panel\Desktop','WallpaperStyle','reg_sz','0') Case $iType = 3 RegWrite('HKCU\Control Panel\Desktop','TileWallpaper','reg_sz','0') RegWrite('HKCU\Control Panel\Desktop','WallpaperStyle','reg_sz','2') Case Else EndSelect RegWrite('HKCU\Control Panel\Desktop','Wallpaper','reg_sz',$sFile) DllCall("User32.dll","int","SystemParametersInfo","int",20,"int",0,"str",$sFile,"int",0) Return 0 EndFunc Thanks!
-
Hello, If I set desktop background to C:WindowsWebWallpaperCustom, which contain jpg files and the time for picture changing to 5 min, I got the next registry modifications: RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\", "TranscodedImageCache", "REG_BINARY", "0x7ac301003b7f070040060000b00400000089fa9941a0c70143003a005c00570069006e0064006f00770073005c005700650062005c00570061006c006c00700061007000650072005c0043007500730074006f006d005c003400390039002e006a00700067000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\", "TranscodedImageCache_000", "REG_BINARY", "0x7ac301003b7f070040060000b00400000089fa9941a0c70143003a005c00570069006e0064006f00770073005c005700650062005c00570061006c006c00700061007000650072005c0043007500730074006f006d005c003400390039002e006a0070006700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c005c003f005c0044004900530050004c00410059002300470053004d003400340033004300230034002600320032006300320036003500380065002600300026005500490044003100360038003400330030003000380023007b00650036006600300037006200350066002d0065006500390037002d0034006100390030002d0062003000370036002d003300330066003500370062006600340065006100610037007d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") RegWrite("HKEY_CURRENT_USER\Control Panel\Personalization\Desktop Slideshow\", "LastTickLow", "REG_DWORD", 833732269) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\Grid\", "DesktopTileCachedData", "REG_BINARY", "0x0000000000000000f800000078000000e8be98987f34cf0143003a005c00550073006500720073005c0050006f00770065007200200055007300650072005c0041007000700044006100740061005c0052006f0061006d0069006e0067005c004d006900630072006f0073006f00660074005c00570069006e0064006f00770073005c005400680065006d00650073005c005400720061006e00730063006f00640065006400570061006c006c0070006100700065007200000019254768313421689e7b19b8a4576028cc0101f9ffff000000000000000000000000000000007801000031d50b0000000000c901000098a97e0001f9ffff50a87e0001f9ffff50a87e0001f9ffff20a87e0001f9ffff101d360060f9ffff7801000009000000000000000000000046020000ca0000000000000000000080000000000000000002000000000000001b000000000000004602000002000000000000001b0000001c000000000000000a0000001c0000006e0000000e0000007b0000007f000000ec000000f00000005d01000061010000ce010000d20100003f0200000a000000000000006e0000006f000000000000000a0000006f000000c10000000e0000007b0000007f000000ec000000f00000005d01000061010000ce010000d20100003f0200000a00000000000000c1000000c2000000000000000a000000c2000000ca0000000e0000007b0000007f000000ec000000f00000005d01000061010000") The problem is that using the above code, will not apply the tweaks. I guess SystemParametersInfo must be updated, but how ?
-
ffdshow reacted to a post in a topic: Convert Vbscript to set visual effects to AutoIt syntax
-
$InstallDir = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\flightsimulator", "InstallLocation") If FileExists($InstallDir & "\flightsimulator.exe") Then Run($InstallDir & "\flightsimulator.exe") EndIf Or: $InstallDir = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\flightsimulator", "InstallLocation") If FileExists($InstallDir & "\flightsimulator.exe") Then MsgBox(0x40010, @ScriptName, "flightsimulator is already installed", 4) Exit EndIf
-
Possible solution: extract the msi file with Universal Extractor or with /a switch, then go here and read about how to sign your unsigned driver. After your driver is signed, repack the msi with InstallShield (which is not easy) or make an exe installer with Inno Setup.
-
#include <Constants.au3> $DOS = Run(@ComSpec & " /c dism /Get-WimInfo /WimFile:F:\Windows 7\sources\boot.wim", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($DOS, 2) $Output = StdoutRead($DOS) If StringInStr($Output, "Microsoft Windows Setup (x86)") Then ; dism command here for injecting 32-bit drivers in a 32-bit boot.wim ElseIf StringInStr($Output, "Microsoft Windows Setup (x64)") Then ; dism command here for injecting 64-bit drivers in a 64-bit boot.wim EndIf
-
Hello, I want to inject some drivers into boot.wim from two versions of Windows 7 sources. In the script, I want to check if boot.wim is 32-bit or 64-bit. This can be done with a command like this: dism /Get-WimInfo /WimFile:F:Windows7sourcesboot.wim The output looks like this: Deployment Image Servicing and Management tool Version: 6.1.7601.17514 Details for image : F:\Windows7\sources\boot.wim Index : 1 Name : Microsoft Windows PE (x64) Description : Microsoft Windows PE (x64) Size : 1.187.717.206 bytes Index : 2 Name : Microsoft Windows Setup (x64) Description : Microsoft Windows Setup (x64) Size : 1.264.587.270 bytes The operation completed successfully. I guess I should use StdoutRead command, but how ?
-
ffdshow reacted to a post in a topic: Convert Vbscript to set visual effects to AutoIt syntax
-
ffdshow reacted to a post in a topic: Convert Vbscript to set visual effects to AutoIt syntax
-
Convert Vbscript to set visual effects to AutoIt syntax
ffdshow replied to ffdshow's topic in AutoIt General Help and Support
Sorry, I didn't verified your script, just choosed the tweaks from variables and run. This line (which is the most important) from your script was the problem: RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", 3) The working script is this: ; 1:1 converted from http://gallery.technet.microsoft.com/scriptcenter/Vbscript-to-set-visual-cd211be9 by UEZ 2013 ; =============== VISUAL EFFECTS =============== $A = "0" ; Animate controls and elements inside windows $B = "0" ; Fade or slide menu;s into view $C = "0" ; Fade or slide ToolTips into view $D = "0" ; Fade out menu items after clicking $E = "0" ; Show shadows under mouse pointer $F = "0" ; Show shadows under windows $G = "0" ; Slide open combo boxes $H = "0" ; Smooth-scroll list boxes $I = "1" ; Use visual styles on windows and buttons $J = "1" ; Show window contents while dragging $K = "1" ; Smooth edges of screen fonts $L = "0" ; Animate windows when minimizing and maximizing $M = "1" ; Show translucent selection rectangle $N = "1" ; Use drop shadows for icon labels on the desktop $O = "0" ; Animations in the taskbar and Start Menu $P = "0" ; Show thumbnails instead of icons $Q = "1" ; Enable desktop composition $R = "0" ; Enable transparent glass $S = "0" ; Enable Aero Peek $T = "0" ; Save taskbar thumbnail previews ; ============================================== Global $UPM_a[8], $UPM_b[8], $i, $bBin Global $UPM_a0[8] = ["1","0","0","1", $H , $G , $B ,"0"] Global $UPM_a1[8] = ["0","0", $E ,"1", $C , $D ,"1","0"] Global $UPM_a2[8] = ["0","0","0","0","0", $F , $I ,"1"] Global $UPM_a3[8] = ["1","0","0","0","0","0","0","0"] Global $UPM_a4[8] = ["0","0","0","1","0","0", $A ,"0"] Global $UPM_a5[8] = ["0","0","0","0","0","0","0","0"] Global $UPM_a6[8] = ["0","0","0","0","0","0","0","0"] Global $UPM_a7[8] = ["0","0","0","0","0","0","0","0"] For $i = 0 To UBound($UPM_a) - 1 $UPM_a[$i] = Execute("$UPM_a" & $i) Next For $i = 0 To UBound($UPM_a) - 1 $UPM_b[$i] = String(BinToDec($UPM_a[$i])) $bBin &= Hex($UPM_b[$i], 2) Next RegWrite("HKCU\Control Panel\Desktop", "UserPreferencesMask", "REG_BINARY", Binary("0x" & $bBin)) RegWrite("HKCU\Control Panel\Desktop", "DragFullWindows", "REG_SZ", IIf($J = "1", "1", "0")) RegWrite("HKCU\Control Panel\Desktop", "FontSmoothing", "REG_SZ", IIf($K = "1", "2", "0")) RegWrite("HKCU\Control Panel\Desktop\WindowMetrics", "MinAnimate", "REG_SZ", IIf($L = "1", "1", "0")) RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewAlphaSelect", "REG_DWORD", IIf($M = "1", 1, 0)) RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewShadow", "REG_DWORD", IIf($N = "1", 1, 0)) RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAnimations", "REG_DWORD", IIf($O = "1", 1, 0)) RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "IconsOnly", "REG_DWORD", IIf($P = "1", 0, 1)) RegWrite("HKCU\Software\Microsoft\Windows\DWM", "Composition", "REG_DWORD", IIf($Q = "1", 1, 0)) RegWrite("HKCU\Software\Microsoft\Windows\DWM", "CompositionPolicy", "REG_DWORD", IIf($Q = "1", 2, 0)) RegWrite("HKCU\Software\Microsoft\Windows\DWM", "ColorizationOpaqueBlend", "REG_DWORD", IIf($R = "1", 0, 1)) RegWrite("HKCU\Software\Microsoft\Windows\DWM", "EnableAeroPeek", "REG_DWORD", IIf($S = "1", 1, 0)) RegWrite("HKCU\Software\Microsoft\Windows\DWM", "AlwaysHibernateThumbnails", "REG_DWORD", IIf($T = "1", 1, 0)) RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", "REG_DWORD", 3) Func BinToDec($arrBin) Local $r = "0", $i, $iUB = UBound($arrBin) - 1 For $i = $iUB To 0 Step - 1 If $arrBin[$i] = "1" Then $r += 2 ^ ($iUB - $i) Next Return $r EndFunc Func IIf($Expression, $TruePart, $FalsePart) If $Expression Then Return $TruePart Return $FalsePart EndFunc Thanks!