Results 1 to 13 of 13

Thread: Turn a simba script into a standalone program

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Turn a simba script into a standalone program

    I am planning on writing a program in simba not for RS, just a simple program with a simple GUI and that kind of stuff. Is it possible to distribute this program to friends as a .exe or any other filetype that doesn't require the installation of simba?

    Thanks
    ~Footy
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    I'm not sure if inferring the right idea but are you saying that you are trying to make a program that would load any script. Kind of like an injection client?

  3. #3
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    No, since Simba is what contains all of the functions that you would need to use. And you would need somewhere to put SRL and all of the plugins.

    But botting with a .exe is possible, back in 06 I used a fighter script that was exactly what you are describing. But I'm pretty sure that was Visual Basic or something along those lines, not pascalscript.

  4. #4
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, and I dont need any of SRL's functions, its not for RS, completely unrelated. What do you recomend I use to make a simple program with a GUI?

    Quote Originally Posted by Ucantseemebot View Post
    I'm not sure if inferring the right idea but are you saying that you are trying to make a program that would load any script. Kind of like an injection client?
    Not quite. It would just be a program that would accept input from a GUI and generate an output based on the input and inner calculations.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  5. #5
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    Alright, and I dont need any of SRL's functions, its not for RS, completely unrelated. What do you recomend I use to make a simple program with a GUI?
    Lazarus
    Last edited by Le Jingle; 09-26-2012 at 11:11 PM.

  6. #6
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    Lazarus
    Fancy name... I guess I'll look up some tuts, thanks for the reccomendation.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  7. #7
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Tell your friends to stop being lazy and take 15 minutes to learn how to use it

    For real though, can't they just install Simba, download your script, double-click your script, and hit run? Assuming you use a form as your GUI.

  8. #8
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    Alright, and I dont need any of SRL's functions, its not for RS, completely unrelated. What do you recomend I use to make a simple program with a GUI?



    Not quite. It would just be a program that would accept input from a GUI and generate an output based on the input and inner calculations.
    Quote Originally Posted by Le Jingle View Post
    Lazarus
    If you're looking to stick with Pascal(Script) then Lazarus for sure (which is the IDE used to develop Simba). Otherwise, I would recommend downloading VisualStudio and expanding your knowledge to VB.NET, as it is quite similar to pascal.

  9. #9
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Runaway View Post
    Tell your friends to stop being lazy and take 15 minutes to learn how to use it

    For real though, can't they just install Simba, download your script, double-click your script, and hit run? Assuming you use a form as your GUI.
    Simba = RSBotting, and RS is one of those things that you keep to yourself in my community,

    Quote Originally Posted by NCDS View Post
    If you're looking to stick with Pascal(Script) then Lazarus for sure (which is the IDE used to develop Simba). Otherwise, I would recommend downloading VisualStudio and expanding your knowledge to VB.NET, as it is quite similar to pascal.
    Jeez, the easy way, or expand my knowledge... Which to pick, which to pick? Thanks for the suggestions, I'll pick one sooner or later...
    E: Chose lazerus. Why on earth is it 107 MB though?
    Last edited by Footy; 09-26-2012 at 11:24 PM.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  10. #10
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    Simba = RSBotting, and RS is one of those things that you keep to yourself in my community,
    You can use SCAR, it utilizes most of the same core functions. Aaand it's got an awesome form editor!

  11. #11
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR was also used for RS botting. And instead of posting another thread, I have anothr, completely unrelated question. How do I make an animated avatar with a gif? I put the gif URL in the avatar thingy, but it only shows the first frame.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  12. #12
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    SCAR was also used for RS botting. And instead of posting another thread, I have anothr, completely unrelated question. How do I make an animated avatar with a gif? I put the gif URL in the avatar thingy, but it only shows the first frame.
    http://www.scar-divi.com/
    ^ RS isn't mentioned anywhere.

    As for gif's, I think you have to be a mod/admin to use animated avatars.

  13. #13
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Follow this Tutorial: http://villavu.com/vb/showthread.php?t=47141

    But instead, use the following code for Simba:

    C++ Code:
    #include <Windows.h>
    #include <iostream>
    #include <vector>
    #include <sstream>


    std::string FormTitle = "Notepad";  //Change this to your Form Name.

    std::string SimbaPath = "Simba/Simba.exe";
    std::string ScriptPath = "ScriptToRun.simba";   //Change this.

    DWORD FormProcessID = 0;  //Do not touch this variable.



    template<typename T> inline std::string ToString(T Type){std::stringstream SS; SS<<Type; return SS.str();}

    std::string CreateCommandLine(std::string SimbaPath, std::string ScriptPath)
    {
        return SimbaPath + " -o " + "\"" + ScriptPath + "\" -r";
    }

    int Pos(std::string Needle, std::string Haystack, int StartPos)
    {
        return Haystack.find(Needle, StartPos);
    }

    std::string LowerCase(std::string Str)
    {
        for (size_t I = 0; I < Str.length(); I++)
        {
            Str[I] = tolower(Str[I]);
        }
        return Str;
    }

    bool RunApplication(std::string ApplicationName, std::string ApplicationArguments, bool WaitInputIdle)
    {
        bool Result = false;
        STARTUPINFO         siStartupInfo;
        PROCESS_INFORMATION piProcessInfo;

        std::vector<char> Arguments(ApplicationArguments.begin(), ApplicationArguments.end() + 1); //strcpy(Arguments, ApplicationArguments.c_str());
        memset(&siStartupInfo, 0, sizeof(siStartupInfo));
        memset(&piProcessInfo, 0, sizeof(piProcessInfo));

        if (CreateProcess(ApplicationName.empty() ? NULL : ApplicationName.c_str(), &Arguments[0], 0, 0, false, CREATE_DEFAULT_ERROR_MODE, 0, 0, &siStartupInfo, &piProcessInfo) != false)
            Result = true;

        FormProcessID = piProcessInfo.dwProcessId;

        if (WaitInputIdle)
        {
            Result = false;
            if (WaitForInputIdle(piProcessInfo.hProcess, 10000) == 0)
                Result = true;
        }
        CloseHandle(piProcessInfo.hThread);
        CloseHandle(piProcessInfo.hProcess);
        return Result;
    }

    BOOL CALLBACK WorkerProc(HWND Hwnd, LPARAM lParam)
    {
        char Buffer[256] = {0};
        GetWindowText(Hwnd, Buffer, 256);

        if(Pos(LowerCase(FormTitle), LowerCase(Buffer), 0) != -1)
        {
            *(reinterpret_cast<HWND*>(lParam)) = Hwnd;
            return FALSE;
        }

        return TRUE;
    }

    bool HideIDE(void)
    {
        HWND Blank = 0;
        HWND* Hwnd = &Blank;
        EnumWindows(&WorkerProc, reinterpret_cast<LPARAM>(Hwnd));
        return ShowWindow(*Hwnd, SW_HIDE);
    }

    bool FindForm()
    {
        HWND Blank = 0;
        HWND* Hwnd = &Blank;
        EnumWindows(&WorkerProc, reinterpret_cast<LPARAM>(Hwnd));
        return (*Hwnd != 0);
    }

    int main()
    {
        RunApplication(std::string(), CreateCommandLine(SimbaPath.c_str(), ScriptPath.c_str()), true);
        while(!HideIDE())
        {
            Sleep(2);
        }

        while (FindForm())
        {
            Sleep(2000);
        }

        std::string KillPIDInfo = "TASKKILL /PID " + ToString(FormProcessID) + " /T";
        system(KillPIDInfo.c_str());
    }
    I am Ggzz..
    Hackintosher

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
  •