Sign in to follow this  
Followers 0
telmob

Is this gui possible?

13 posts in this topic

#1 ·  Posted (edited)

Is this menu possible using AutoIt?

post-65971-0-24357500-1356974339_thumb.j

Edited by telmob

Share this post


Link to post
Share on other sites



Telmob,

Are you just looking for that menu to be open the folder location?

Thanks

Grimm


Thanks

Grimm

Share this post


Link to post
Share on other sites

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


RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks guys. You'v really helped me out. ;)

Share this post


Link to post
Share on other sites

Telmob try this

#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

Share this post


Link to post
Share on other sites

Oh, interesting. :) Thank you again.

That can be useful...

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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: 04/09/2015

Share this post


Link to post
Share on other sites

You're welcome. See I can provide a working example!


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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: 04/09/2015

Share this post


Link to post
Share on other sites

ahahah, yes you can!

:thumbsup:

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

What about this style of button in WinXP? Does it display correctly?

Thanks

Edit: OK, I found. It cannot be used with windows XP

Windows 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 by matwachich

Share this post


Link to post
Share on other sites

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?!!"


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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: 04/09/2015

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  
Followers 0