[jawsscripts] Re: Script help in Filesystem object

  • From: "jitender kumar@5142695" <Jeet.Kumar1@xxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 9 Feb 2018 11:06:50 +0000

Thank you doug,, I made an error while typing, you are correct it is 
CreateObject.
but the variant did the trick, please tell me, where I would find this 
information, like what is returned and as what?

Variant, int, string etc.

Thank you.

________________________________
From: jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> on 
behalf of Doug Lee <doug.lee@xxxxxxxxxxxxxxx>
Sent: Friday, February 9, 2018 3:03:32 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Script help in Filesystem object

You typed ObjectCreate, but the function is CreateObject. If you literally 
typed ObjectCreate in your code, you would not get the results you want; but 
you should also get an "Unknown function call" announcement.

I do note that the two values you're after are actually returned as Variant, 
not int. Not sure if this matters, but you might try handling them as strings 
to see if you get anything.

On Fri, Feb 09, 2018 at 07:55:24AM +0000, jitender kumar@5142695 wrote:
Hello friends, the following script should return the size of the selected 
drive but it is getting only 0.
String Function GetDrive_Sizes ()
Var
Int i,
String sReturn, String sDrive, String sDrives,
Object oSystem, Object oDrive, Object oNull
Let oSystem = ObjectCreate("Scripting.FileSystemObject")
Let sDrives = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Let i = 1
While i <= 26
Let sDrive = Substring(sDrives, i, 1)
If oSystem.DriveExists(sDrive) Then
SayString ("drive found") ;debug
SayString (SDrive);to see which drive is found
Let oDrive = oSystem.GetDrive(sDrive)
If oDrive.IsReady Then
SayString ("Drive is ready") ;debug
Let sReturn = sReturn + "\n"+sDrive

Var int size = ODrive.AvailableSpace;it is 0.
;Var int size = ODrive.TotalSize;also 0
SayInteger (Size )
EndIf
;EndIf
Let oDrive = oNull
EndIf
;EndIf
Let i = i + 1
EndWhile
Let oSystem = oNull
Return sReturn
EndFunction

--- Disclaimer ---
The information in this mail is confidential and is intended solely for 
addressee. Access to this mail by anyone else is unauthorized. Copying or 
further distribution beyond the original recipient may be unlawful. Any opinion 
expressed in this mail is that of sender and does not necessarily reflect that 
of State Bank group.
---

__________???

View the list's information and change your settings at
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freelists.org%2Flist%2Fjawsscripts&data%7C01%7CJeet.kumar1%40sbi.co.in%7Ce426ee6b0e244198fdf308d56fa04363%7C3eb9a41da80d4392a9be99001c0eee9c%7C0%7C0%7C636537656478381045&sdata=NTSEzuigsm3IUFvDGga0osLniXq65%2FghJcD4yzpwXXI%3D&reserved=0

--
Doug Lee, Senior Accessibility Programmer
Level Access
mailto:Doug.Lee@xxxxxxxxxxxxxxx  ;
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.LevelAccess.com&data%7C01%7CJeet.kumar1%40sbi.co.in%7Ce426ee6b0e244198fdf308d56fa04363%7C3eb9a41da80d4392a9be99001c0eee9c%7C0%7C0%7C636537656478381045&sdata=il8w7ILUaIXrqWsj3zSJK2un1QuurN5%2FbJk87OVJytE%3D&reserved=0
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________???

View the list's information and change your settings at
https://apac01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freelists.org%2Flist%2Fjawsscripts&data%7C01%7CJeet.kumar1%40sbi.co.in%7Ce426ee6b0e244198fdf308d56fa04363%7C3eb9a41da80d4392a9be99001c0eee9c%7C0%7C0%7C636537656478381045&sdata=NTSEzuigsm3IUFvDGga0osLniXq65%2FghJcD4yzpwXXI%3D&reserved=0


__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: