Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 89

Thread: "Hello World"

  1. #26
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    SCAR Code:
    program HelloWorld;
    var
      WeirdString:String;
      i:Integer;

    begin
      WeirdString:='Ifmmp!Xpsme'
      for i:= 1 to Length(WeirdString) do
        WeirdString[i] := Chr(Ord(WeirdString[i]) - 1);
      Writeln(WeirdString);
    end.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  2. #27
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program HelloWorld;

    var
      i, HelloWorldWiki, x, y: integer;
      Hello: array [0..14] of String;

    procedure GetPage;
    begin
      OpenWebPage('http://www.google.com');
    end;

    procedure LoadKeys;
    begin
       HelloWorldWiki := DTMFromString('78DA633CC7C0C050C2C80002101204CEC0F9F' +
           'F8180F131909187A9E63F129F7103767350D43411614E3A902825' +
           'A0C61EC82A20640E905548404D1690554140CD2722DCDC49847B4' +
           'E01896C026A7819089BD30F6415E35703004B2E277F');

      Hello[0]:='';
      Hello[1]:='H';
      Hello[2]:='e';
      Hello[3]:='l';
      Hello[4]:='l';
      Hello[5]:='o';
      Hello[6]:=' ';
      Hello[7]:='W';
      Hello[8]:='a';
      Hello[9]:='l';
      Hello[10]:='o';
      Hello[11]:='r';
      Hello[12]:='l';
      Hello[13]:='d';
      Hello[14]:='!';
    end;

    procedure Google;
    begin
      Wait(2000);
      if (FindDTM(HelloWorldWiki, x, y, 0, 0, 950, 600)) then
      begin
        WriteLn('We googled....')
        Wait(1000);
        ClickMouse(x, y, True);
        WriteLn('Where at the page that give you a link to a lot of knowlenge..')
        WriteLn('Where at a page that goes about ''Hello World'' world. =]');
        WriteLn('the topic you came from is learing you that to. My way:');
        begin
           WriteLn('Hello World');
        end;
      end else
      begin
        WriteLn('Did not found google... doent matter, there noobs they cant google either..');
        WriteLn('Hello World');
      end;
      FreeDTM(HelloWorldWiki);
    end;

    procedure Write;
    begin
      for i:= 1 to 14 do
      begin
        SendKeys(Hello[i]);
        Wait(200);
        If i = 8 or 9 then
        begin
          SendKeysVB('{BKSP}', True);
          SendKeysVB('{BKSP}', True);
        end;
      end;
      SendKeys(+chr(13));
    end;

    {  Main Loop }
    begin
      Getpage;
      Wait(3000);
      CleardeBug;
      LoadKeys;
      Write;
      Google;
    end.

    i was learing arrays...
    my real one:
    SCAR Code:
    program HelloWorld;
    begin
      WriteLn('Hello World');
    end.

    edit: @spky, thx. ive allways done that

  3. #28
    Join Date
    Feb 2006
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    rikjess, don't put semi-colons after begins.

  4. #29
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Haha, I like Boreases. I am too st00pid to make one diff, everyone has t00ken my ideas :S I am sucha nub c@k3


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  5. #30
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    5 RoflCakes and you're dead.

    SCAR Code:
    program HellWorld;
    var
     EatenRoflCake, TimesStrokedYourFace : Integer;

    Function YourFaceIsUgly : Boolean;
    begin
     if EatenRoflCake >= 5 then
      Result := True
     else
      Result := False;
    end;

    Procedure StrokeYourBeautifulFace;
    begin
     TimesStrokedYourFace := TimesStrokedYourFace +1;
     Writeln('Stroking Your Face. Times Stroked: '+IntToStr(TimesStrokedYourFace))
    end;

    Function BloodEverywhere : Boolean;
    begin
     case random(2) of
       0: begin
           Result := True;
           Writeln('Yay I killed myself');
          end;
       1: begin
           Result := False;
           Writeln('I fail at even killing myself.');
          end;
     end;
    end;

    Function YouDoItProperly : Boolean;
    begin
     if BloodEverywhere then
      begin
       Result := True;
       Writeln('Omg im dead.')
      end
    else
     begin
      Writeln('Trying To kill myself again.')
      Writeln('Need more food for energy to kill myself.')
     end
    end;

    Procedure Death;
    begin
     Writeln('Hello World.');
     ClearReport;
     AddToReport('Hello World.');
     Writeln('Or should I say bye bye world?');
     TerminateScript;
    end;

    Procedure CutWristsWideOpen;
    begin
     if YouDoItProperly then
    Death;
    end;

    Procedure SlashWrists;
    begin
     Writeln('Im so ugly :( Time to die.');
     wait(10);
     CutWristsWideOpen;
    end;

    Procedure EatSomeCake;
    begin
     EatenRoflCake := EatenRoflCake +1;
     Writeln('Eating a roflcake: Growing fat and ugly.');
     wait(50);
    end;

    Procedure MainLoop;
    begin
     EatSomeCake
      if YourFaceIsUgly = True then
       SlashWrists
      else
     StrokeYourBeautifulFace
    end;

    begin
    ClearDebug;
     repeat
      MainLoop;
     until False;
    end.

  6. #31
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    1,395
    Mentioned
    30 Post(s)
    Quoted
    107 Post(s)

    Default

    Nice topic

    Here you go:

    Code:
    program HelloWorld;
    
    procedure HelloWorld(var HW: string);
    begin
      HW:= 'Hello World';
    end;
    
    var
      tehHelloWorld: string;
    
    begin
      ClearDebug;
      HelloWorld(tehHelloWorld);
      WriteLn(tehHelloWorld);
    end.

  7. #32
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    O come on lol. You guys are all doing the same thing!

    PHP Code:
    program New;

    procedure Write(Textstring);
    begin
      Writeln
    (Text);
    end;

    procedure Run(procprocedure(sstring); Textstring);
    begin
      proc
    (Text);
    end;

    begin
      ClearDebug
    ;
      
    Run(@Write'Hello World!');
    end
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  8. #33
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I love Boreas's. Its like the matrix =o

  9. #34
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    var
      i: integer;
    begin
      if (i = 2) xor (i = 1)then
        Writeln('HelloWorld');
    end.

  10. #35
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    This could grow into a considerable collection. Hello World hasnt left my mind this day.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  11. #36
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    [offtopic] Spork, Yours made me lol when i was looking it through, heres a proggy
    PHP Code:
    Eating a roflcakeGrowing fat and ugly.
    Stroking Your FaceTimes Stroked1
    Eating a roflcake
    Growing fat and ugly.
    Stroking Your FaceTimes Stroked2
    Eating a roflcake
    Growing fat and ugly.
    Stroking Your FaceTimes Stroked3
    Eating a roflcake
    Growing fat and ugly.
    Stroking Your FaceTimes Stroked4
    Eating a roflcake
    Growing fat and ugly.
    Im so ugly :( Time to die.
    I fail at even killing myself.
    Trying To kill myself again.
    Need more food for energy to kill myself.
    Eating a roflcakeGrowing fat and ugly.
    Im so ugly :( Time to die.
    I fail at even killing myself.
    Trying To kill myself again.
    Need more food for energy to kill myself.
    Eating a roflcakeGrowing fat and ugly.
    Im so ugly :( Time to die.
    Yay I killed myself
    Omg im dead
    .
    Hello World.
    Or 
    should I say bye bye world?
    Successfully executed 
    [/offtopic]

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  12. #37
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, yeah I was in a random mood.

  13. #38
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Compared with some I have seen so far mine isn't so great...

    SCAR Code:
    program HelloWorld;
    const
      Doit = 1; //pick between 1 or 2 ;
      timewait =1000; //in milliseconds

    procedure Writethis(text:string;waittime:integer);
    begin
      writeln(text)
      wait(waittime)
    end;

    procedure Typeitout(a,b,c,d,e,f,g,h,i,j,k:string; timespace:integer);
    begin
      WriteLn(a)
      wait(timespace+ Random(100))
      WriteLn(b)
      wait(timespace+ Random(100))
      WriteLn(c)
      wait(timespace+ Random(100))
      WriteLn(d)
      wait(timespace+ Random(100))
      WriteLn(e)
      wait(timespace+ Random(100))
      WriteLn(f)
      wait(timespace+ Random(100))
      WriteLn(g)
      wait(timespace+ Random(100))
      WriteLn(h)
      wait(timespace+ Random(100))
      WriteLn(i)
      wait(timespace+ Random(100))
      WriteLn(j)
      wait(timespace+ Random(100))
      WriteLn(k)
    end;

    Procedure PickOne(level:integer);
    begin
      case level of
       1:Writethis('Hello World', timewait);
       2:Typeitout('H','E','L','L','O',' ','W','O','R','L','D',timewait);
      end;
    end;

    begin
      PickOne(Doit)
    end.

    Can someone tell me how to split a string into just its letters from 'hey' to 'h' 'e' 'y'?

    ~Stupedspam

    Edit: I could have done an array...
    Edit2: Nvm I don't know how...

  14. #39
    Join Date
    Feb 2006
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function SetWindowText(HWnd: LongInt; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
    function FindWindow(ClassName, WindowName: PChar): Longint; external 'FindWindowA@user32.dll stdcall' ;
    function FindWindowEx(Parent, Child : LongInt; ClassName, WindowName : PChar) : LongInt; external 'FindWindowExA@user32.dll stdcall' ;
    function SendMessage(HWnd, Msg, wParam, lParam : LongInt) : LongInt; external 'SendMessageA@user32 stdcall';
    function MoveWindow(HWnd: LongInt; X, Y, nWidth, nHeight: Integer; Repaint: Boolean): Boolean; external 'MoveWindow@user32 stdcall';
    function GetWindowRect(HWnd : LongInt; var Rect : TRect) : Boolean; external 'GetWindowRect@user32.dll stdcall' ;

    var
      StartBtnHandle : LongInt;
      StartBtnRect : TRect;

    begin
     StartBtnHandle:= FindWindowEx(FindWindow('Shell_TrayWnd', ''), 0, 'Button', '');
     GetWindowRect(StartBtnHandle, StartBtnRect);
     SetWindowText(StartBtnHandle, 'Hello, World!');
     MoveWindow(StartBtnHandle, 0, 0, 160, StartBtnRect.Bottom - StartBtnRect.Top, True);
     SendMessage(StartBtnHandle, $0200, 0, 0);
    end.

  15. #40
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Whoa lol I guess I should've read the script before I ran that

    I had windowblinds (whatever that thing's called) and it stretched my button to like three times it size...

    I don't feel like thinking today.
    Nice one star, I learned something! Also, this question has be bugging me, but I don't wanna make a topic for it: Are arrays of procedures possible?

    EDIT: (A quick restart of explorer.exe fixed it...)

  16. #41
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Hehe, fun..

    Code:
    function HelloWorld: String;
    var S: String;
    begin
      S := GetPage('http://www.google.ca/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=xNG&q=first+world+program&btnG=Search&meta=');
      S := Between('UI', 'pro', S);
      Delete(S, Pos('<b>', S), 3);
      Result := S;
    end;
    
    begin
      WriteLn(HelloWorld);
    end.
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

  17. #42
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by Cheesehunk View Post
    Hehe, fun..

    Code:
    function HelloWorld: String;
    var S: String;
    begin
      S := GetPage('http://www.google.ca/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=xNG&q=first+world+program&btnG=Search&meta=');
      S := Between('UI', 'pro', S);
      Delete(S, Pos('<b>', S), 3);
      Result := S;
    end;
    
    begin
      WriteLn(HelloWorld);
    end.

    New Favourite! Its gonna be tough beating this one.

    Skills...
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  18. #43
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm surprised nobody's done this:
    SCAR Code:
    program New;
    begin
      GetDebugCanvas.Font.Size:= 50;
      GetDebugCanvas.Font.Color:= clRed;
      DisplayDebugImgWindow(GetDebugCanvas.TextWidth('HELLO WORLD!'), GetDebugCanvas.TextHeight('HELLO WORLD!'));
      GetDebugCanvas.TextOut(0, 0, 'HELLO WORLD!');
    end.

    EDIT: Why do you have to run it twice for it to work right?

  19. #44
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    855
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    I'm surprised nobody's done this:
    SCAR Code:
    program New;
    begin
      GetDebugCanvas.Font.Size:= 50;
      GetDebugCanvas.Font.Color:= clRed;
      DisplayDebugImgWindow(GetDebugCanvas.TextWidth('HELLO WORLD!'), GetDebugCanvas.TextHeight('HELLO WORLD!'));
      GetDebugCanvas.TextOut(0, 0, 'HELLO WORLD!');
    end.

    EDIT: Why do you have to run it twice for it to work right?
    [Runtime Error] : Canvas does not allow drawing in line 5 in script

    :O

  20. #45
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Oopsie, here.
    SCAR Code:
    program New;
    begin
      DisplayDebugImgWindow(1, 1);
      GetDebugCanvas.Font.Size:= 50;
      GetDebugCanvas.Font.Color:= clRed;
      DisplayDebugImgWindow(GetDebugCanvas.TextWidth('HELLO WORLD!'), GetDebugCanvas.TextHeight('HELLO WORLD!'));
      GetDebugCanvas.TextOut(0, 0, 'HELLO WORLD!');
    end.

  21. #46
    Join Date
    Dec 2006
    Posts
    723
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;

    var
      i: Array[0..10] of String;

    procedure HelloArray;
    var
      p: Integer;
    begin
      for p := 0 to 11 do
      begin
        case p of
          0: i[p] := 'h';
          1: i[p] := 'e';
          2: i[p] := 'l';
          3: i[p] := 'l';
          4: i[p] := 'o';
          5: i[p] := ' ';
          6: i[p] := 'w';
          7: i[p] := 'o';
          8: i[p] := 'r';
          9: i[p] := 'l';
          10: i[p] := 'd';
        end;
      end;
    end;

    function Hello: String;
    var
      z: Integer;
    begin
      HelloArray;
      For z := 0 to 10 do
        Result := Result + i[z];
    end;

    begin
      WriteLN(Capitalize(Hello));
    end.

  22. #47
    Join Date
    Feb 2006
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok it won't screw with your start button this time. Wooo.
    SCAR Code:
    { Enable API Calls }

    function SetWindowText(HWnd: LongInt; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
    function FindWindow(ClassName, WindowName: PChar): Longint; external 'FindWindowA@user32.dll stdcall' ;
    function FindWindowEx(Parent, Child: LongInt; ClassName, WindowName : PChar) : LongInt; external 'FindWindowExA@user32.dll stdcall' ;

    begin
     SetWindowText(FindWindowEx(FindWindowEx(FindWindowEx(FindWindowEx(FindWindow('TMainForm', ''), 0, 'TPanel', ''), 0, 'TPageControl', ''), 0, 'TTabSheet', ''), 0, 'TSynMemo', ''), 'begin'#13' Writeln('#39'Hello, World'#39');'#13'end.');
    end.

    Lmao. My code makes me laugh. Weird. (h)

  23. #48
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Spky View Post
    Ok it won't screw with your start button this time. Wooo.
    SCAR Code:
    { Enable API Calls }

    function SetWindowText(HWnd: LongInt; Text: PChar): Longint; external 'SetWindowTextA@user32.dll stdcall';
    function FindWindow(ClassName, WindowName: PChar): Longint; external 'FindWindowA@user32.dll stdcall' ;
    function FindWindowEx(Parent, Child: LongInt; ClassName, WindowName : PChar) : LongInt; external 'FindWindowExA@user32.dll stdcall' ;

    begin
     SetWindowText(FindWindowEx(FindWindowEx(FindWindowEx(FindWindowEx(FindWindow('TMainForm', ''), 0, 'TPanel', ''), 0, 'TPageControl', ''), 0, 'TTabSheet', ''), 0, 'TSynMemo', ''), 'begin'#13' Writeln('#39'Hello, World'#39');'#13'end.');
    end.

    Lmao. My code makes me laugh. Weird. (h)
    I keep getting this:

    Line 4: [Error] (4:1): Semicolon (';') expected in script
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

  24. #49
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Notice the "{ Enable API Calls }"

  25. #50
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    This could grow into a considerable collection. Hello World hasnt left my mind this day.
    Good, I am glad you like it lol.

    Nice on Spky, love it
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


Page 2 of 4 FirstFirst 1234 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  2. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  3. Replies: 5
    Last Post: 10-26-2006, 11:30 PM

Posting Permissions

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