Scar simple refresher :P

Discussion in 'Code Snippets and Tutorials' started by zippy, Mar 28, 2007.

  1. zippy

    zippy Level IV

    Joined:
    Nov 9, 2006
    Messages:
    879
    Likes Received:
    0
    Because this is not worth to be in stores, and its very easy to do, use this code as a refresher people that dont know scar :p

    Code ( (Unknown Language)):
    1. <div class="scar" 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: #000000; font-weight: bold;">program</span> Refresher;</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: #000000; font-weight: bold;">begin</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: #000000; font-weight: bold;">repeat</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">KeyDown<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">116</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;">wait<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">100</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;">KeyUp<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">116</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;">wait<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">2000</span>+<span style="color: #000066;">random</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1100</span><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: #000000; font-weight: bold;">until</span><span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">false</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: #000000; font-weight: bold;">end</span>.</li></ol></div>
    took me 20 seconds to code it >.>

    just put the window you want to refresh, and press ctrl + alt + r and the program will refresh :p
     
  2. looneytoon

    looneytoon Level III

    Joined:
    Jan 16, 2007
    Messages:
    568
    Likes Received:
    0
    cool. Im sure this will help alot of people beginning scar.
     
  3. zippy

    zippy Level IV

    Joined:
    Nov 9, 2006
    Messages:
    879
    Likes Received:
    0
    yup, analizing it is easy to understand what every key do >.>
     
  4. zav75

    zav75 Level I

    Joined:
    Feb 28, 2007
    Messages:
    76
    Likes Received:
    6
    Location:
    Canada, Province of Québec
    Don't use this code, else you'll get iced in less than 20 minutes.

    If you're making a true refresher use random refresh time as

    Code (Text):
    1.  
    2. time :=  2000 + random(1000) ;
    3.  
     
  5. looneytoon

    looneytoon Level III

    Joined:
    Jan 16, 2007
    Messages:
    568
    Likes Received:
    0
    he did have random refresh time....
     
  6. zippy

    zippy Level IV

    Joined:
    Nov 9, 2006
    Messages:
    879
    Likes Received:
    0
    my code says:


    wait(2000+random(1100));

    ...
     
  7. zav75

    zav75 Level I

    Joined:
    Feb 28, 2007
    Messages:
    76
    Likes Received:
    6
    Location:
    Canada, Province of Québec
    Oh my fault,
    anyways, always put random time everywhere :p
     
  8. gawjus1234

    gawjus1234 Level III

    Joined:
    May 22, 2007
    Messages:
    518
    Likes Received:
    3
    Location:
    Las Vegas
    i kind of want to learn scar. o well. until then. nice code. short and organised. i like it.
     
  9. zergses

    zergses Level II

    Joined:
    Jun 23, 2007
    Messages:
    156
    Likes Received:
    0
    Location:
    Sydney, Australia
    if you use firefox download the addon called reloadevery. you can reload multiple tabs and set the time of refresh. its an awesome auto refresher :)