1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[VB6] Sleep and stop due to time Function

Discussion in 'Code Snippets and Tutorials' started by the_skip, Apr 5, 2007.

  1. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    you want a program to wait until a certain time then stop when the computer's clock reaches a certain time. Well here is how you can do it. You will need 4 textboxes each called

    • txthour
      txtminute

      txthour1
      txtminute1
    The first two are the starting minute and hour and the 3rd and 4th are the stoping hour and minuet. Also two check boxes called chkpm1 and chkpm2. If the chkpm1 or 2 is checked that means the time is pm.
    In the declarations part of your form you will need these varibles as
    • strings
      strtime
      strhour
      strminute
      strpm
      and one boolean caled
      bolpm
    They all need to be public here is the code to split up the time into minute hour and pm.

    Code (Visual Basic):
    1. <div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Public</span> <span style="color: #b1b100;">Function</span> GetTime<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'The_skip made this</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strpm <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strtime = <span style="color: #ff0000;">"hour"</span> & <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">"s"</span> <span style="color: #808080;">'The_skip made this</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strhour = FindString<span style="color: #66cc66;">(</span>strtime, <span style="color: #ff0000;">"hour"</span>, <span style="color: #ff0000;">":"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strminute = FindString<span style="color: #66cc66;">(</span>strtime, <span style="color: #ff0000;">":"</span>, <span style="color: #ff0000;">":"</span><span style="color: #66cc66;">)</span> <span style="color: #808080;">'The_skip made this</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strpm = FindString<span style="color: #66cc66;">(</span>strtime, <span style="color: #ff0000;">":"</span>, <span style="color: #ff0000;">"s"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strpm, <span style="color: #ff0000;">"PM"</span><span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span> <span style="color: #808080;">'The_skip made this</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">    bolpm = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">    <span style="color: #b1b100;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">    bolpm = <span style="color: #b1b100;">False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span></li></ol></div>
    Now here is to chek to "get up" or not.

    That is pretty self explanatory now to see if it is time to startTo have the program stop put this in[If you know some vb6 this should be self explanatory. If you use this give credit to me.sleep

    Code (Visual Basic):
    1. <div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> bolstart <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Boolean</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">bolstart = <span style="color: #b1b100;">False</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> bolstart <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Boolean</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">bolstart = <span style="color: #b1b100;">False</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Do</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Call</span> GetTime</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> chkpm1.<span style="color: #66cc66;">Value</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">    <span style="color: #b1b100;">If</span> bolpm = <span style="color: #b1b100;">True</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> = txthour.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strminute<span style="color: #66cc66;">)</span> >= txtminute.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">                </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">                bolstart = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span> <span style="color: #808080;">'The_skip made thi</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> > txthour.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">           </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            bolstart = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">ElseIf</span> bolpm = <span style="color: #b1b100;">False</span> <span style="color: #b1b100;">Then</span> <span style="color: #808080;">'The_skip ade this</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">ElseIf</span> chkpm1.<span style="color: #66cc66;">Value</span> = <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> bolpm = <span style="color: #b1b100;">False</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> = txthour.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strminute<span style="color: #66cc66;">)</span> >= txtminute.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">                bolstart = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">      </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> > txthour.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            bolstart = <span style="color: #b1b100;">True</span> <span style="color: #808080;">'The_skip mde this</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">ElseIf</span> bolpm = <span style="color: #b1b100;">True</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> bolstart = <span style="color: #b1b100;">False</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'this prevnts looking up of your computer</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'Happens to me alot when a loop is done real quick</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'It skips this if the program is to go on past this</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">SecondsToWait <span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Else</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Loop</span> Until bolstart = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'Whatever to happen after</span></li></ol></div>
    Now here is the code to stop after a certain time is reached
    Code (Visual Basic):
    1. <div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Call</span> GetTime</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> chkpm2.<span style="color: #66cc66;">Value</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">    <span style="color: #b1b100;">If</span> bolpm = <span style="color: #b1b100;">True</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> = txthour1.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strminute<span style="color: #66cc66;">)</span> >= txtminute1.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">                </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">                <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> > txthour1.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">           </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">ElseIf</span> bolpm = <span style="color: #b1b100;">False</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">ElseIf</span> chkpm2.<span style="color: #66cc66;">Value</span> = <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> bolpm = <span style="color: #b1b100;">False</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> = txthour1.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strminute<span style="color: #66cc66;">)</span> >= txtminute1.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">                <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">      <span style="color: #808080;">'The_skip madthis</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">Val</span><span style="color: #66cc66;">(</span>strhour<span style="color: #66cc66;">)</span> > txthour1.<span style="color: #66cc66;">Text</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">            <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span> <span style="color: #808080;">'The_skip mde this</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">ElseIf</span> bolpm = <span style="color: #b1b100;">True</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li></ol></div>
    And there you go. If you do not understand some of this Val() gives you the value of a string. IF you do not understand this then you shouldn't be using this should you. It is better than a timer
    IF you use this give me credit. This is great for abers.
     
  2. NHStephen

    NHStephen Level IV

    Joined:
    Jan 2, 2007
    Messages:
    1,114
    Likes Received:
    9
    great tutorial i made one of those before only thing it didnt shut down my aber
     
  3. the_skip

    the_skip Level IV

    Joined:
    Dec 25, 2006
    Messages:
    2,354
    Likes Received:
    1
    Location:
    Indiana
    This is a little complex. Not to bad but the compares and the bolpm got me because the str had to exact i had pm it should be PM. I hope ricky92 uses it. It will go good with his aber. I also have a few more suggestions for him and the code to do that
     
  4. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Hey, my ABer already has a Timer (but it's not based on system time) and it works. I am implementing the "Shop Tour", a great feature (suggested by unknown2) which allows you to AB in multiple shops!!!