Starstar Posted April 13, 2013 Share Posted April 13, 2013 (edited) how to add browse option instead of enter icon location. expandcollapse popup#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 April 13, 2013 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." Link to comment Share on other sites More sharing options...
Nessie Posted April 13, 2013 Share Posted April 13, 2013 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 Link to comment Share on other sites More sharing options...
Starstar Posted April 13, 2013 Author Share Posted April 13, 2013 thanks Nessie i do try it... Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
water Posted April 13, 2013 Share Posted April 13, 2013 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Starstar Posted April 13, 2013 Author Share Posted April 13, 2013 Thanks Water but which command i can use instead of send. Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
guinness Posted April 13, 2013 Share Posted April 13, 2013 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
water Posted April 13, 2013 Share Posted April 13, 2013 Please have a look at ControlSend in the help file. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Starstar Posted April 13, 2013 Author Share Posted April 13, 2013 A thank you to all.............. Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once." Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now