Jump to content
Sign in to follow this  
Starstar

Icon changer

Recommended Posts

how to add browse option instead of enter icon location.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <process.au3>
$DELAY = 250
$ICOnGUI = GUICreate("Icon Changer", 287, 140, 193, 115)
$ICONBrows = GUICtrlCreateLabel("Type Location:", 16, 40, 80, 17)
$ICONBrowsin = GUICtrlCreateInput("", 112, 40, 153, 21)
$SHORTCUT = GUICtrlCreateLabel("Shortcut Name:", 16, 80, 75, 17)
Dim $ES_PA,$ES_AU
$SHORTCUTIN = GUICtrlCreateInput("", 112, 80, 153, 21, BitOR($ES_PA,$ES_AU))
$btnOK = GUICtrlCreateButton("&GO!", 110, 110, 75, 25, 0)
$lblInfo = GUICtrlCreateLabel("Brows your Icon!", 48, 8, 196, 20)
$lblInfo = GUICtrlSetFont($lblInfo, 12, 800)
GUISetState(@SW_SHOW)
while 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $btnOK
$Brows = GUICtrlRead($ICONBrowsin)
If StringLen($Brows)=0 Then
MsgBox(64,"AdnanBaloch","Plese Type your Icon Location")
Else
$short = GUICtrlRead($SHORTCUTIN)
if StringLen($short) = 0 Then
MsgBox(64,"AdnanBaloch","Plese Type your Shortcut Name")
Else
$Brows = GUICtrlRead($ICONBrowsin)
$short = GUICtrlRead($SHORTCUTIN)
Send("#d")
Sleep($DELAY)
Sleep($DELAY)
ControlListView("", "", "SysListView321", "SelectClear")
$ControlID2 = ControlListView("", "", "SysListView321", "FindItem", $short, "")
ControlListView("", "", "SysListView321", "Select", $ControlID2)
Sleep($DELAY)
Sleep($DELAY)
Send("!{Enter}")
Sleep($DELAY)
WinWaitActive($short & " Properties")
Send("!c")
WinWaitActive("Change Icon")
Send("!l")
Sleep($DELAY)
Send($Brows)
Sleep($DELAY)
Send("!s") ;Cruser will go on Icon
Sleep($DELAY)
Send("{Enter}")
WinWaitActive($short & " Properties")
Send("!a")
Sleep($DELAY)
Send("{Enter}")
ExitLoop
EndIf
EndIf
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
GUISetState(@SW_HIDE)
WinWaitClose($short & " Properties")
MsgBox(0, "Adnan Baloch", "Script wrote By Adnan Baloch")
Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Share this post


Link to post
Share on other sites

Take a look to FileOpenDialog and its related function.

Hi!


My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Share this post


Link to post
Share on other sites

If you want a reliable script don't use Send. Send goes to the active window. So if a user move the focus to another window while your script runs you won't get the desired result.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

ControlSend. Look in the help file for syntax.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites

Please have a look at ControlSend in the help file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...