If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
On 2/24/2005 4:19 AM, Gary S. Terhune wrote:
You could use a pair of BAT files to remove and then restore the R/O attribute for that DAT file. More complicated BAT file would simply toggle the attribute. I don't know BAT file commands as well as I do scripting, so I'd use script. I don't know the location of that particular DAT file, so I'll use a bogus path. You'll have to replace "C:\Program Files\Test\Test.dat" with the correct path, making sure to retain the double-quotation marks. ++++++++++++++++++ ' Begin Copy here Option Explicit Dim f, x With CreateObject("Scripting.FileSystemObject") Set f = .GetFile("C:\Program Files\Test\test.dat") x = f.Attributes Do Until x = 0 Or x = 1 x = x - 2 Loop If x = 1 Then f.Attributes = f.Attributes - 1 Else: f.Attributes = f.Attributes + 1 End If End With 'End copy here +++++++++++++++++++++ Copy *between* the ++++++ lines and paste into a new text file, then name it whatever you want with VBS extension. Strangely enough, there is no straight manner in which to determine if a number is even or odd in VB Scripting. There is in VBA. Sure there is, just use the MOD operator. result = number Mod 2 If result is 0 then the number is even. If result is 1 then the number is odd. If the Firefox cache is anything like IE's cache, you don't want to directly delete the cache files (screws up the DAT file.) But if there is a command line that will do the job, that could be added to the script, plus some changes in the above logic, to do it all in one click from the Quick Launch toolbar. Hope this helps, CEF |
#12
|
|||
|
|||
"Charles E Finkenbiner" wrote in message
... Copy *between* the ++++++ lines and paste into a new text file, then name it whatever you want with VBS extension. Strangely enough, there is no straight manner in which to determine if a number is even or odd in VB Scripting. There is in VBA. Sure there is, just use the MOD operator. result = number Mod 2 If result is 0 then the number is even. If result is 1 then the number is odd. Thanks! I knew there had to be a simpler way, but couldn't find it. VB Scripting is the poor cousin of MS's programming families, with truly sparse (and/or dispersed) documentation. But even the MOD solution isn't as straightforward as VBA's IsEven or IsOdd properties. -- Gary S. Terhune MS MVP Shell/User http://www.grystmill.com/articles/cleanboot.htm http://www.grystmill.com/articles/security.htm |
#13
|
|||
|
|||
On 2/24/2005 7:15 AM, Gary S. Terhune wrote:
"Charles E Finkenbiner" wrote in message ... Copy *between* the ++++++ lines and paste into a new text file, then name it whatever you want with VBS extension. Strangely enough, there is no straight manner in which to determine if a number is even or odd in VB Scripting. There is in VBA. Sure there is, just use the MOD operator. result = number Mod 2 If result is 0 then the number is even. If result is 1 then the number is odd. Thanks! I knew there had to be a simpler way, but couldn't find it. VB Scripting is the poor cousin of MS's programming families, with truly sparse (and/or dispersed) documentation. But even the MOD solution isn't as straightforward as VBA's IsEven or IsOdd properties. No problem, create your own IsEven() and IsOdd() functions and use them just as you would in VBA. Example: Option Explicit Dim x, y x = 16 MsgBox(IsEven(x)) ' Displays True If(IsEven(x)) Then MsgBox(x & " is even") ' Displays "16 is even" End If y = 23 MsgBox(IsOdd(y)) ' Displays True If(IsOdd(y)) Then MsgBox(y & " is odd") ' Display "23 is odd" End If Function IsEven(n) If((n Mod 2) = 0) Then IsEven = True Exit Function End If IsEven = False End Function Function IsOdd(n) If((n Mod 2) = 1) Then IsOdd = True Exit Function End If IsOdd = False End Function But, I do agree that in VBA these functions are written for you. In VBScript you have to 'roll your own' functions. Hope this helps, CEF |
#14
|
|||
|
|||
Thanks Gary and et. al. -- I changed my autocomplete settings to manual
(unchecked) and cleared forms based on your feedback in my 98SE os although Mozilla Firefox is my primary browser. I still want to keep all Windows components fully updated and secure based upon your feedback, Gary. : "Gary S. Terhune" wrote in message ... : Weirdly enough, you're right about the Address bar list. That list is : actually a function of History in IE, and all the Autocomplete option of : "Save Web Addresses" does is control whether or not it autocompletes, : either using the drop-down list or "inline autocomplete" if "Use Inline : Autocomplete" is enabled in Advanced settings. : : That particular Autocomplete function is one of the more disjointed : settings in IE. Typical result of idiot-proofing run amok. : : -- : Gary S. Terhune : MS MVP Shell/User : http://www.grystmill.com/articles/cleanboot.htm : http://www.grystmill.com/articles/security.htm : : "... et al." wrote in message : ... : Gary S. Terhune wrote: : : That's just not the case. Any forms entries, including search engine : entries, are only saved by Autocomplete functions in IE/Explorer. : : Test it yourself. Go to Yahoo! or Google, with all Autocomplete : functions disabled, do a search, close all IE windows, go back and : check : it out. : : Nowadays i have both Firefox's 'Saved Form Information' and IE's : AutoComplete disabled and my cookie handling set to disabled or to a : per-session basis in both programs. : : : Cookies do a lot of things, but that isn't usually one of them. : : I am certain, err.., i *was* certain that once upon a time i disabled : some site from remembering my past searches by purging my cookies. : Maybe : i plain misremember or perhaps i purged my saved forminfo at the same : time without realising what did what... : : Keeping cookies disabled and testing with the 'Saved Form Information' : option in Firefox, and doing a few searches at Google quickly shows : that : you are right and i was wrong. : In IE then, that info can then be enabled/disabled and saved history : cleared under Internet Options: Content Tab : AutoComplete... button. : : I'm sorry for forwarding my confusion regarding cookies on the matter. : : -- : Please followup in newsgroup. : E-mail address is invalid due to spam-control. : |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sporadic loss of Internet connectivity | Jay | Networking | 2 | January 21st 05 11:05 PM |
error loading explorer.exe. SHLWAPI.dll | Gary | General | 4 | October 20th 04 04:08 AM |
lost internet connection through NIC, now dials modem | Stephan | General | 4 | July 22nd 04 04:30 AM |
lost internet connection through NIC, now dials modem | Stephan | Internet | 4 | July 22nd 04 04:30 AM |
Internet Explorer problem | Francis Marsden | General | 8 | June 15th 04 07:59 PM |