stingjoel Posted December 3, 2004 Share Posted December 3, 2004 Sliding Menu like windows taskbar...this script just basic script... Change $SlidingWidth value if you want larger menu... Change $MouseDelay value if you want shorter/longer delay to show the menu... expandcollapse popup#Include <GUIConstants.au3> AutoItSetOption("GuiOnEventMode", 1) AutoItSetOption("TrayIconHide", 1) Global $GUIWinSliding $SlidingWidth = 50 $MouseDelay = 50 $SlidingPos = -($SlidingWidth + 2) $MouseCounter = 0 $MouseLeftCounter = 0 $FlagSliding = 0 $GUIWinSliding = GUICreate("BSMUSliding", $SlidingWidth, @DesktopHeight, $SlidingPos, 0, $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetState(@SW_SHOW) HotKeySet("{PAUSE}", "Quit") While 1 $MousePosition = MouseGetPos() If $MousePosition[0] = 0 Then $MouseLeftCounter = 0 $MouseCounter = $MouseCounter + 1 Else If $FlagSliding Then If $MousePosition[0] >= $SlidingWidth Then $Mousecounter = 0 $MouseLeftCounter = $MouseLeftCounter + 1 EndIf EndIf EndIf If $MouseCounter = $MouseDelay Then $MouseCounter = 0 $MouseLeftCounter = 0 If $FlagSliding = 0 Then For $X = $SlidingPos To 0 step 2 WinMove("BSMUSliding", "", $X, 0) Next $FlagSliding = 1 EndIf EndIf If $MouseLeftCounter = $MouseDelay Then $MouseLeftCounter = 0 $MouseCounter = 0 If $FlagSliding = 1 Then For $X = 0 To $SlidingPos Step -2 WinMove("BSMUSliding", "", $X, 0) Next $FlagSliding = 0 EndIf EndIf Sleep(10) WEnd Func Quit() Exit EndFunc Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 3, 2004 Share Posted December 3, 2004 I ran it, but I don't see anything... I'm know I'm surely missing something, can you give me a pointer? Link to comment Share on other sites More sharing options...
sandyd Posted December 3, 2004 Share Posted December 3, 2004 Move you mouse over to the extreme left of your screen, a blank form similar to the windows taskbar will pop-out. ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 3, 2004 Share Posted December 3, 2004 Ah gotcha, cool Link to comment Share on other sites More sharing options...
SlimShady Posted December 3, 2004 Share Posted December 3, 2004 It's allright. You could add lot's of features: - resizable and save on exit - don't show the "menu" in the taskbar - hotkey to show/hide the "menu" - ability to configure the items + icons that show up and the action when you click on an item Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 3, 2004 Share Posted December 3, 2004 - don't show the "menu" in the taskbar<{POST_SNAPBACK}>Is it possible to do that with an AutoIt GUI? If so how, because I've got a script where I'd be keen to do this... Link to comment Share on other sites More sharing options...
SlimShady Posted December 3, 2004 Share Posted December 3, 2004 (edited) Wait a minute and I'll see if I can remember. Edit: Easy one. (Removed useless lines) #include <GUIConstants.au3> ;Initialize variables Global $GUIWidth Global $GUIHeight $GUIWidth = 250 $GUIHeight = 250 $unused_win = GUICreate(@ScriptName) GUICreate("New GUI", $GUIWidth, $GUIHeight, -1, -1, -1, -1, $unused_win) GUISetState(@SW_SHOW) While 1 Sleep(25) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit ;Case $msg = ... EndSelect WEnd Edited December 3, 2004 by SlimShady Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 3, 2004 Share Posted December 3, 2004 Ahhhh, so you create your GUI as a child of another GUI which is never shown? Is that how I've read the code right? Link to comment Share on other sites More sharing options...
Nova Posted December 3, 2004 Share Posted December 3, 2004 No title in the taskbar $WS_EX_TOOLWINDOW GUICreate("New GUI", $GUIWidth, $GUIHeight, -1, -1, -1, -1, $WS_EX_TOOLWINDOW) Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 3, 2004 Share Posted December 3, 2004 Yeah, or that'll work too :-) Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 6, 2004 Share Posted December 6, 2004 Umm, just tested this - and $WS_EX_TOOLWINDOW still seems to show the taskbar. Here's the line I used; GUICreate("Beachlands Connection Information",300,100,-10,-10,$WS_EX_TOOLWINDOW,$WS_EX_TOPMOST) Ideally I want this to not have a toolbar at the top either, al la GUICreate("Beachlands Connection Information",300,100,-10,-10,$WS_POPUPWINDOW,$WS_EX_TOPMOST) Link to comment Share on other sites More sharing options...
Holger Posted December 6, 2004 Share Posted December 6, 2004 (edited) @chris: ws_EX_toolwindow is an ExStyle NOT only Style you know. So you have to use it like: GUICreate("Beachlands Connection Information",300,100,-10,-10,$WS_POPUPWINDOW,BitOr($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST)) Regards Holger Edited December 6, 2004 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 6, 2004 Share Posted December 6, 2004 Ah I was through cos I just saw four numbers in the example, and assumed these were size/positioning, so thought the next was just a style. Doh! Link to comment Share on other sites More sharing options...
Norsestar Posted November 30, 2007 Share Posted November 30, 2007 hmm... well, i took the different bits of code posted here and added a button to it. only thing i cant figure out now, is how to make that button bring up a menu when you click on it. kinda like a start menu lolz. any thoughts? Education: Francis Tuttle Technology Center adult full-time studentCourse of study: Network TechnologyCurrent Course: Microsoft Windows Server 2003, Enterprise EditionCompleted Courses: CompTIA A+ Hardware and Software, Windows XP Professional, Microsoft Office 2003, Desktop Support and Troubleshooting, and CompTIA Network+Remaining Courses: Linux Administration, Copper Cabling, Microsoft Windows Server 2003, Enterprise EditionAchievements: @17 years old, scored 98th percentile U.S. in Algebra 2 and Advanced Chemistry. [i.e. Ranked top 2% in the nation of High School students] 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