Jump to content
Sign in to follow this  
Skorpion

Klasör Symbol Degistirmek

Recommended Posts

Klasör symbol degistirmek

Selam arkadaslar ben autoit ile belirli bir klasörün symbolünü degistirmek istiyorum

bir tane scrip buldum fakat bunda kalasörü secmelisin symbolu secmelisin

benim istedigim mesela 1 adli bir klasörüm var birde 22.ico iconum var 

ben scripte tikladigimda otomatik olarak 1 adli klasörüme 22.ico adli symbolu ekleyecek 

buldugum kod söyle

$folder = FileSelectFolder("Choose folder...", "")
If @error Then Exit

$ico = FileOpenDialog("Select a file...", "", "Icon contains files (*.ico;*.exe;*.dll)", 1)
If @error Then Exit

IniWriteSection($folder & "\" & "Desktop.ini", ".ShellClassInfo", _
                "IconFile=" & $ico & @LF & _
                "IconIndex=0" & @LF & _
                "InfoTip=AutoIt RULEZZZ!")
                
FileSetAttrib($folder & "\" & "Desktop.ini", "+H")
FileSetAttrib($folder, "+R")

Tesekkürler

Share this post


Link to post
Share on other sites
$folder = "C:\Users\BART\Desktop\1\"
If @error Then Exit

$ico = "C:\Users\BART\Desktop\icon.ico"
If @error Then Exit

IniWriteSection($folder & "\" & "Desktop.ini", ".ShellClassInfo", _
		"IconFile=" & $ico & @LF & _
		"IconIndex=0" & @LF & _
		"InfoTip=AutoIt RULEZZZ!")

FileSetAttrib($folder & "\" & "Desktop.ini", "+H")
FileSetAttrib($folder, "+R")

 

  • Like 1

Share this post


Link to post
Share on other sites

Ek olarak,yanlışım varsa düzelt :)  @SimpsoN_Bart

#include <WinAPIShellEx.au3>

Local $aKlasorYolu = @ScriptDir & "\1"
If Not $aKlasorYolu Then
	Exit
EndIf

Local $aIconYolu = @ScriptDir & "\22.ico"
If Not $aIconYolu Then
	Exit
EndIf

Local $tSHFCS = DllStructCreate($tagSHFOLDERCUSTOMSETTINGS & ';wchar szIconFile[' & (StringLen($aIconYolu) + 1) & ']')
DllStructSetData($tSHFCS, 'Size', DllStructGetPtr($tSHFCS, 'szIconFile') - DllStructGetPtr($tSHFCS))
DllStructSetData($tSHFCS, 'Mask', $FCSM_ICONFILE)
DllStructSetData($tSHFCS, 'IconFile', DllStructGetPtr($tSHFCS, 'szIconFile'))
DllStructSetData($tSHFCS, 'SizeIF', 260)
DllStructSetData($tSHFCS, 'IconIndex', $aIconYolu)
DllStructSetData($tSHFCS, 'szIconFile', $aIconYolu)

_WinAPI_ShellGetSetFolderCustomSettings($aKlasorYolu, $FCS_FORCEWRITE, $tSHFCS)

 

Edited by Mehmet
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Skorpion Kullandığın autoit eski sürümdür ondan.

Autoit Latest version : v3.3.14.5

Şununla bir çıktı verebilirmisin

MsgBox(0, "Version", @AutoItVersion)

Edited by Mehmet
  • Like 1

Share this post


Link to post
Share on other sites

Evet ondanmis süper calisdi cok tesekkür ederim arkadasim

bir konu daha acmisdim masa üstü arka plani hakkinda onunda calismamama nedeni buymus 

Edited by Skorpion

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...