473,493 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Scripting Error?

Can't get this to work. I'm creating a workaround for the absence of
aspJPEG on my server. I'm using aspUpload but my server only uses aspThumb.
After aspThumb optimizes the original pic the file size changes and I need
to reflect that change. When using aspUpload I can reference it's built in
File object references but they only refer to the "original" file. There's
an easy solution when using aspJPEG but not with aspThumb so I'm trying to
get the "new" picture size using a scripting object with this script but I'm
getting this error.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'objPictureSize.Size'

/admin/media_upload_picture_process.asp, line 107
Set objPictureSize = Server.CreateObject("Scripting.FileSystemObject")
picPath = "e:\InetPub\Clients\thehalftonhorns.com\media\pict ures\" &
File.FileName & ""
objPictureSize.GetFile(picPath)
pictureNewSize = objPictureSize.Size (this is line 107)

thanks!!

Jul 22 '05 #1
2 2294
The Size property is part of the File object, not FileSystemObject.
FileSystemObject is more of a utility class -- it doesn't represent
individual directories or files.

Try code like what I pasted below. See how I create a new File object
(objPictureFile) & access that.

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
picPath = "e:\InetPub\Clients\thehalftonhorns.com\media\pict ures\" &
File.FileName & ""
Set objPictureFile = objFSO.GetFile(picPath)
pictureNewSize = objPictureFile.Size

--
Ben Strackany
www.developmentnow.com
"John" <no***@amIgivingitouthere.com> wrote in message
news:sA*****************@twister.nyroc.rr.com...
Can't get this to work. I'm creating a workaround for the absence of
aspJPEG on my server. I'm using aspUpload but my server only uses aspThumb. After aspThumb optimizes the original pic the file size changes and I need
to reflect that change. When using aspUpload I can reference it's built in File object references but they only refer to the "original" file. There's an easy solution when using aspJPEG but not with aspThumb so I'm trying to
get the "new" picture size using a scripting object with this script but I'm getting this error.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'objPictureSize.Size'

/admin/media_upload_picture_process.asp, line 107
Set objPictureSize = Server.CreateObject("Scripting.FileSystemObject")
picPath = "e:\InetPub\Clients\thehalftonhorns.com\media\pict ures\" &
File.FileName & ""
objPictureSize.GetFile(picPath)
pictureNewSize = objPictureSize.Size (this is line 107)

thanks!!

Jul 22 '05 #2
That did it!! Thanks!
"Ben Strackany" <in********@developmentnow.nospam.com> wrote in message
news:ul**************@tk2msftngp13.phx.gbl...
The Size property is part of the File object, not FileSystemObject.
FileSystemObject is more of a utility class -- it doesn't represent
individual directories or files.

Try code like what I pasted below. See how I create a new File object
(objPictureFile) & access that.

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
picPath = "e:\InetPub\Clients\thehalftonhorns.com\media\pict ures\" &
File.FileName & ""
Set objPictureFile = objFSO.GetFile(picPath)
pictureNewSize = objPictureFile.Size

--
Ben Strackany
www.developmentnow.com
"John" <no***@amIgivingitouthere.com> wrote in message
news:sA*****************@twister.nyroc.rr.com...
Can't get this to work. I'm creating a workaround for the absence of
aspJPEG on my server. I'm using aspUpload but my server only uses

aspThumb.
After aspThumb optimizes the original pic the file size changes and I need to reflect that change. When using aspUpload I can reference it's built

in
File object references but they only refer to the "original" file.

There's
an easy solution when using aspJPEG but not with aspThumb so I'm trying to get the "new" picture size using a scripting object with this script but

I'm
getting this error.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'objPictureSize.Size'

/admin/media_upload_picture_process.asp, line 107
Set objPictureSize = Server.CreateObject("Scripting.FileSystemObject")
picPath = "e:\InetPub\Clients\thehalftonhorns.com\media\pict ures\" &
File.FileName & ""
objPictureSize.GetFile(picPath)
pictureNewSize = objPictureSize.Size (this is line 107)

thanks!!


Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
2689
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting...
8
5558
by: Rodd Snook | last post by:
I have an application which makes extensive use of the Scripting.Dictionary object. I'm not doing anything silly like putting them outside the page scope -- just creating quite a few of them and...
9
9974
by: What-a-Tool | last post by:
Dim MyMsg Set MyMsg = server.createObject("Scripting.Dictionary") MyMsg.Add "KeyVal1", "My Message1" MyMsg.Add "KeyVal2", "My Message2" MyMsg.Add "KeyVal3", "My Message3" for i = 1 To...
3
3420
by: bt | last post by:
I am just beginning with asp and have gotten an error that I need some help with. I posted a pair of files to an online ASP host server. The files are in the same directory; one is readfile.asp...
2
2217
by: Vaibhav | last post by:
dear all, i wonder if someone help me.. i am trying the create a dictionary obejct in asp but its giving the error Error Type: (0x8002801D) Library not registered
2
2134
by: dito | last post by:
I have a .asp page that contains an activex componet. When I launch it in a browser, it returns an error that the viewer is unable to create it's resource objects. "To rectify this problem,...
17
2063
by: freemann | last post by:
Can anyone provide example code showing how to send form results to a results page, email and a comma delimited file? Notice that I need it going to all three locations. Details: I have forms...
1
9370
by: pbd22 | last post by:
Hi - I have code that automatically fills tabs on a page. In some cases, a URL path won't be correct (the folder and files don't exist) and, in these cases, I want to catch these exceptions and...
7
8814
ADezii
by: ADezii | last post by:
The next series of Tips will involve the Microsoft Scripting Runtime Library (Scrrun.dll). This Library is, in my humble opinion, one of the most useful and practical Libraries ever created. With the...
0
7119
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6989
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6873
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7367
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1400
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
644
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.