Results 1 to 5 of 5

Thread: Cannot click valid widget

  1. #1
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default Cannot click valid widget

    Hello everyone, I cannot seem to click the "Add Friend" widget. I tried two different ways, both of them do not work...

    Simba Code:
    procedure tryaddfriend1();
    var
      Widget : TReflectWidget;
    begin
      if Widget.IsValid(429, 7) then
        Widget.Interact
      else
        writeln('Widget not valid');
      Widget.Free;
    end;

    procedure tryaddfriend();
    var
      Widget : TReflectWidget;
    begin
      if Widget.IsValid(429, 7) then
        Reflect.Mouse.Move(middleBox(Widget.GetBounds), 5, 5)
      else
        writeln('Widget not valid');
      Widget.Free;
    end;

  2. #2
    Join Date
    Aug 2016
    Location
    Kentucky
    Posts
    254
    Mentioned
    3 Post(s)
    Quoted
    96 Post(s)

    Default

    I'm not sure why it's not working, but I'm very curious on what you're doing with this lol

  3. #3
    Join Date
    Mar 2012
    Posts
    107
    Mentioned
    2 Post(s)
    Quoted
    49 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    Hello everyone, I cannot seem to click the "Add Friend" widget. I tried two different ways, both of them do not work...

    Simba Code:
    procedure tryaddfriend1();
    var
      Widget : TReflectWidget;
    begin
      if Widget.IsValid(429, 7) then
        Widget.Interact
      else
        writeln('Widget not valid');
      Widget.Free;
    end;

    procedure tryaddfriend();
    var
      Widget : TReflectWidget;
    begin
      if Widget.IsValid(429, 7) then
        Reflect.Mouse.Move(middleBox(Widget.GetBounds), 5, 5)
      else
        writeln('Widget not valid');
      Widget.Free;
    end;

    Well I don't think you are assigning the widget to the Widget variable.

    To do that you have to make use Widget.GetWidget(429, 7); then after that is called you can use Widget.Interact; Once you've finished you can do Widget.Free to free it up.

    Code sample:

    Simba Code:
    Widget.GetWidget(429, 7);
    Widget.Interact;
    Widget.Free

    Without looking over the code for isValid I don't believe it assigns it to an actual Widget variable which has to be declared in your var section of your program, procedure or function. Furthermore, what I typically do is when I'm going through widgets I draw the bounds of them on-screen so I know where and what it pertains to. This helps to visualize them.

  4. #4
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    Quote Originally Posted by Aspect View Post
    I'm not sure why it's not working, but I'm very curious on what you're doing with this lol
    was just trying to use widget interaction for something simple like clicking a tab, and that was the first one i saw in the widget debugging script hehe

  5. #5
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    Quote Originally Posted by One Kid View Post
    Well I don't think you are assigning the widget to the Widget variable.

    To do that you have to make use Widget.GetWidget(429, 7); then after that is called you can use Widget.Interact; Once you've finished you can do Widget.Free to free it up.

    Code sample:

    Simba Code:
    Widget.GetWidget(429, 7);
    Widget.Interact;
    Widget.Free

    Without looking over the code for isValid I don't believe it assigns it to an actual Widget variable which has to be declared in your var section of your program, procedure or function. Furthermore, what I typically do is when I'm going through widgets I draw the bounds of them on-screen so I know where and what it pertains to. This helps to visualize them.
    thank you man, I assumed that it just automatically assigned the valid widget as the widget variable when Widget.IsValid was called. Works now

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
  •