+ Reply to Thread
Showing results 1 to 17 of 17

Thread: Code Colors

  1. #1

    Heretic
    psicrash is on a distinguished road
    Join Date
    Aug 2005
    Posts
    20

    Default Code Colors

    Hi

    Does anybody know how to send the starcraft code colors with visual basic?

    I tried to use the function SendKeys, but it doesn't work.

    I'm trying to make a simples program to change the color of my messages in-game without use name spoof.

    Can you help me?

  2. #2
    I hate Steve Jobs. Senior Member
    Gold Member

    Crusader
    lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of
    Join Date
    Jun 2005
    Location
    Fullerton, CA
    Posts
    3,247

    Default

    Way too advanced for you (advanced for me too)... is it just me or since I began making macros every noob is trying to copy me..?

  3. #3
    F7 F1EF Senior Member
    Retired Staff Member

    Crusader
    bulk_4me has much to be proud of bulk_4me has much to be proud of bulk_4me has much to be proud of bulk_4me has much to be proud of bulk_4me has much to be proud of bulk_4me has much to be proud of bulk_4me's Avatar
    Join Date
    Jun 2004
    Location
    Torreón, Coah. México
    Posts
    3,318
    Blog Entries
    1

    Default

    Not possible. You could try to directly edit the String Proto, but that would only work locally. To send colors to other players you need to create a custom string and use the fxn that handles that.

  4. #4
    Jackhammer Jesus Retired Staff Member

    Disciple
    indulgence is just really nice indulgence is just really nice indulgence's Avatar
    Join Date
    Jan 1970
    Posts
    521

    Default

    You can't use send keys to send non printable characters.... you shouldnt use sendkeys anyway.

  5. #5
    Senior Member
    Retired Staff Member

    Zealot
    SubZero has disabled reputation SubZero's Avatar
    Join Date
    Apr 2004
    Location
    Singapore
    Posts
    829

    Default

    This problem stumped me when I tried copying Drakken and Indy's colour spammers. I coded everything with sendkey then realised that it won't print colours.

    But that was a LONG LONG time ago. How nostalgic.

  6. #6
    The Sexy Penguin Senior Member
    Moderator

    Prophet
    LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX's Avatar
    Join Date
    Feb 2005
    Location
    astrotravelin'
    Posts
    7,775

    Default

    Use write process memory.
    Quote Originally Posted by ston3rpimp69 View Post
    hello im the official spokesperson for lcs' awesome group only cool ppl can join and here is my official statement

    YO FUKC U PUNK ASS FGTS THIS GROUP IS FOR AWESOME MOTHERFUKCERS DOING AWESOME MOTHERFUKCIN THINGS AND DISCUSSING IMPORTANT AND PROFOUND TOPICS SUCH AS SUBSTANCE EXCHANGE RATES, JAILBAIT, COOKIN CRANK, TRISH'S SNATCH, BEER AND TACOS. WE ALSO GO ON FIELD TRIPS AND SIHT. SO IF UR INTO BEATIN HOMELESS PPL WITH SOCKS FULL OF BATTERIES THEN JOIN THIS FUKCIN GROUP CUZ U CANT BE A SCARED LITTLE BITCH ALL UR LIFE
    Quote Originally Posted by ston3rpimp69
    so at first i was excited cuz i was gettin laid. but then i thought about it. i dunno, maybe it's cuz i hadn't had anything to drink, but i almost panicked. i was thinkin this bitch takes in dicks like air and has probably done some pretty wild siht that i've only seen in vids from dsg's porn collection. she probably needs 4 cocks and a slip n slide to get off. that's kinda intimidating. that and i was worried that my dick might get the plague and fall off. might have to coat the condom in pesticide and wear a trash bag or something. i almost let it end there. almost. it's hard to say no when she's biting my shoulder as i walk her to her car. at least she doesn't waste time.

  7. #7
    Jackhammer Jesus Retired Staff Member

    Disciple
    indulgence is just really nice indulgence is just really nice indulgence's Avatar
    Join Date
    Jan 1970
    Posts
    521

    Default

    I guess I will clarify a bit why you shouldnt use SendKeys... then I will post a sticky...

    The reason "SendKeys" should not be used in any program is two-fold:
    • You can't "Direct/Control" where the KeyPress events are going to go. They will only goto the Active window - which can switch at a moments notice via another window "notifying" or an alt+tab, or a myriad of other reasons. You can "SetActiveWindow" but it can lose focus as said in the previous sentence.
    • You can't send Non-Printable Characters or Unicode text... not really functional, eh?

    In regards to the first I will give you a worst case scenario to explain why this is a bad thing.
    say your application walks the following menus...
    [File] [Edit]
    [New] [Examine...]
    [Exit]

    and your code looks like
    Code:
    SendKeys {Alt+F} ' I dont know the alt char b/c im not lame and dont use sendkeys
    SendKeys {N}
    SendKeys {Alt+D} ' See: Above
    SendKeys {X}
    Now if i lost focus for the split second b/w Alt+F & N and then regain before X -- My application will exit and I will have been wtf pwnt.

    Had I used SendMessage to send Menu commands to the window (.. or WM_KEYPRESS events *wink wink*) I would have been perfectly fine - as it sends to the INDIVIDUAL window -- not to whatever window wants to be active.

    Reminder: this makes kittens cry. So, please, don't use SendKeys and make the kittens cry.

  8. #8
    I hate Steve Jobs. Senior Member
    Gold Member

    Crusader
    lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of
    Join Date
    Jun 2005
    Location
    Fullerton, CA
    Posts
    3,247

    Default

    Quote Originally Posted by indulgence
    I guess I will clarify a bit why you shouldnt use SendKeys... then I will post a sticky...

    {In process of editing to add the content}
    I'm using Sendkeys for BagFullOfSh1t and I gotta admit its pretty $hitty.. makes random terran buildings lift up... makes units go crazy..

  9. #9
    Jackhammer Jesus Retired Staff Member

    Disciple
    indulgence is just really nice indulgence is just really nice indulgence's Avatar
    Join Date
    Jan 1970
    Posts
    521

    Default

    Then you are a victim of either some window momentarily getting keypress focus - or your "macro" is bad.

  10. #10
    The Sexy Penguin Senior Member
    Moderator

    Prophet
    LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX has a reputation beyond repute LCSBSSRHXXX's Avatar
    Join Date
    Feb 2005
    Location
    astrotravelin'
    Posts
    7,775

    Default

    Quote Originally Posted by lpxxfaintxx
    I'm using Sendkeys for BagFullOfSh1t and I gotta admit its pretty $hitty.. makes random terran buildings lift up... makes units go crazy..
    Dammit just use write process memory for macros!
    Quote Originally Posted by ston3rpimp69 View Post
    hello im the official spokesperson for lcs' awesome group only cool ppl can join and here is my official statement

    YO FUKC U PUNK ASS FGTS THIS GROUP IS FOR AWESOME MOTHERFUKCERS DOING AWESOME MOTHERFUKCIN THINGS AND DISCUSSING IMPORTANT AND PROFOUND TOPICS SUCH AS SUBSTANCE EXCHANGE RATES, JAILBAIT, COOKIN CRANK, TRISH'S SNATCH, BEER AND TACOS. WE ALSO GO ON FIELD TRIPS AND SIHT. SO IF UR INTO BEATIN HOMELESS PPL WITH SOCKS FULL OF BATTERIES THEN JOIN THIS FUKCIN GROUP CUZ U CANT BE A SCARED LITTLE BITCH ALL UR LIFE
    Quote Originally Posted by ston3rpimp69
    so at first i was excited cuz i was gettin laid. but then i thought about it. i dunno, maybe it's cuz i hadn't had anything to drink, but i almost panicked. i was thinkin this bitch takes in dicks like air and has probably done some pretty wild siht that i've only seen in vids from dsg's porn collection. she probably needs 4 cocks and a slip n slide to get off. that's kinda intimidating. that and i was worried that my dick might get the plague and fall off. might have to coat the condom in pesticide and wear a trash bag or something. i almost let it end there. almost. it's hard to say no when she's biting my shoulder as i walk her to her car. at least she doesn't waste time.

  11. #11
    I hate Steve Jobs. Senior Member
    Gold Member

    Crusader
    lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of lpxxfaintxx has much to be proud of
    Join Date
    Jun 2005
    Location
    Fullerton, CA
    Posts
    3,247

    Default

    Too late now, almost half done with the project. Also, would anyone teach me or give me a link to a tut?

  12. #12
    =) Senior Member
    Game Hacking Staff

    Supreme Being
    K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ's Avatar
    Join Date
    Oct 2004
    Location
    South Carolina
    Posts
    11,299
    Blog Entries
    2

    Default

    Quote Originally Posted by lpxxfaintxx
    Too late now, almost half done with the project. Also, would anyone teach me or give me a link to a tut?
    At least use GetActiveWindow to make sure Sc is the window with focus...

    Heres some verrry old, nasty code I used a while ago to write stuffs to its buffer...
    Code:
    Private Sub SendChatMsg(Message As String)
    Dim i As Integer
    Dim address As Long
    Dim Character(1 To 100) As Byte
    On Error Resume Next
    For i = 1 To 72
    Character(i) = Asc(Mid(Message, i, 1))
    If Character(i) = 0 Then Exit For
    address = ColorLoc + (i - 1)
    WriteProcessMemory Sc.PHandle, address, Character(i), 1&, 1&
    Next i
    End Sub
    ColorLoc being the address of the chat buffer thingeh.

    And after that was called I would SendMessage Sc.hwnd,WM_CHAR,13,0 twice.
    Kc: what waht
    DSG: in da butt
    DSG: lol
    DSG: :P
    Kc: what what!?
    Kc: IN THE BUTT
    Kc: I say what what?
    DSG: in the butt

  13. #13

    Heretic
    psicrash is on a distinguished road
    Join Date
    Aug 2005
    Posts
    20

    Default :(

    I'd already tried to use writeprocessmemory before trying to use SendKeys function, but the address memory, always changes.

  14. #14
    =) Senior Member
    Game Hacking Staff

    Supreme Being
    K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ's Avatar
    Join Date
    Oct 2004
    Location
    South Carolina
    Posts
    11,299
    Blog Entries
    2

    Default

    Quote Originally Posted by psicrash
    I'd already tried to use writeprocessmemory before trying to use SendKeys function, but the address memory, always changes.
    Find the address that holds the address of the chat buffer.
    Kc: what waht
    DSG: in da butt
    DSG: lol
    DSG: :P
    Kc: what what!?
    Kc: IN THE BUTT
    Kc: I say what what?
    DSG: in the butt

  15. #15

    Deviant
    Mr_Mooo_Cow is on a distinguished road
    Join Date
    Mar 2005
    Location
    Marlton, NJ
    Posts
    90
    Quote Originally Posted by psicrash
    I'd already tried to use writeprocessmemory before trying to use SendKeys function, but the address memory, always changes.
    I've made a color spammer before and I too ran into that DMA problem with the text offset, I used a really welfare way and made my program search certain ranges for a match to the text offset, it worked but it was surely not the most efficient way.

    Edit : True :( I messed up. :P
    Last edited by Mr_Mooo_Cow : 12-23-2005 at 06:44 PM
    Bahhh sheep!

  16. #16
    =) Senior Member
    Game Hacking Staff

    Supreme Being
    K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ has a reputation beyond repute K? Pŕo?ćtiόnŹ's Avatar
    Join Date
    Oct 2004
    Location
    South Carolina
    Posts
    11,299
    Blog Entries
    2

    Default

    Quote Originally Posted by Mr_Mooo_Cow
    I've made a color spammer before and I too ran into that DMA problem with the text offset, I used a really welfare way and made my program search certain ranges for a match to the text offset, it worked but it was surely not the most efficient way.


    I have tried this, maybe I am wrong but does the chat/text offset have a static pointer? I remember when I was messing around with it I thought I had found the pointer but it soon changed as well as the actual text offset.
    How do you think Sc knows where it is?
    Kc: what waht
    DSG: in da butt
    DSG: lol
    DSG: :P
    Kc: what what!?
    Kc: IN THE BUTT
    Kc: I say what what?
    DSG: in the butt

  17. #17
    Jackhammer Jesus Retired Staff Member

    Disciple
    indulgence is just really nice indulgence is just really nice indulgence's Avatar
    Join Date
    Jan 1970
    Posts
    521

    Default

    Find the offset for the dynamic pointer to the text just *ONCE* -- then do a hex search in tsearch for the value of the offset (reversed obviously)...
    Ie: Text is stored at 10A4450A
    Search for 0A45A410 hex

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Question regarding code caves
    By arpsmack in forum Starcraft/Brood War
    Replies: 24
    Last Post: 04-23-2007, 11:09 AM
  2. Inhale has a backdoor code?
    By sjsnrnsi in forum Starcraft/Brood War
    Replies: 20
    Last Post: 09-09-2005, 03:30 AM
  3. Is this the Zero2.0.2 source?
    By ShadowTassadar in forum Software Development
    Replies: 32
    Last Post: 07-09-2005, 10:06 PM
  4. Code looks beautiful
    By some5 in forum General Chat
    Replies: 2
    Last Post: 02-01-2005, 07:12 PM

Posting Rules

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