bonjour Posted February 19, 2009 Posted February 19, 2009 (edited) Hello, Sorry for my english but i don't speak well english I would like to know if there's a way to create a small rectangular graphical image (bmp or jpeg, or another format) which show in a visual image the size of a directory (there's a limit of storage, 20mo, and i would like to display a graphical image in pourcentage used/permitted) ? How can i do that ? THANKS Edited February 19, 2009 by bonjour
Moderators Melba23 Posted February 19, 2009 Moderators Posted February 19, 2009 bonjour, Bienvenu to the Autoit forums. Have a look at this:#include <GUIConstantsEx.au3> #include <StaticConstants.au3> GUICreate("", 200,250) $iDriveSize = DriveSpaceTotal( "c:\" ) $iDriveFree = DriveSpaceFree( "c:\" ) $iDriveFreewidth = Int($iDriveFree / $iDriveSize * 180) GUICtrlCreateLabel("",10,10,180,40) GUICtrlSetBkColor(-1, 0xff0000) GUICtrlCreateLabel("", 190 - $iDriveFreewidth, 10, $iDriveFreewidth, 40) GUICtrlSetBkColor(-1, 0x00ff00) $iUsed_PerCent = 100 * ($iDriveSize - $iDriveFree) / $iDriveSize GUICtrlCreateProgress(10, 80, 180, 20) GUICtrlSetData(-1 , $iUsed_PerCent) $iUsed_Angle = 360 * ($iDriveSize - $iDriveFree) / $iDriveSize GUICtrlCreateGraphic(50, 120, 100, 100) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00) GUICtrlSetGraphic(-1, $GUI_GR_PIE, 50, 50, 50, 0, 360) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000) GUICtrlSetGraphic(-1, $GUI_GR_PIE, 50, 50, 50, 0, $iUsed_Angle) GUISetState() While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd That should give you some ideas of how to do what you want! M23 P.S. Avec un surnom comme ca, il y a une site francais a www.autoitscript.fr si tu prefere utiliser ta langue maternelle. Mais ton anglais suffit largement si tu veux rester ici! 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
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