ismee Posted February 12, 2011 Share Posted February 12, 2011 Is that possible to make a small gui appearing at top of windows. So I can access different hardisk or network drive quickly without clicking my computer icon? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2011 Moderators Share Posted February 12, 2011 ismee, Yes. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Alphacharly Posted February 12, 2011 Share Posted February 12, 2011 Hi Is this what you want? Create short cut for c:\ d:\ drive Creates a shortcuts folder in c drive. Thanks Link to comment Share on other sites More sharing options...
Alphacharly Posted February 12, 2011 Share Posted February 12, 2011 Sorry attachment did not come in, Here it is/persoanlized Shortcut.au3 Link to comment Share on other sites More sharing options...
taietel Posted February 13, 2011 Share Posted February 13, 2011 Or this? expandcollapse popup#include <StaticConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> ;written by taietel ;modify to fit your needs Global $bToggle = 0, $bEditToggle=0, $iW=500, $iH=350 $aDrive = DriveGetDrive("all") Global $iItems=$aDrive[0] Global $aButtons[$iItems][3] $hGui = GUICreate("Select drives", $iW, $iH, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS)) GUISetBkColor(0x000000) $hExit = GUICtrlCreateIcon("shell32.dll", -28, $iW-24, 8, 16, 16, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetTip(-1, "Close me!...") GUICtrlSetCursor(-1,0) GUICtrlSetDefColor(0xDEDEDE) For $i=1 To $iItems-1 Local $iIcon Switch DriveGetType($aDrive[$i]) Case "fixed" $iIcon = -8 Case "cdrom" $iIcon = -189 Case "removable" $iIcon = -195 Case "network" $iIcon = -10 Case "ramdisk" $iIcon = -13 Case Else $iIcon = -9 EndSwitch $aButtons[$i][0] = GUICtrlCreateIcon("shell32.dll", $iIcon, 8, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetCursor(-1,0) GUICtrlSetState(-1,$GUI_HIDE) $aButtons[$i][1]=GUICtrlCreateLabel(StringUpper(DriveGetType($aDrive[$i]) & " " & $aDrive[$i]), 48, $iH-30,100,17,$SS_CENTERIMAGE) GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) ;GUICtrlSetBkColor(-1,0x222222) GUICtrlSetCursor(-1,0) GUICtrlSetState(-1,$GUI_HIDE) Next $aButtons[0][0] = GUICtrlCreateIcon("shell32.dll", -131, 8, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetCursor(-1,0) GUICtrlSetTip(-1, "Press me to expand/retract!") $aButtons[0][1]=GUICtrlCreateLabel("Drives", 48, $iH-30) GUICtrlSetTip(-1, "Press me to expand/retract!") GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) GUICtrlSetCursor(-1,0) GUICtrlCreatePic("", 1, 1, $iW-2, $iH-2, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS), $GUI_WS_EX_PARENTDRAG) WinSetTrans($hGui,"",220) GUISetState(@SW_SHOW) While 1 Sleep(10) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $hExit Exit Case $aButtons[0][0], $aButtons[0][1] _ExpandRetract() Case $aButtons[1][0] To $aButtons[$iItems-1][0], $aButtons[1][1] To $aButtons[$iItems-1][1] For $i=1 To $iItems-1 If $nMsg = $aButtons[$i][0] Or $nMsg = $aButtons[$i][1] Then ShellExecute($aDrive[$i]&"\","","","open") Next Sleep(200) _ExpandRetract() EndSwitch WEnd Func _ExpandRetract() Switch $bToggle Case 0 For $i=1 To $iItems-1 ControlMove($hGui,"",$aButtons[$i][0], 8 + 2*$i^2, $iH - 40 - $i*32) ;~ControlMove($hGui,"",$aButtons[$i][0], 8, $iH - 40 - $i*32);VERTICAL GUICtrlSetState($aButtons[$i][0],$GUI_SHOW) ControlMove($hGui,"",$aButtons[$i][1], 48 + 2*$i^2, $iH - 30 - $i*32) ;~ControlMove($hGui,"",$aButtons[$i][1], 48, $iH - 30 - $i*32);VERTICAL GUICtrlSetState($aButtons[$i][1],$GUI_SHOW) Sleep(20) Next $bToggle=1 Case 1 For $i=$iItems-1 To 1 Step -1 GUICtrlSetState($aButtons[$i][0],$GUI_HIDE) ControlMove($hGui,"",$aButtons[$i][0], 8, $iH-40) GUICtrlSetState($aButtons[$i][1],$GUI_HIDE) ControlMove($hGui,"",$aButtons[$i][1], 48, $iH-30) Sleep(20) Next $bToggle=0 EndSwitch EndFunc Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
ismee Posted February 13, 2011 Author Share Posted February 13, 2011 taietel, similiar. But how do I make it always appear at top of windows (the program is not show at taskbar) . So i don't need to always click on this program. thanks Link to comment Share on other sites More sharing options...
Zedna Posted February 13, 2011 Share Posted February 13, 2011 taietel, similiar. But how do I make it always appear at top of windows (the program is not show at taskbar) . So i don't need to always click on this program. thanks $hGui = GUICreate("Select drives", $iW, $iH, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS), $WS_EX_TOPMOST) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ismee Posted February 16, 2011 Author Share Posted February 16, 2011 $hGui = GUICreate("Select drives", $iW, $iH, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS), $WS_EX_TOPMOST) zedna, it doesn't work Link to comment Share on other sites More sharing options...
taietel Posted February 17, 2011 Share Posted February 17, 2011 ismee, add $WS_EX_TOOLWINDOW to Zedna's suggestion: expandcollapse popup#include <StaticConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> ;written by taietel ;modify to fit your needs Global $bToggle = 0, $bEditToggle=0, $iW=70, $iH=380 $aDrive = DriveGetDrive("all") Global $iItems=$aDrive[0] Global $aButtons[$iItems][3] $hGui = GUICreate("Select drives", $iW, $iH, @DesktopWidth-$iW-20, @DesktopHeight-$iH-50, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW)) GUISetBkColor(0x000000) $hExit = GUICtrlCreateIcon("shell32.dll", -28, $iW-24, 8, 16, 16, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetTip(-1, "Close me!...") GUICtrlSetCursor(-1,0) GUICtrlSetDefColor(0xDEDEDE) For $i=1 To $iItems-1 Local $iIcon Switch DriveGetType($aDrive[$i]) Case "fixed" $iIcon = -8 Case "cdrom" $iIcon = -189 Case "removable" $iIcon = -195 Case "network" $iIcon = -10 Case "ramdisk" $iIcon = -13 Case Else $iIcon = -9 EndSwitch $aButtons[$i][0] = GUICtrlCreateIcon("shell32.dll", $iIcon, 8, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetCursor(-1,0) GUICtrlSetState(-1,$GUI_HIDE) $aButtons[$i][1]=GUICtrlCreateLabel(StringUpper($aDrive[$i]), 48, $iH-30,100,17,$SS_CENTERIMAGE) GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) GUICtrlSetCursor(-1,0) GUICtrlSetState(-1,$GUI_HIDE) Next $aButtons[0][0] = GUICtrlCreateIcon("shell32.dll", -131, 8, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetCursor(-1,0) GUICtrlSetTip(-1, "Press me to expand/retract!") $aButtons[0][1]=GUICtrlCreateLabel(" ", 48, $iH-30) GUICtrlSetTip(-1, "Press me to expand/retract!") GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) GUICtrlSetCursor(-1,0) _ExpandRetract() GUICtrlCreatePic("", 1, 1, $iW-2, $iH-2, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS), $GUI_WS_EX_PARENTDRAG) WinSetTrans($hGui,"",180) GUISetState(@SW_SHOW) While 1 Sleep(10) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $hExit Exit Case $aButtons[0][0], $aButtons[0][1] _ExpandRetract() Case $aButtons[1][0] To $aButtons[$iItems-1][0], $aButtons[1][1] To $aButtons[$iItems-1][1] For $i=1 To $iItems-1 If $nMsg = $aButtons[$i][0] Or $nMsg = $aButtons[$i][1] Then ShellExecute($aDrive[$i]&"\","","","open") Next EndSwitch WEnd Func _ExpandRetract() Switch $bToggle Case 0 For $i=1 To $iItems-1 ;ControlMove($hGui,"",$aButtons[$i][0], 8 + 2*$i^2, $iH - 40 - $i*32) ControlMove($hGui,"",$aButtons[$i][0], 8, $iH - 40 - $i*32);VERTICAL GUICtrlSetState($aButtons[$i][0],$GUI_SHOW) ;ControlMove($hGui,"",$aButtons[$i][1], 48 + 2*$i^2, $iH - 30 - $i*32) ControlMove($hGui,"",$aButtons[$i][1], 48, $iH - 30 - $i*32);VERTICAL GUICtrlSetState($aButtons[$i][1],$GUI_SHOW) Sleep(20) Next $bToggle=1 Case 1 For $i=$iItems-1 To 1 Step -1 GUICtrlSetState($aButtons[$i][0],$GUI_HIDE) ControlMove($hGui,"",$aButtons[$i][0], 8, $iH-40) GUICtrlSetState($aButtons[$i][1],$GUI_HIDE) ControlMove($hGui,"",$aButtons[$i][1], 48, $iH-30) Sleep(20) Next $bToggle=0 EndSwitch EndFunc Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
ismee Posted February 19, 2011 Author Share Posted February 19, 2011 thanks...it works. 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