telmob Posted December 31, 2012 Share Posted December 31, 2012 (edited) Is this menu possible using AutoIt? Edited December 31, 2012 by telmob Link to comment Share on other sites More sharing options...
grimmlock Posted December 31, 2012 Share Posted December 31, 2012 Telmob, Are you just looking for that menu to be open the folder location? Thanks Grimm Thanks Grimm Link to comment Share on other sites More sharing options...
abberration Posted December 31, 2012 Share Posted December 31, 2012 I think it could be possible. With a regular button, you won't get highlight when you hover over your selection. Therefore, I think something like this would help you: The download for the zip file does not link correctly. Here is the direct link to it: http://creator-lab.ucoz.ru/AutoIt/GUICtrl_SetOnHover.zip Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
grimmlock Posted December 31, 2012 Share Posted December 31, 2012 Yes Abberration is correct. The best way is to create a gui with a white background and then white buttons with the desired colors. Thanks, Grimm Thanks Grimm Link to comment Share on other sites More sharing options...
telmob Posted December 31, 2012 Author Share Posted December 31, 2012 Thanks guys. You'v really helped me out. Link to comment Share on other sites More sharing options...
grimmlock Posted December 31, 2012 Share Posted December 31, 2012 Telmob try this expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <staticconstants.au3> #include <misc.au3> ;~ Global $XS_n $GUI = GUICreate("This is a test GUI", 400, 400) GUISetBkColor(0xFFFFFF) ;~ GUICtrlCreateButton("X", 0, 0, 1, 1) ;~ GUICtrlSetBkColor(-1, 0xFFFFFF) ;~ GUICtrlSetColor(-1, 0x000000) $BTN = GUICtrlCreateLabel("--> Document", 50, 25, 250, 50, BitOR($SS_LEFT, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) $BTN2 = GUICtrlCreateLabel("--> Picture", 50, 100, 250, 50, BitOR($SS_LEFT, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) $BTN3 = GUICtrlCreateLabel("--> Music", 50, 175, 250, 50, BitOR($SS_LEFT, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) $BTN4 = GUICtrlCreateLabel("--> Video", 50, 250, 250, 50, BitOR($SS_LEFT, $SS_CENTERIMAGE)) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ; MsgBox(0, "SAFE!", "Congratulations: Curiosity didn't kill you...this time...") Exit Case $BTN ; <<<<<<<<< Documents GUICtrlSetBkColor($BTN, 0xFFFFFF) $over = True While _IsPressed(01) Sleep(20) $ci = GUIGetCursorInfo() If $ci[4] = $BTN And $over = False Then GUICtrlSetBkColor($BTN, 0xFFFFFF) $over = True EndIf If $ci[4] <> $BTN And $over = True Then GUICtrlSetBkColor($BTN, 0xFFFFFF) $over = False EndIf WEnd GUICtrlSetBkColor($BTN, 0xFFFFFF) $ci = GUIGetCursorInfo() If $ci[4] = $BTN Then ShellExecute("explorer.exe", @UserProfileDir & "My Documents") ; <<< might need to change to \My Documents Case $BTN2 ; <<<<<<<<<<< Pictures GUICtrlSetBkColor($BTN2, 0xFFFFFF) $over = True While _IsPressed(01) Sleep(20) $ci = GUIGetCursorInfo() If $ci[4] = $BTN2 And $over = False Then GUICtrlSetBkColor($BTN2, 0xFFFFFF) $over = True EndIf If $ci[4] <> $BTN2 And $over = True Then GUICtrlSetBkColor($BTN2, 0xFFFFFF) $over = False EndIf WEnd GUICtrlSetBkColor($BTN2, 0xFFFFFF) $ci = GUIGetCursorInfo() If $ci[4] = $BTN2 Then ShellExecute("explorer.exe", @UserProfileDir & "My Pictures") ; <<< might need to change to \My Pictures Case $BTN3 ; <<<<<<<< Music GUICtrlSetBkColor($BTN3, 0xFFFFFF) $over = True While _IsPressed(01) Sleep(20) $ci = GUIGetCursorInfo() If $ci[4] = $BTN3 And $over = False Then GUICtrlSetBkColor($BTN3, 0xFFFFFF) $over = True EndIf If $ci[4] <> $BTN3 And $over = True Then GUICtrlSetBkColor($BTN3, 0xFFFFFF) $over = False EndIf WEnd GUICtrlSetBkColor($BTN3, 0xFFFFFF) $ci = GUIGetCursorInfo() If $ci[4] = $BTN3 Then ShellExecute("explorer.exe", @UserProfileDir & "My Music") ; <<< might need to change to \My Music Case $BTN4 ; <<<<<<<<<< Video GUICtrlSetBkColor($BTN4, 0xFFFFFF) $over = True While _IsPressed(01) Sleep(20) $ci = GUIGetCursorInfo() If $ci[4] = $BTN4 And $over = False Then GUICtrlSetBkColor($BTN4, 0xFFFFFF) $over = True EndIf If $ci[4] <> $BTN2 And $over = True Then GUICtrlSetBkColor($BTN4, 0xFFFFFF) $over = False EndIf WEnd GUICtrlSetBkColor($BTN4, 0xFFFFFF) $ci = GUIGetCursorInfo() If $ci[4] = $BTN4 Then ShellExecute("explorer.exe", @UserProfileDir & "My Videos") ; <<< might need to change to \My Videos EndSwitch WEnd I grabbed the base code from here Post #4 Thanks Grimm Link to comment Share on other sites More sharing options...
telmob Posted January 1, 2013 Author Share Posted January 1, 2013 Oh, interesting. Thank you again. That can be useful... Link to comment Share on other sites More sharing options...
guinness Posted January 1, 2013 Share Posted January 1, 2013 (edited) Search the Forum for COMMANDLINK. #include <GUIButton.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> Example() Func Example() Local $hGUI = GUICreate('Buttons', 400, 300) Local $iButton_1 = GUICtrlCreateButton('Button1', 50, 50, 200, 100, $BS_COMMANDLINK) _GUICtrlButton_SetNote(GUICtrlGetHandle($iButton_1), 'Description of Button_1.') _GUICtrlButton_SetShield(GUICtrlGetHandle($iButton_1), True) Local $iButton_2 = GUICtrlCreateButton('Button2', 50, 150, 300, 100, $BS_COMMANDLINK) _GUICtrlButton_SetNote(GUICtrlGetHandle($iButton_2), 'Description of Button_2.') _GUICtrlButton_SetShield(GUICtrlGetHandle($iButton_2), True) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $iButton_1 MsgBox(0, '', 'Button 1 pressed!') Case $iButton_2 MsgBox(0, '', 'Button 2 pressed!') EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>Example Edited January 1, 2013 by guinness 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...
telmob Posted January 1, 2013 Author Share Posted January 1, 2013 (edited) Perfecto! That is exactly it! If i set: _GUICtrlButton_SetShield(GUICtrlGetHandle($iButton_2), False)Instead of True, i also get the pretty arrows. Edited January 1, 2013 by telmob Link to comment Share on other sites More sharing options...
guinness Posted January 1, 2013 Share Posted January 1, 2013 You're welcome. See I can provide a working example! 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...
telmob Posted January 1, 2013 Author Share Posted January 1, 2013 ahahah, yes you can! Link to comment Share on other sites More sharing options...
matwachich Posted January 2, 2013 Share Posted January 2, 2013 (edited) What about this style of button in WinXP? Does it display correctly?ThanksEdit: OK, I found. It cannot be used with windows XPWindows Vista and Version 6.00. Creates a command link button that behaves like a BS_PUSHBUTTON style button, but the command link button has a green arrow on the left pointing to the button text. A caption for the button text can be set by sending the BCM_SETNOTE message to the button.From MSDN Edited January 2, 2013 by matwachich Link to comment Share on other sites More sharing options...
guinness Posted January 2, 2013 Share Posted January 2, 2013 Considering extended support will be ending in about 16 months time, people should start looking at upgrading their system, especially before 2038 if they're using XP SP3 32-bit! "What's that? 1970?!!" 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...
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