eri Posted April 20, 2010 Posted April 20, 2010 How to Set Value size 0 ~ 500 Kb in this script.. ceksize() Func ceksize() $location = @ScriptDir &"\sample.exe" $size = FileGetSize($location) If $size = (0~500 kb) Then ; File Size 0 kb ~ 500 kb MsgBox(0,"Info","Ok This Application Compatible With Your Application") Else MsgBox(0,"Info","This Application Not Compatible With Your Application") EndIf EndFunc if file size 0~500 kb OK.. if file size bigger than 500 kb Exit..
Yashied Posted April 20, 2010 Posted April 20, 2010 If $size <= 500 * 1024 Then My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Makaule Posted April 21, 2010 Posted April 21, 2010 Next time i would advice you to use ConsoleWrite if you not sure what variable it gives and why you dont get what you want. In this situation you could use ConsoleWrite("Size = " & $size & @CRLF), so you could notice, that result is in Bytes and if you want to compare with [KB], you just need to do as it was replyed by other person.
eri Posted April 21, 2010 Author Posted April 21, 2010 If $size <= 500 * 1024 Then Thank`s Yashied.. 500 * 1024 <=== what means 1024 ? why not 1000..?
eri Posted April 21, 2010 Author Posted April 21, 2010 Next time i would advice you to use ConsoleWrite if you not sure what variable it gives and why you dont get what you want. In this situation you could use ConsoleWrite("Size = " & $size & @CRLF), so you could notice, that result is in Bytes and if you want to compare with [KB], you just need to do as it was replyed by other person. Thannk`s Makaule.. I will try later..
MrMitchell Posted April 21, 2010 Posted April 21, 2010 Thank`s Yashied.. 500 * 1024 <=== what means 1024 ? why not 1000..? 1Kb = 1024 bytes?
zorphnog Posted April 21, 2010 Posted April 21, 2010 All computer data is stored in binary, therefore any measurement must be a power of 2.210 = 1024 bytes = 1 KB220 = 1048576 bytes = 1 MB...etc...
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