Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 68

Thread: How To Make Any Scar Script A Standalone.exe

  1. #26
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Make sure, your using the right Window Caption.

    here:
    Code:
      script = FindWindow(NULL, "I am a Window");
    and here:
    Code:
     while(FindWindow(NULL, "I am a Window")) {...

  2. #27
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Heres my script im testing with...

    I only edited the filename in C++ nothing else.
    I do visit every 2-6 months

  3. #28
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Zasz View Post
    Heres my script im testing with...

    I only edited the filename in C++ nothing else.
    tested it.. Working fine...

    You'r on vista right ?. I'm using windows XP. Maybe Vista handles the window different, i couldnt evaluate that though...

    Or .. your doing something wrong with the c++ script x 'DD...

    ~caused

    //Heres the executeable:
    http://uploaded.to/file/f325vs
    Last edited by caused; 06-29-2009 at 05:30 AM.

  4. #29
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Haha, than, nvm, i guess

  5. #30
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    edit: ^ I mean at the bottom of screen that shows windows open/minimized.


    Deleted other so I could bump..


    It did work 0.- Had to many windows open. And Form didn't show on bottom bar cause its vista...

    But, how do I make it go to the front of all windows????
    I do visit every 2-6 months

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

    Default

    Quote Originally Posted by Cazax View Post
    Wonderful Do you know how to do this in Delphi?
    I attached an example. I compressed Fawki's old RatZ script with zlib (so you'll need that if you want to compile the program), and included it in the exe as a resource. It's not really a working program, but it shows how you'd go about doing it in Delphi.

    I forgot to make sure the script actually ran before I compressed it, so the script will attempt to run, but will give an error.

  7. #32
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Zasz View Post
    edit: ^ I mean at the bottom of screen that shows windows open.


    Deleted other so I could bump..


    It did work 0.- Had to many windows open. And Form didn't show on bottom bar cause its vista...

    But, how do I make it go to the front of all windows????
    I edited the Code with "SetForegroundWindow(script);" to do that.

  8. #33
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by caused View Post
    I edited the Code with "SetForegroundWindow(script);" to do that.
    Doesn't work in vista I guess, cause its behind all windows.
    I do visit every 2-6 months

  9. #34
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Zasz View Post
    Doesn't work in vista I guess, cause its behind all windows.
    Hmn,, i dont got Vista, so i couldnt test anything..

    Maybe try some madness, like:

    Code:
      while (GetActiveWindow() != script){
        ShowWindow(script,SW_SHOWNORMAL);
        SetForegroundWindow(script);
        SetActiveWindow(script);
        Sleep(5);
      }

  10. #35
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Didn't work, but thats o.k, I am thinking we could make it so we could make a players.txt file that be put in a folder with the .exe. So we could have people fill out declare players from there.
    I do visit every 2-6 months

  11. #36
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    I attached an example. I compressed Fawki's old RatZ script with zlib (so you'll need that if you want to compile the program), and included it in the exe as a resource. It's not really a working program, but it shows how you'd go about doing it in Delphi.

    I forgot to make sure the script actually ran before I compressed it, so the script will attempt to run, but will give an error.
    Thanks I'm saving it if I ever need to compile an script to exe.


  12. #37
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Hmn, if only i had vista xD. I'd get it to work for you =).
    I am thinking we could make it so we could make a players.txt file that be put in a folder with the .exe. So we could have people fill out declare players from there.
    Or tell people to put the script on the desktop =).

    //EDIT:
    Did you try the file i Uploaded ?

  13. #38
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    me feelz dumb. I was Compiling and running and stuff in dev-C++. When Dev was the main window. The other window wouldnt be called first. But I tried the .exe I made and it worked.
    I do visit every 2-6 months

  14. #39
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Zasz View Post
    me feelz dumb. I was Compiling and running and stuff in dev-C++. When Dev was the main window. The other window wouldnt be called first. But I tried the .exe I made and it worked.
    haha, gz

  15. #40
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SetupSrl doesn't work, it freezes the script.

    Any suggestions? (sorry for being a bother )

    Captions Me, but I edited the C++ to work with that.
    I do visit every 2-6 months

  16. #41
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    It's freezing the window ?. Or does the whole script freeze ?

    If the window freezes, it might be because, you need to change your way to write your script .. Cause with my current code(c++), the window has to be open all the time.

    ~caused

  17. #42
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I keep the window open. The whole script freezes.
    I do visit every 2-6 months

  18. #43
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Zasz View Post
    I keep the window open. The whole script freezes.
    I guess it's just the window. Don't got time to check it out now though :x...

    I'll try it later or tommorow, if you havnt found a sollution until than =)..

    ~caused

  19. #44
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Hmm. My problem:
    I click Main.exe, and it opens SCAR and runs it.
    I dont the the "I r w1ndow" stuff.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  20. #45
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    Hmm. My problem:
    I click Main.exe, and it opens SCAR and runs it.
    I dont the the "I r w1ndow" stuff.
    You have to make the form. So it will hide scar when form pops up. So you have to base your script off the form. When the form closes, so will your script.

    Right now, im working on an alternitive to this though.
    I do visit every 2-6 months

  21. #46
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by ZaSz View Post
    You have to make the form. So it will hide scar when form pops up. So you have to base your script off the form. When the form closes, so will your script.

    Right now, im working on an alternitive to this though.
    A Simple alternative would be to change the Scar Handle, when the Script finishes =).

    Or you create an extra window like sythe, with control elements for your script (start stop).

    ~caused

  22. #47
    Join Date
    Jul 2009
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wait, is it actually stand alone?!!?!? like u can take the exe all by iteself and run it on another pc? or do u need its library with it? like is the exe just a 1 click run instead of opening scar pressing play and using more resources?!?!?!?!

    because if this is completly standalone im verrrryyyy interested!!!!

  23. #48
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Ouivile View Post
    wait, is it actually stand alone?!!?!? like u can take the exe all by iteself and run it on another pc? or do u need its library with it? like is the exe just a 1 click run instead of opening scar pressing play and using more resources?!?!?!?!

    because if this is completly standalone im verrrryyyy interested!!!!
    What I would do is just add the SRL functions you need/use to the script. It'd be bigger, but it would be completely stand alone.

  24. #49
    Join Date
    Jul 2009
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh i see, so any srl functions should be added in the actual script and all original scar functions can stay and then its completly standalone?!?

    edit would this work with smart?

  25. #50
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Yes, Ouvile.

    I'd suggest to just try it out ;P.

    ~caused

Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

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

Posting Permissions

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