Results 1 to 8 of 8

Thread: Making a Script, Pause it's self.

  1. #1
    Join Date
    Feb 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Making a Script, Pause it's self.

    I cant seem to figure out how to get a script to Pause it's self, and wait untill I tell it to Run again.

    Unless theres a built in procedure, the only think I can think of is to get the script to simulate 'Ctrl + Alt + A' to pause the script through the hotkeys.
    Problem with thay method though, I dont know which characters I need the script to press...

    Any help would be greatly apprechiated. Thanks.

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I just added something like this into my script, it checks every now and then to see if the user is pressing f11, if it finds that they are, it will wait for one second, check if they're pressing it again, and repeat until the user presses f11 again.

    SCAR Code:
    procedure checkpause;
    begin
    if(isfkeydown(11))then
    repeat
    wait(1000); //to make it more responsive, lower this to 100
    until(isfkeydown(11))
    end;
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah you can use that, but he needs the byte codes!!!
    Ill give you a list!
    ######### A-Z #########



    A - 65

    B - 66

    C - 67

    D - 68

    E - 69

    F - 70

    G - 71

    H - 72

    I - 73

    J - 74

    K - 75

    L - 76

    M - 77

    N - 78

    O - 79

    P - 80

    Q - 81

    R - 82

    S - 83

    T - 84

    U - 85

    V - 86

    W - 87

    X - 88

    Y - 89

    Z - 90






    ######### 0-9 Above A-Z Keys #########



    0 - 48

    1 - 49

    2 - 50

    3 - 51

    4 - 52

    5 - 53

    6 - 54

    7 - 55

    8 - 56

    9 - 57




    ######### "F" Keys #########


    F1 - 112

    F2 - 113

    F3 - 114

    F4 - 115

    F5 - 116

    F6 - 117

    F7 - 118

    F8 - 119

    F9 - 120

    F10 - 121

    F11 - 122

    F12 - 123

    //in case you have 15 of them

    F13 - 124

    F14 - 125

    F15 - 126




    ######### Number Pad #########



    0 - 96

    1 - 97

    2 - 98

    3 - 99

    4 - 100

    5 - 101

    6 - 102

    7 - 103

    8 - 104

    9 - 105

    Multiply - 106

    Add - 107

    Enter - 108

    Subtract - 109

    Decimal - 110

    Divide - 111




    ######### Other Keys #########



    Backspace - 8

    Tab - 9

    Clear - 12

    Enter - 13 // next to a-z

    Shift - 16

    Control - 17

    Alt - 18

    Capslock - 20

    Escape - 27

    Spacebar - 32

    PageUp - 33

    PageDown - 34

    End - 35

    Home - 36

    Left Arrow - 37

    Up Arrow - 38

    Right Arrow - 39

    Down Arrow - 40

    Insert - 45

    Delete - 46

    Help - 47

    Numberlock - 144

    Semi-Colon / Colon - 186

    Equals / Plus - 187

    Minus / Underscore - 189

    Forward Slash / Question Mark - 191

    Apostrophe / Tilde - 192

    Open Bracket / Open Brace - 219

    Backslash / Seperator - 220

    Close Bracket / Close Brace - 221

    Quote Key - 222

    PrintScreen - 44

    "Start" Key - 92
    No Problem!

  4. #4
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    I just added something like this into my script, it checks every now and then to see if the user is pressing f11, if it finds that they are, it will wait for one second, check if they're pressing it again, and repeat until the user presses f11 again.

    SCAR Code:
    procedure checkpause;
    begin
    if(isfkeydown(11))then
    repeat
    wait(1000); //to make it more responsive, lower this to 100
    until(isfkeydown(11))
    end;
    That's pretty smart... I'll have to add that Htkey to my copy of Four's power chopper

    Thanks. I've been wanting a way to pause the script...

  5. #5
    Join Date
    Feb 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Smartzkid, that was exactly what I was looking for I remember making a script in EASYUO for Ultima Online that did something similar to that, but I couldnt remember/figure out how to do it in SCAR.

    Thanks for that list Junkj, its now saved in a text file in my Scar folder for future reference

  6. #6
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by DaDj View Post
    Thanks Smartzkid, that was exactly what I was looking for I remember making a script in EASYUO for Ultima Online that did something similar to that, but I couldnt remember/figure out how to do it in SCAR.

    Thanks for that list Junkj, its now saved in a text file in my Scar folder for future reference
    No prob =)

    Thanks Junkj, I've seen lists like that before, but never all nicely formatted and all, too
    Interested in C# and Electrical Engineering? This might interest you.

  7. #7
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    wait(30) is the lowest you need.

  8. #8
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    No prob =)

    Thanks Junkj, I've seen lists like that before, but never all nicely formatted and all, too
    Some kid gave it to me i forgot his name though.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pause the script?
    By Illkillutill in forum OSR Help
    Replies: 5
    Last Post: 02-15-2009, 05:03 AM
  2. Auto Pause Scar?
    By oakley123 in forum OSR Help
    Replies: 3
    Last Post: 10-19-2008, 07:40 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
  •