Results 1 to 12 of 12

Thread: How to open SCAR faster, open only 1 instance (Help please!)

  1. #1
    Join Date
    Sep 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation How to open SCAR faster, open only 1 instance (Help please!)

    Hi all,

    I have a program that needs to use a SCAR script. However it takes a lot of time because it opens the whole text editor. Is there any way to open only the script?

    It would be cool if I could only keep one instance of SCAR opened. This way it would not load the whole application everytime I call the script and I could run SCAR in the tray.

    Does anyone have an idea of what I could do?

  2. #2
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Open in tabs.

  3. #3
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    theres an option in scar settings somewhere that lets you do this
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  4. #4
    Join Date
    Sep 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you guys! I read that SCAR is supposed to open scripts in tabs since 3.22, but I looked at all the options, and I did not find it yet.

    And there is also a problem with this, my program has to call the script fairly often, after an hour, there'd be like 3000 tabs and now everything would be like super laggy. If I open the whole text editor then at least I can close it afterward, but I can't close a single tab. Ideally, I'd want my script to open in the same tab and replace the current one.

    I also can't use Keyboard keys to start or stop the script. Right now I'm using a shortcut which look like this: "C:\Program Files\SCAR 3.22\scar.exe" -open "D:\myscript.scar" -run

    I also searched on the web for other SCAR command line arguments, but I did not find them, if someone know where I can find the list, I would maybe be able to figure something out...

    I could simply use a loop and keep the script running at all time and activate itself when needed, but a loop usually use a lot of CPU power. If there is a way to make sure it does not use more than like 1% of the CPU power then I could use this method.

    Any ideas?

  5. #5
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What are you trying to do? That last paragraph sounds much more reasonable. You could have it use local ports or interscarmessaging etc.

  6. #6
    Join Date
    Sep 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, basically I only want to call SCAR to move the mouse on the screen. I'm not that great at math and it's a bit hard for me to make a decent human looking mouse movement. I thought I'd use MoveWindMouse until I build my own mouse function.

    So, I can't use the mouse to run the scar script, nor the keyboard cuz I'm trying to make it look as human as possible. However, everything else is hidden and would be fine to use.

    My main program is a VB6 program which execute the shortcut I mentioned earlier, then the SCAR script reads a text file with the coordinate, move the mouse to the coordinate, clicks and close itself...

    Now, I know it's like...the worst way possible to make a mouse movement, but I'm open to suggestions.

    Using local port would mean I have to open a port on SCAR and when it receives a certain message it would do what I want it to do? I can use Winsock with VB to send this message, but do you know where I could find a tutorial to set up the SCAR part in this?

    Interscarmessaging means my program would need to be a SCAR script right? I guess I can't use that then hmm...

    I also tried to copy the MoveWindMouse function to a delphi program to compile it, but I'm not that great with Delphi and it's hard to find all the includes necessary to set this up.

    Thank you for your time and sorry for my bad english. lol

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    How complicated is the script? You could probably use libmml if you're looking for a no-GUI solution.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  8. #8
    Join Date
    Sep 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, the script opens a .txt file which contains coordinates.
    And then it uses MoveWindMouse with the coordinates as arguments.

    It's like 5 lines long, that's why I find it a bit frustrating to have the whole scar editor open each time. =/

    I did a quick seach for libmml on google and did not find anything, you think it could solve my problem? If it's the case, where can I find more informations?

  9. #9
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by Bernardo88 View Post
    Well, the script opens a .txt file which contains coordinates.
    And then it uses MoveWindMouse with the coordinates as arguments.

    It's like 5 lines long, that's why I find it a bit frustrating to have the whole scar editor open each time. =/

    I did a quick seach for libmml on google and did not find anything, you think it could solve my problem? If it's the case, where can I find more informations?
    So you want to read coordinates from a text file and use them as a TPointArray in your script?

    If that's the case then it's easy to do. You don't have to open anything since scar can read text files.
    SCAR Code:
    var
      S: String;
      FileNum: Integer;
    begin
      FileNum := OpenFile(Path: string; Shared: Boolean);
      ReadFileString(FileNum, S, FileSize(FileNum));
      CloseFile(FileNum);
    end;
    Now you have the file as a string in your script.

    I ran out of time. Goint to school now. If this is the case then I can help you to get the Coordinate array out of the script.

  10. #10
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    libmml is related to Simba (like these forums) rather than SCAR. I think you can find it on wizzup.org/simba somewhere.

  11. #11
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    libmml is related to Simba (like these forums) rather than SCAR. I think you can find it on wizzup.org/simba somewhere.
    More likely the Simba forums on SRL. Simba Daemon (just fictional atm) would work do the trick for you. But I didn't really want to thread hijack, so if you have questions about it, post in Simba forums.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  12. #12
    Join Date
    Sep 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by antti mies View Post
    So you want to read coordinates from a text file and use them as a TPointArray in your script?

    If that's the case then it's easy to do. You don't have to open anything since scar can read text files.
    SCAR Code:
    var
      S: String;
      FileNum: Integer;
    begin
      FileNum := OpenFile(Path: string; Shared: Boolean);
      ReadFileString(FileNum, S, FileSize(FileNum));
      CloseFile(FileNum);
    end;
    Now you have the file as a string in your script.

    I ran out of time. Goint to school now. If this is the case then I can help you to get the Coordinate array out of the script.
    Thank you, but I already wrote the script and it works. The problem is just that to run the script I have to open SCAR, I'd want it to work like Autoit. Like you execute the file and it starts right away. Opening scar takes at least 500-1000ms. I want to make a human looking mouse so having a ~~750ms delay between mouse movement kinda destroys the purpose.

    Quote Originally Posted by Wizzup? View Post
    More likely the Simba forums on SRL. Simba Daemon (just fictional atm) would work do the trick for you. But I didn't really want to thread hijack, so if you have questions about it, post in Simba forums.
    I will search a little about this then, thanks.
    If you guys have any other ideas I'll be around~~

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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