Results 1 to 6 of 6

Thread: GetTextAtEx help needed

  1. #1
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    GetTextAtEx help needed

    hi

    i have this script:
    SCAR Code:
    ChatChars := LoadChars2(AppPath + 'Fonts\XXXXX');
    Doller := GetTextAtEx(907, 253, 20, ChatChars, False, False, 0, 0, -1, 200, True, tr_AllChars);
    and now i have some questions
    1. i have maked my own font and when i used
    SCAR Code:
    UpChars:= LoadChars2(AppPath + 'CharsRS22\');
    and edited 'CharsRS22\' to my fonts name (XXXXX) it doesn't work
    then i tried to add 'Fonts\, and then it worked why??

    2. when the program runs it all work, but when i want "Doller" in a WriteLn
    there is only a empty line, where WriteLn shuold be in the debugbox
    i have declared "Doller" as a string, but what do i need to "print" it in debugbox??

    //Batnas

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

    Default

    when you have \ its a folder.

    You need to do like MyFont.ttf (TrueTypeFont = ttf)

  3. #3
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok but what do i need to get out in a debug box??

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

    Default

    'Writeln(String);' puts text into the debug box. So, if you had 'sign' as a constant with 'dollar' as it's value, then you would put 'Writeln(sign+' is the string dollar');'. If you want to put an integer in, then you use 'IntToStr(integer)'. So, if 'money' was the integer you stored how much money you got, you would use something like 'Writeln(You have made $'+IntToStr(money));'.

  5. #5
    Join Date
    Mar 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok but my script coesnt work if 'Doller' is a integer
    i have declared 'Doller' as a string

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

    Default

    have you set up doller like:
    SCAR Code:
    Var
      doller: String;
    or
    SCAR Code:
    Const
      doller = 'doller';
    as if you did it with the first method, you have to put
    SCAR Code:
    doller:= 'doller';
    somewhere in your script before you call it.
    If you use the 2nd method (with const) you should just have to put it inside a writeln and it should put 'doller' into the debug box.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. GetTextAtEx
    By batnas in forum OSR Help
    Replies: 4
    Last Post: 02-03-2008, 12:58 PM
  2. GetTextAtEx help, please :)
    By Macro_FTW in forum OSR Help
    Replies: 3
    Last Post: 01-10-2008, 03:27 AM
  3. gettextatex?
    By jhildy in forum OSR Help
    Replies: 11
    Last Post: 06-04-2007, 12:39 AM

Posting Permissions

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