Jump to content

GUICtrlSetPos


Recommended Posts

@xzaz WinMove Moves or Resizes the whole window.

@chssoccer GUICtrlSetPos only works on an AutoIt GUI. See ControlMove() in the help file. Functions>>Window Management>>Controls

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

or ControlMove()

Note: all GUICtrlxxx() functions are supposed to be used only on AutoIt GUI's controls.

Parameters -

x: X coordinate to move to relative to the window client area.

y: Y coordinate to move to relative to the window client area.

It still only moves it in the window, not anywhere on the screen.

Link to comment
Share on other sites

Parameters -

x: X coordinate to move to relative to the window client area.

y: Y coordinate to move to relative to the window client area.

It still only moves it in the window, not anywhere on the screen.

Get serious. You can't drag a control out of it's parent window. It will remain within the client area.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

So, what you're basically saying is AutoIt is a suckass language and can't do shit other than make GUI bound controls.

No, what I'm saying is......

1 ) No application in any langauage is going to move a control off the client area.

2 ) You have absolutely no concept of programing

3 ) Goodbye.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Ok. You need an adjustment upstairs. 1 Search of the helpfile and you could get this. Omg! Look at this! It works! :)

#include <GUIConstants.au3>

$gui=GUICreate("test transparentpic", 200, 100)
$pic=GUICreate("", 68, 71, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui)
GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",0,0, 0,0)

GUISetState(@SW_SHOW,$pic)
GUISetState(@SW_SHOW,$gui)

HotKeySet("{ESC}", "main")
HotKeySet("{LEFT}", "left")
HotKeySet("{RIGHT}", "right")
HotKeySet("{DOWN}", "down")
HotKeySet("{UP}", "up")
$picPos = WinGetPos($pic)
$guiPos = WinGetPos($gui)

do
    $msg = GUIGetMsg()
until $msg = $GUI_EVENT_CLOSE
Exit

Func main()
    $guiPos = WinGetPos($gui)
    WinMove($gui,"",$guiPos[0]+10,$guiPos[1]+10)
EndFunc

Func left ()
    $picPos = WinGetPos($pic)
    WinMove($pic,"",$picPos[0]-10,$picPos[1])
EndFunc

Func right()
    $picPos = WinGetPos($pic)
    WinMove($pic,"",$picPos[0]+10,$picPos[1])
EndFunc

Func down()
    $picPos = WinGetPos($pic)
    WinMove($pic,"",$picPos[0],$picPos[1]+10)
EndFunc

Func up()
    $picPos = WinGetPos($pic)
    WinMove($pic,"",$picPos[0],$picPos[1]-10)
EndFunc

And if you ever call AutoIt a suckass language again, I will shove the code so far up your a**, the "++" in C++ are comming out of your nostrils. And if you are wise, you wouldn't call GeoSoft clueless cause he was a Microsoft MVP. And that ain't given easily. I'd watch out what you talk to him. He knows more than you obviously think.

Link to comment
Share on other sites

So, what you're basically saying is AutoIt is a suckass language and can't do shit other than make GUI bound controls.

I think you need to calm down, and watch what you say. Otherwise I'll put you on time-out.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

So, what you're basically saying is AutoIt is a suckass language and can't do shit other than make GUI bound controls.

Why would anybody want to help this idiot?

He obviously has no clue what he is talking about.

Also, if you have already done it in C++ why would you want to re do it in AutoIt?

For the record: Berts script does what you want, but it still does not move the ctrl off the client area, it just moves a transparent client area around

Edited by danwilli
Link to comment
Share on other sites

Fraid you gotta work that one yourself. I refuse to help you. If you wish to move to another language, that is totally fine with me and many other people. Now go run along now.

Link to comment
Share on other sites

Hi all,

Firstly I have to mention that I am very new to programming, but have been able to make slow progress by searching the help file in AutoIt and these forums. Generally I have achieved my goal, but have a now arrived at a situation where I am completely lost.

I have been using a portion of the code posted by Bert in Post #11 of this topic, and all was well on my desktop computer using v3.2.8.1. However I decided to also use the program on my laptop to be able to work away from home.

Herein lies my problem. I have installed the latest version v3.2.10.0 and in line with the recommendation in the "History' have changed from using GUIConstants.au3 to GUIConstantsEx.au3. This change has caused some major changes to the output of the script.

I simply do not know what needs to be changed in the script beyond Declaring Variables and would appreciate it, if somebody could show me how the script in Berts post #11 should be changed to work using GUIConstantsEx.au3.

This is my first post in these forums and I apologise if I have done anything incorrectly.

In anticipation,

Thankyou

Clickhere

Link to comment
Share on other sites

That's the problem with upgrading to the lastest so called "greatest" version. You're screwed if you have a big script.

Not if you know what your doing.

Constant files are not going to be a big factor in big scripts, just figure out which includes need to be added is all. If not already, it will be explained in the help file.

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $gui, $pic, $picPos, $guiPos, $msg

$gui = GUICreate("test transparentpic", 200, 100)
$pic = GUICreate("", 68, 71, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui)
GUICtrlCreatePic(@SystemDir & "\oobe\images\merlin.gif", 0, 0, 0, 0)

GUISetState(@SW_SHOW, $pic)
GUISetState(@SW_SHOW, $gui)

HotKeySet("{ESC}", "main")
HotKeySet("{LEFT}", "left")
HotKeySet("{RIGHT}", "right")
HotKeySet("{DOWN}", "down")
HotKeySet("{UP}", "up")
$picPos = WinGetPos($pic)
$guiPos = WinGetPos($gui)

Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
Exit

Func main()
    $guiPos = WinGetPos($gui)
    WinMove($gui, "", $guiPos[0] + 10, $guiPos[1] + 10)
EndFunc   ;==>main

Func left()
    $picPos = WinGetPos($pic)
    WinMove($pic, "", $picPos[0] - 10, $picPos[1])
EndFunc   ;==>left

Func right()
    $picPos = WinGetPos($pic)
    WinMove($pic, "", $picPos[0] + 10, $picPos[1])
EndFunc   ;==>right

Func down()
    $picPos = WinGetPos($pic)
    WinMove($pic, "", $picPos[0], $picPos[1] + 10)
EndFunc   ;==>down

Func up()
    $picPos = WinGetPos($pic)
    WinMove($pic, "", $picPos[0], $picPos[1] - 10)
EndFunc   ;==>up

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

When I minimize the main GUI that merlin is in, merlin is minimized also. How can I stop this? And what when I close the GUI it is merlin is closed also. How can I keep merlin from being minimized or destroyed when the GUI that merlin starts out in is?

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...