Jump to content

Recommended Posts

Posted (edited)

Hey,

so I was trying to create a script which clicks an option of a dropdown menu but can't find a solution to move the mouse from the current position 50 units down...

If someone knows how to do this pls help me :)

[EDIT: MBY the solution is to just use MouseGetPos and then use MouseMove(MouseGetPos[0],MouseGetPos[1]+50)? but idk... mby there is a better solution...

Global $aPos = MouseGetPos
Sleep(10000)
MouseMove($aPos[0],$aPos[1]+50,10)

] Edit 2: NOPE Isn't working...

Thanks in advance

Jannik

Edited by jannikrendl
  • Moderators
Posted

You're asking for help with a dropdown menu, without stating what kind of menu it is, which makes it more than a little difficult to make suggestions. Is it a desktop app or website? Which app/site is it? How about a screenshot of the dropdown menu? The more you give us the more we can give you ;)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted (edited)

@JLogan3o13

This is the dropdown menu. I would like to automate the process of changing the properties by clicking at the file / move the mouse (by myself) to the the file and then simply start the script so it is able to change the file's properties...

Unbenannt.JPG

:)

Edited by jannikrendl
Posted (edited)

@snoopy.pa30

Thanks, it works. But I would like to know how It is done by the mouse so I can use it for other scripts in the future...

 

EDIT: I used @snoopy.pa30 idea but I still need the Mousemovement because I need to tick the read only tickbox.

1.JPG

Edited by jannikrendl
Posted

In my (limited) experience with AutoIT, I either use the SEND, or get the actual pixel location of what I have to click on.

I assume you know how to get the pixel location using AutoIT Window Info and Finder Tool.

Sorry I can't suggest anything better.

Snoopy=====Still trying to shoot down that Red Baron :-))

Posted

Sometimes I like to solve the problem elegantly.

More often I need to solve it quickly.

That is when the BFI methods come in to play.

BFI - Brute Force and Ignorance.

"Git er Done"

Snoopy=====Still trying to shoot down that Red Baron :-))

Posted

google broken?

not sure if you have to deal with twips 

func example()
    _mousemove(10,10)
EndFunc

Func _MouseMove ($iX, $iY)
    Local $dX = $iX  ;~ $iX*(65535.0/(@DesktopWidth-1))
    Local $dY = $iY  ;~ $iY*(65535.0/(@DesktopHeight-1))
    _WinAPI_Mouse_Event($MOUSEEVENTF_MOVE,$dX, $dY)
;~     DllCall ("user32.dll", "int", "mouse_event", "int", $MOUSEEVENTF_MOVE, "int", $dX, "int", $dY, "int", 0, "int", 0)
EndFunc

 

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
×
×
  • Create New...