Jump to content

"WinHold"


karman
 Share

Recommended Posts

Hi,

I would like to make some kind of "WinHold"

It should be like holding a window with ur mouse

I couldn't get it to work with WinMove

any other ideas?

For some more adequate support I would like to recommend that you explain exactly what you may need something like this for. WinMove doesn't move the window using the mouse. It moves it using an underlying windows API.

Have you tried some Mouse functions as that is what it seems you are trying to emulate.

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

For some more adequate support I would like to recommend that you explain exactly what you may need something like this for. WinMove doesn't move the window using the mouse. It moves it using an underlying windows API.

Have you tried some Mouse functions as that is what it seems you are trying to emulate.

Thanks,

JS

I want to make this without using mouse, if possible

Link to comment
Share on other sites

I think he wants something like this:

Just hold Alt and move a window with your left mouse-button. I hope I didn't break it (can't test right now), but you can search for dapwal at example-scripts, that's where I ripped it from. ;)

#include <Misc.au3>

$dll = DllOpen('user32.dll')
While 1
    If _IsPressed ('01', $dll) Then; LeftMouse
         GetInfo()
         If _IsPressed ('12', $dll) Then Move(); Alt
     EndIf
     Sleep(10)
WEnd


Func Move(); Move windows unix-style
    $Title = WinGetTitle('')
    $TPos = WinGetPos($Title)
    $MPos=MouseGetPos()
    While 1
        $MSPos=MouseGetPos()
        WinMove($Title, '', $TPos[0]+$MSPos[0]-$MPos[0], $TPos[1]+$MSPos[1]-$MPos[1])
        Sleep (100)
        If Not _IsPressed('01', $dll) Then ExitLoop
    WEnd
EndFunc
Edited by dabus
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...