Jump to content

Computer Related Tips And Tricks


Sip

Recommended Posts

Well, the other day I got tired of having to enter my username and password into my yahoo login page in internet explorer. That page is such that somehow the IE automatic password thing doesn't work. So after doing a bit of searching and a bit of trial and error, I decided to write a VBS script to automate it. I save the file as a .VBS file, make a shortcut to it in windows XP, and assign a hot-key sequence to that shortcut. Now, whenever I get to the yahoo screen asking me to enter my username and password, I just hit the shortcut key and it's DONE :)

 

I figured I'd share the content of the VBS file in case someone else finds it useful too:

 

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.AppActivate "SBC"
WScript.Sleep(500)
WshShell.SendKeys "{tab}+{tab}your_username"
WshShell.SendKeys "{tab}your_password{tab} {enter}"

 

The first line simply creates a shell object to get this started

 

Then we activate the application with the "SBC ..." in the title. My IE browser has that title when yahoo is asking for a password.

 

Then I wait for 1/2 a second because I hold down control-alt to hit the hotkey. If I don't wait in the script, the control and alt will still be pressed when this script sends the keys to the browser app and it won't work.

 

The tab and shift-tab (note + is shift) sequence was needed for some reason to put the browser in user input mode.

 

The rest should be self explanatory. The space enter after the password selects a checkbox to remember my ID on the computer and then ok's the login. Click here for the reference on the sendkeys command on the MSDN website. Needless to say I have been VERY happy with the outcome! I now log out of yahoo on purpose just to log back in like this!

Link to comment
Share on other sites

  • 1 month later...

Hi everyone,

 

Guys is it secure to delete everything in a Temp folder? I'm having trouble with Quick Time on my Windows XP. Looks like they are not compatible. And the Windows Error message that come up every time I open the Quick Time says that there is something wrong with a file in Temp folder. I want to delete everything in Temp because I'm fricked out! I can't open my Power Point graphs without QT's some decompressor feature that our "advanced" professor used in his slides.

 

Help!

Edited by ArmenSarg
Link to comment
Share on other sites

Yah you can safely delete anything in temp. Also, you may want to run a full disk check from "My computer" on your desktop ... righ click my computer, then "manage", then in "Disk Mangement", right click on each disk (like C:, D:, ...), "properties", and under the "tools" tab you can do "check now". Some disks will ask you to reboot in order to check.

 

The other method is to type "chkdsk /F" in the command prompt (start->run->cmd). Note that /F will fix potential errors.

 

If you are worried about the contents of temp, copy it to another folder and delete in a few days. But there should be nothing there that is needed unless you put it there yourself.

 

Also note that there are several temp folders. The standard ones are:

 

C:\windows\temp

C:\Documents and Settings\user\Local Settings\Temp

 

where user can be your login name, administrator, or any other login name you use on the PC.

 

I have not had any problem with quicktime under windows XP so if you uninstall and reinstall, it should work fine.

Link to comment
Share on other sites

OK, now I get it. It's compatible with everything except Windows XP :) When I right click it there is a window that deals specifically with compatibility and there is no Window XP there. You can select Windows 95, 2000, Me etc. but no XP.
Link to comment
Share on other sites

  • 1 year later...

i was thinking of making a function that generates unique order id, aside from the autonumber that the dbs usually create, so i wrote this little code in asp.

Private Function Rand(Low,High)
 Randomize
 Rand=Int((High - Low + 1) * Rnd) + Low
End Function



Private Function GetUniqueIDWithTimeAndIP(Time_,IP_1,IP_2)
    on error resume next
    Dim IP,ID,Array_,Array2_(),i,tempstr,blnSwitch
    if IP_1=IP_2 and len(IP_1)>0 then
 IP=IP_1
    elseif len(IP_1)>0 then
 IP=IP_1
    elseif len(IP_2)>0 then
 IP=IP_2
    else
 IP=Rand(100000,1000000)
    end if
    IP=Replace(IP,".","")
    if not IsNumeric(trim(IP)) then IP=Rand(100000,1000000)

    ID=Time_ & IP
    ID=replace(ID,"/","")
    ID=replace(ID,"\","")
    ID=replace(ID,":","")
    ID=replace(ucase(ID),ucase("AM"),"")
    ID=replace(ucase(ID),ucase("PM"),"")
    ID=replace(ID," ","")
    ID=replace(ID,".","")
    if cint(len(ID)/2)<>len(ID)/2 then ID=ID & Rand(1,9)
    
    if IsNumeric(ID) then
 for i=1 to len(ID) step 2
     tempstr=tempstr & mid(ID,i,2) & "."
 next
 if right(tempstr,1)="." then tempstr=left(tempstr,len(tempstr)-1)
 if left(tempstr,1)="." then tempstr=right(tempstr,len(tempstr)-1)
 Array_=split(tempstr,".")
 If IsArray(Array_) then
     redim Array2_(ubound(Array_))
     blnSwitch=false
     for i =lbound(Array_) to ubound(Array_) step 1
   if blnSwitch then
       Array2_(i-1)="-" & Array_(i)
   end if
   blnSwitch=not blnSwitch
     next
     blnSwitch=true
     for i =lbound(Array_) to ubound(Array_) step 1
   if blnSwitch then
       Array2_(i+1)=Array_(i)
   end if
   blnSwitch=not blnSwitch
     next
 end if
 ID="ORD" & Join(Array2_,"")
 GetUniqueIDWithTimeAndIP=ID
    else
 GetUniqueIDWithTimeAndIP=""
    end if
End function

 

you call the funciton like

GetUniqueIDWithTimeAndIP(now(),Request.ServerVariables("REMOTE_ADDR"),Request.ServerVariables("REMOTE_HOST"))

anyway if you guys know a better method, share it ;)

 

the output looks something like this

ORD-6271-5100-7422-3319-3817

Edited by hytga
Link to comment
Share on other sites

  • 10 months later...
you've got to be on a WINDOWS machine for it to work... :P

 

ok, seriously... what doesn't work? the command? or the 'system up time' is not there?

 

:lol:

 

'systeminfo' is not recognized as an internal or external command, operable program, or batch file

 

I'm running XP Home SP2 (on this machine ;) )

Edited by vava
Link to comment
Share on other sites

All those links say IE is "buggy" but don't say what those buggs are. Then they complain that most websites are written for IE since most people use IE and those sites don't look right on their browser. Then they complain that their websites don't look right on IE because they are too lazy to write a couple of different versions for their favorite brower and IE.

 

So I ask again, what's wrong with IE? I use it all the time and I haven't noticed any "bugs" ... and the speed is just fine.

Edited by Sip
Link to comment
Share on other sites

I think most "bugs" people complain about in IE are development and website rendering "problems" (differences from specs?) ... from the user perspective, IE is as solid as any other piece of software that I have used. The "bugs" (all software have bugs) probably get exploited a lot more and are more easily found since so many people use IE ... but I don't think that necessarily indicates IE is not a good browser. Plus people just like to complain about Microsoft in general even though in the last few years they have produced some really high quality stuff.

 

I have firefox and opera and might use them on occasion to try my own website or browse a bit (they might let you save some things pics/videos more easily than IE for example) but since all websites have to be IE compliant anyway (otherwise they are "broken"), I just stick to IE :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...