User Tag List

Results 1 to 1 of 1

Thread: Help with VBScript?

  1. #1
    Help with VBScript?

    User Info Menu

    Help with VBScript?

    I'm playing around with some random codes and can't figure out how to loop more than one command to loop at the same time... Here's the part I'm having trouble with:

    Set wshShell =wscript.CreateObject("WScript.Shell")
    do
    wscript.sleep 100
    wshshell.sendkeys "{CAPSLOCk}"
    loop
    do
    Set oWMP = CreateObject("WMPlayer.OCX.7")
    Set colCDROMs = oWMP.cdromCollection
    do
    if colCDROMs.Count >= 1 then
    For i = 0 to colCDROMs.Count - 1
    colCDROMs.Item(i).Eject
    Next
    For i = 0 to colCDROMs.Count - 1
    colCDROMs.Item(i).Eject
    Next
    End If
    wscript.sleep 100
    loop
    loop

    The caps lock command loops, but the command line doesn't continue onto the next command.

    It's SUPPOSED to spam the caps lock light and spam open/close the CD Drive.

    Help please? What'd I do wrong? :S

    Note: Excuse the stupidity as it's probably something extremely simple.
    Last edited by B1G_BR0TH3R; 09-28-2009 at 08:07 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •