[snippet] change dialog position

shanker

Well-Known Member
Joined
Sep 18, 2016
Messages
239
Likes
2
Points
33
Location
Romania
#1
with this method you l reach the middle of the box

[shcode=cpp]
Dialog.AddCheckBox(dialog_id [email protected], checkbox_id 0, checkbox_caption "", XY: 200, 5, SIZE: 25, 25)

while true
    wait 0
    if Dialog.IsVisible([email protected])
    then
        if Dialog.CheckBoxIsChecked([email protected], 0)
        then
            0B5E: get_cursor_pos [email protected] [email protected]
            //////////////////////////////////////
            {checkbox_x_pos = checkbox_x_pos + 10}
            {checkbox_y_pos = checkbox_y_pos + 25}
            //////////////////////////////////////
            [email protected] -= 210
            [email protected] -= 30
            //////////////////////////////////////
            {[email protected] = [email protected] - checkbox_x_pos}
            {[email protected] = [email protected] - checkbox_y_pos}
            Dialog.GetRECT([email protected], -1, -1, [email protected], [email protected])    
          Dialog.SetRECT([email protected], [email protected], [email protected], [email protected], [email protected])
            {now move mouse where you want to, just press click 1 to save curent pos}
        end
    end
end
[/shcode]
 
Top