473,791 Members | 3,059 Online
Bytes | Software Development & Data Engineering Community
+ 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_pi cture_process.a sp, line 107
Set objPictureSize = Server.CreateOb ject("Scripting .FileSystemObje ct")
picPath = "e:\InetPub\Cli ents\thehalfton horns.com\media \pictures\" &
File.FileName & ""
objPictureSize. GetFile(picPath )
pictureNewSize = objPictureSize. Size (this is line 107)

thanks!!

Jul 22 '05 #1
2 2317
The Size property is part of the File object, not FileSystemObjec t.
FileSystemObjec t 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.CreateOb ject("Scripting .FileSystemObje ct")
picPath = "e:\InetPub\Cli ents\thehalfton horns.com\media \pictures\" &
File.FileName & ""
Set objPictureFile = objFSO.GetFile( picPath)
pictureNewSize = objPictureFile. Size

--
Ben Strackany
www.developmentnow.com
"John" <no***@amIgivin gitouthere.com> wrote in message
news:sA******** *********@twist er.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_pi cture_process.a sp, line 107
Set objPictureSize = Server.CreateOb ject("Scripting .FileSystemObje ct")
picPath = "e:\InetPub\Cli ents\thehalfton horns.com\media \pictures\" &
File.FileName & ""
objPictureSize. GetFile(picPath )
pictureNewSize = objPictureSize. Size (this is line 107)

thanks!!

Jul 22 '05 #2
That did it!! Thanks!
"Ben Strackany" <in********@dev elopmentnow.nos pam.com> wrote in message
news:ul******** ******@tk2msftn gp13.phx.gbl...
The Size property is part of the File object, not FileSystemObjec t.
FileSystemObjec t 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.CreateOb ject("Scripting .FileSystemObje ct")
picPath = "e:\InetPub\Cli ents\thehalfton horns.com\media \pictures\" &
File.FileName & ""
Set objPictureFile = objFSO.GetFile( picPath)
pictureNewSize = objPictureFile. Size

--
Ben Strackany
www.developmentnow.com
"John" <no***@amIgivin gitouthere.com> wrote in message
news:sA******** *********@twist er.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_pi cture_process.a sp, line 107
Set objPictureSize = Server.CreateOb ject("Scripting .FileSystemObje ct")
picPath = "e:\InetPub\Cli ents\thehalfton horns.com\media \pictures\" &
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
2742
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 language was available. However, I want to code this application in Python, and I have not yet heard of an implementation of another scripting language into Python. An example of what I mean is this (an implementation of Lua into Ruby -- which I'd...
8
5596
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 stuffing quite a lot of data (from and MS SQL database) into them. On Windows 2000 server, everything is fine. If the data structures get really big it slows down, but for normal operation it's no problem. Recently our hosting provider moved to...
9
9994
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 MyMsg.Count Response.Write(MyMsg.Item(i)) next
3
3448
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 which should open the other which is a simple text file - newText.txt . Here is readfile.asp : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html>
2
2232
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
2146
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, please install IE4.0 or install DCOM for W95 and the latest MS Scripting Engine. These files are available at MS's website" I am running IE6.0. Where is the scripting engine on MS's site? Will this have to be installed on every client wishing to...
17
2088
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 created and working. The first form the user fills out and submits. The form properties are set to Send to other: "Custom ISAPI, NSAPI, CGI, OR ASP SCRIPTING. The method is "POST" and the action is "secondpage.asp". I had to go this route because...
1
9425
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 move the logic to the next instance in the loop (again, testing if the URL path exists). I have a check_path function for these cases with the following code: var oFSO = new ActiveXObject("Scripting.FileSystemObject");
7
8855
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 Scripting Runtime Library, you can retrieve information related to Drives, Folders, Files, and Text Files and set/retrieve certain Attributes of Drives, Folders, Files, and Text Files. Through Methods exposed by this Library, you can also manipulate...
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9987
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7531
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.