Results 1 to 14 of 14

Thread: Hidefor

  1. #1
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Hidefor

    SCAR Code:
    Function Hidefor(Timesec: integer): integer;
    begin
      Timesec := Timesec * 1000;
      getself.Hide;
      Wait(Timesec);
      getself.Show;
      Result := Timesec;
    end;

    SIMPLE to use and simple to make function to hide scar for the time you want.

    HideFor(2); will hide scar for 2 seconds simple

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  2. #2
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Why would you want to hide it for 2 seconds or even 30 seconds if all it does then is nothing? It would make more sense to make 2 procedures/functions - 1 that hides it and another that checks if it is time to show it yet (using timefrommark or system time) - or you could combine them into 1.
    I can think of 1 use though - if you want launch scar then get it to run after your familiy goes out to work or whatever so they don't interrupt it (because they have to do something on the pc etc).
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  3. #3
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    It wasn't this procedure, but last time I used hiding was today, I had to go to the shop and hide scar and make it movemouse(0, 0) so my grandma wont steal comp and play sudoku

    Why would you want to hide it for 2 seconds or even 30 seconds if all it does then is nothing? It would make more sense to make 2 procedures/functions - 1 that hides it and another that checks if it is time to show it yet (using timefrommark or system time) - or you could combine them into 1.
    eh - if you know the amount of time you want to wait and you don't do anything else except would check if it's time to break, you can just use wait -.-

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

    Default

    Quote Originally Posted by Dumpin View Post
    SCAR Code:
    Function Hidefor(Timesec: integer): integer;
    begin
      Timesec := Timesec * 1000;
      getself.Hide;
      Wait(Timesec);
      getself.Show;
      Result := Timesec;
    end;

    SIMPLE to use and simple to make function to hide scar for the time you want.

    HideFor(2); will hide scar for 2 seconds simple
    Why don't you just let it use milliseconds, would be alot better IMO.



    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)

  5. #5
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for commends.

    now with F key Function

    SCAR Code:
    Function Hideuntilkey(Key: byte): byte;
    var Q : byte;
    begin
      Q := Key;
      repeat
        getself.Hide;
      until(IsFkeyDown(Q));
      getself.Show;
      Result := key;
    end;

    use as
    SCAR Code:
    Hideuntilkey(12); // 12 is the number of the Fkey

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  6. #6
    Join Date
    Jun 2007
    Location
    ENGLAND
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why would you want to hide it..

  7. #7
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well... read n3ss3s post... And maybe you want to make a scar keylogger?

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  8. #8
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    The 2nd one is wrong - you just have it keep hiding itself when it should hide itself first then have a wait in the repeat loop. Also, why did you have to make Q a byte, when you could of just used key?
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  9. #9
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i dunno, first tried without Q didn't work, so i tried with an var between it.

    also, it works fine for me. and this was the easyest way i guess.

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  10. #10
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I meant, wouldn't you have it as:
    SCAR Code:
    getself.Hide;
      repeat
        Wait(100);
      until(IsFkeyDown(Q));
      getself.Show;
    To have it continuing to hide itself without being shown could cause errors (I think). Also, wouldn't it be more useful to return the time it ran until it was stopped?

    Edit: Played with it and got this (changed it to what I said):
    SCAR Code:
    function HideUntilKey(Key: byte): Integer;
    var
      sTime: Integer;
    begin
      sTime:= GetSystemTime;
      getself.Hide;
      repeat
        Wait(100);
      until(IsFkeyDown(Key));
      getself.Show;
      Result := GetSystemTime-sTime;
    end;
    It works fine for me (using key without setting up a variable to store it) and it outputs the time it hid for.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  11. #11
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    aah, is nice to im thinking of a new function at the moment... or maybe a new script.

    EDIT:

    SCAR Code:
    Procedure LockPc(Key: byte);
    begin
      getself.Hide;
      repeat
        movemouse(0,0);
      until(IsFkeyDown(Key));
      getself.Show;
    end;

    Locks your mouse in the top corner. nobody will be able to use the computer in any way without pressing the choosen FKey

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  12. #12
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Check the 'other scripts' section - I'm sure someone added a very advanced pc locker that involved key combinations (like ctr+u to unlock) and also added clicking support in case the person knew about scar, so opened up the task manager then ended it from there.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  13. #13
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok people...If you use this function it can't do other parts of scripts because it waits. You should just have it Repeat Hide until key is down and not wait. Don't use waits or else it won't do other part. So it would be like this. Hold on...

    SCAR Code:
    Program New;
    {.Include SRL/SRL.scar}

    Procedure HideSCAR;
    Begin
    GetSelf.Hide;
    Writeln('SCAR has been hidden.');
    End;

    Procedure UnhideSCAR;
    Begin
    GetSelf.Show;
    GetSelf.WindowState := wsMaximized;
    Writeln('SCAR has been unhidden.');
    End;

    Begin
    HideSCAR;
    Wait(500);
    ShowMessage('Script is working.');
    UnhideSCAR;
    End.

    So, I tried using the key function but it didn't work so I just did 2 seperate ones. It still didnt work so why don't we use the while do command...Thanks (Again),

    ~Kyle~

  14. #14
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    That was my earlier suggestion (check 2nd post), but that's a rubbish method of doing it MarkTime's are so much cooler.

    SCAR Code:
    var
      sTime: Integer;

    function HideFor(ms: Integer; fKey: byte; useWait: Boolean): Integer;
    begin
      if(sTime = 0) then
      begin
        sTime:= GetSystemTime;
        GetSelf.Hide;
        Result:= ms-(GetSystemTime-sTime);
        Exit;
      end
      else if(useWait) then
      begin
        if((sTime+ms)<=GetSystemTime) then
        begin
          Result:= 0;
          GetSelf.Show;
          Exit;
        end
        else
        begin
          Result:= ms-(GetSystemTime-sTime);
        end;
      end
      else
      begin
        if(IsFKeyDown(fKey)) then
        begin
          GetSelf.Show;
        end;
      end;
    end;

    Just set sTime as a var (is at top of script) and you can then choose whether or not to wait for a certain time or until a key is pressed (using the 'useWait' boolean with True meaning it waits for 'ms' milliseconds or False to wait until the 'fkey' fkey is down). It also outputs the time left for hiding (only used if you're using the waiting method) though you can change it to a boolean if you want it to output true when it shows itself.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

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
  •