hot202 Posted January 15, 2010 Share Posted January 15, 2010 hi how do u make a Gui hide out the screen and when u move the mouce to the right the gui slides out? Link to comment Share on other sites More sharing options...
martin Posted January 15, 2010 Share Posted January 15, 2010 hi how do u make a Gui hide out the screen and when u move the mouce to the right the gui slides out?Look up MouseGetPos and WinMove. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
hot202 Posted January 15, 2010 Author Share Posted January 15, 2010 ok thanks im not really sure how to put this together. Is there any examples? Link to comment Share on other sites More sharing options...
JohnOne Posted January 15, 2010 Share Posted January 15, 2010 Heres a crude little example to get you going. There will be more fancy ways, after you look into it. #include <GuiconstantsEx.au3> HotKeySet("{ESC}", "_Exit") $hGUI = GUICreate("Window", 200, 200, @DesktopWidth, -1) GUISetBkColor(0xF0F0F0, $hGUI) GUISetState() While 1 Sleep(20) $x = MouseGetPos() If $x[0] >= @DesktopWidth -1 Then Winmove($hGUI,"",@DesktopWidth - 200, (@DesktopHeight / 2) - 100) Endif WEnd Func _Exit() Exit EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
hot202 Posted January 16, 2010 Author Share Posted January 16, 2010 (edited) sweet thats what i kinda worked out just abit better then i had. but how do i make it move bak when i move the mouse of the gui Edited January 16, 2010 by hot202 Link to comment Share on other sites More sharing options...
JohnOne Posted January 16, 2010 Share Posted January 16, 2010 Basically the same way mate. Look at WinGetPos() to get the position of the gui. MouseGetPos() again to check if it moves out of it. And WinMove() agian to put it back. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
hot202 Posted January 16, 2010 Author Share Posted January 16, 2010 r there any examples of this i cant really get it working Link to comment Share on other sites More sharing options...
BrettF Posted January 16, 2010 Share Posted January 16, 2010 There are many in example scripts... Search for them... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
hot202 Posted January 16, 2010 Author Share Posted January 16, 2010 what do i search tho i have scarched heaps of things i dont know what its called when the window hides out the screen Link to comment Share on other sites More sharing options...
BrettF Posted January 16, 2010 Share Posted January 16, 2010 Third result for me... http://www.autoitscript.com/forum/index.php?showtopic=25790&hl=Dock%20window%20hide%20&st=0 Should give you a starting point. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
hot202 Posted January 16, 2010 Author Share Posted January 16, 2010 i been playing around and i have this script. The only problem is that when u move your mouse away from the right abit the gui slides away even if your mouse is still on the gui. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $GUI = GUICreate("Window Slide In", 300, 300, @DesktopWidth - 1, @DesktopHeight - 320, $WS_POPUP) GUICtrlCreateButton("Button Test", 0, -1) GUISetState() $WPos = WinGetPos($GUI) While 1 Sleep(100) $MPos = MouseGetPos() If ($MPos[0] >= $WPos[0]) And ($MPos[0] <= ($WPos[0] + $WPos[2])) And _ ($MPos[1] >= $WPos[1]) And ($MPos[1] <= ($WPos[1] + $WPos[3])) Then WinMove($GUI, "", @DesktopWidth - 300, @DesktopHeight - 320, 300, 300, 3) ElseIf ($MPos[0] < $WPos[0]) Or ($MPos[0] > ($WPos[0] + $WPos[2])) Or _ ($MPos[1] < $WPos[1]) Or ($MPos[1] > ($WPos[1] + $WPos[3])) Then WinMove($GUI, "", @DesktopWidth - 1, @DesktopHeight - 320, 300, 300, 3) EndIf If GUIGetMsg() = -3 Then Exit WEnd Link to comment Share on other sites More sharing options...
BrettF Posted January 16, 2010 Share Posted January 16, 2010 GUIGetCursorInfo? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
hot202 Posted January 20, 2010 Author Share Posted January 20, 2010 ok thanks. I now have a new problem i have made it slide out but when i put picture ans a input on the gui when it slides out the pic and input flash blank for a sec then they come bak is there anyway to fix that? Or is there abetter way to do it? Thanks guys. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> $GUI = GUICreate("Window Slide In", 338, 258, @DesktopWidth - 1, @DesktopHeight - 320, $WS_POPUP) WinSetOnTop($GUI,"",1) $Input1 = GUICtrlCreateInput("Test", 72, 125, 185, 21) $n = GUICtrlCreatePic(@ScriptDir & "\Background.bmp", 0, 0, 338, 258, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetState() $WPos = WinGetPos($GUI) While 1 Sleep(100) $MPos = MouseGetPos() If ($MPos[0] >= $WPos[0]) And ($MPos[0] <= ($WPos[0] + $WPos[2])) And _ ($MPos[1] >= $WPos[1]) And ($MPos[1] <= ($WPos[1] + $WPos[3])) Then WinMove($GUI, "", @DesktopWidth - 338, @DesktopHeight - 320, 338, 258, 3) ElseIf ($MPos[0] < $WPos[0] - 300) Or ($MPos[0] > ($WPos[0] + $WPos[2])) Or _ ($MPos[1] < $WPos[1]) Or ($MPos[1] > ($WPos[1] + $WPos[3])) Then WinMove($GUI, "", @DesktopWidth - 1, @DesktopHeight - 320, 338, 258, 3) EndIf If GUIGetMsg() = -3 Then Exit WEnd Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now