welby 4 Posted February 16, 2017 Report Share Posted February 16, 2017 Hi, I think I have my logic correct here: I am looking at a list of images and performing a lookup of each file in size and then doing a comparison for files sizes and if over a set size to alert "Big" or "OK" Am i missing something? I am using File/Folder plugin by botguru.net ui button("Choose Image Directory") { add list to list(%imageslist,$get files($plugin function("File Management.dll", "$folder browser dialog"),"Yes"),"Don\'t Delete","Global") } with each(%imageslist,#file) { set(#result,$plugin function("FileFolderCommands.dll", "$get file info", #file, "Total Size"),"Global") if($comparison(#result,">= Greater than or equal to",5000000)) { then { alert("big") } else { alert("OK") } } } Quote Link to post Share on other sites
welby 4 Posted February 16, 2017 Author Report Share Posted February 16, 2017 (edited) OK, I have it working now: - Just save and re-opened in Ubot Studio - how odd! ui button("Choose Image Directory") { add list to list(%imageslist,$get files($plugin function("File Management.dll", "$folder browser dialog"),"Yes"),"Don\'t Delete","Global") } with each(%imageslist,#file) { set(#result,$plugin function("FileFolderCommands.dll", "$get file info", #file, "Total Size"),"Global") if($comparison(#result,">= Greater than or equal to",5000000)) { then { alert("File is bigger than 5mb allowed by twitter") } else { alert("OK") } } } Edited February 16, 2017 by welby Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.