Jump to content
Sign in to follow this  
squallA

how to change X/Y when res changed ?

Recommended Posts

If $on And WinActive('SRO_Client') Then 
ClickInControl("left", "SRO_Client", "", "",31*@DesktopWidth/800,537*@DesktopHeight/600)

This is my code. When Res is 800x600 it's ok, but when res is 1024x768, it's wrong click :whistle: . Anyone who can help me ?

Share this post


Link to post
Share on other sites

If $on And WinActive('SRO_Client') Then 
ClickInControl("left", "SRO_Client", "", "",31*@DesktopWidth/800,537*@DesktopHeight/600)

This is my code. When Res is 800x600 it's ok, but when res is 1024x768, it's wrong click :whistle: . Anyone who can help me ?

When getting your coords, make sure they are "Client" coords and your problem will be solved.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I sure coord mode in AutoIT v3 active window info is Client

You wouldn't be using @DeskTopWidth or @DeskTopHeight if you were using "client" coord modes already.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

$Input_1 = GUICtrlCreateInput('', 30, 30, 230, 70,BitOR($ES_WANTRETURN, $ES_MULTILINE))
If $on And WinActive('SRO_Client') Then 
            ClickInControl("left", "SRO_Client", "", "",40,705)
            Controlsend("SRO_Client","","",GUICtrlRead($Input_1) & @CR, 1)
            ClickInControl("left", "SRO_Client", "", "",912,16)
            Sleep(GUICtrlRead($Input_4) * 1000)

If i want finish per line, it's sleep "Sleep(GUICtrlRead($Input_4) * 1000)" !

Who can teach me :whistle: ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...