James Posted February 21, 2007 Author Share Posted February 21, 2007 Thanks John. I am hoping to make it into a UDF once it all works (now that I understand roughly how to do it). Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 This might be what you want. The "meat" is immediately below followed by it in context. $pos = WinGetPos("Untitled - Notepad") $x = $pos[0] + $pos[2] - 200 $y = $pos[1] +5 $w = $pos[2] $h = $pos[3] MsgBox(0, "Active window stats (x,y,width,height):", $pos[0] & " " & $pos[1] & " " & $pos[2] & " " & $pos[3]) WinSetOnTop($sGUI, "", 1) WinMove("WinBar App", "", $x, $y) oÝ÷ Ù«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì(9½QÉå%½¸((((ÀÌØíÍU$ôÕ¥ ÉÑ ÅÕ½Ðí]¥¹ ÈÁÀÅÕ½Ðì°ÄÀÀ°ÈÀ°ÄÀÀ°ÄÀÀ° ¥Ñ=H ÀÌØí]M}A=AU@°ÀÌØí]M}a}Q=A5=MP¤°ÀÌØí]M}a}Q==1]%9=¤(ÀÌØíÍ%¹ÁÕÐôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°´Ä°´Ä°ÄÀÈ°ÈȤ()Õ¥MÑMÑÑ ¤()]¡¥±Ä(]¥¹¥à ¤(ÀÌØí¹5ÍôU%Ñ5Í ¤(MÝ¥Ñ ÀÌØí¹5Í( ÍÀÌØíU%}Y9Q} 1=M(á¥Ð( ÍÀÌØíÍ%¹ÁÕÐ(ÀÌØíÍIôÕ¥ ÑɱI ÀÌØíÍ%¹ÁÕФ(Q½¼ ¤(¹MÝ¥Ñ )]¹()Õ¹]¥¹¥à ¤($ÀÌØíÁ½Ìô]¥¹ÑA½Ì ÅÕ½ÐíU¹Ñ¥Ñ±´9½ÑÁÅÕ½Ðì¤($ÀÌØíàôÀÌØíÁ½ÍlÁt¬ÀÌØíÁ½ÍlÉt´ÈÀÀ($ÀÌØíäôÀÌØíÁ½ÍlÅt¬Ô($ÀÌØíÜôÀÌØíÁ½ÍlÉt($ÀÌØí ôÀÌØíÁ½ÍlÍt(%5Í ½à À°ÅÕ½ÐíÑ¥ÙÝ¥¹½ÜÍÑÑÌ¡à±ä±Ý¥Ñ ±¡¥¡Ð¤èÅÕ½Ðì°ÀÌØíÁ½ÍlÁtµÀìÅÕ½ÐìÅÕ½ÐìµÀìÀÌØíÁ½ÍlÅtµÀìÅÕ½ÐìÅÕ½ÐìµÀìÀÌØíÁ½ÍlÉtµÀìÅÕ½ÐìÅÕ½ÐìµÀìÀÌØíÁ½ÍlÍt¤(%]¥¹MÑ=¹Q½À ÀÌØíÍU$°ÅÕ½ÐìÅÕ½Ðì°Ä¤(%]¥¹5½Ù ÅÕ½Ðí]¥¹ ÈÁÀÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíà°ÀÌØíä¤(í%ÍѽÁ!¥¡ÐôÄÀÈÐQ¡¸]¥¹5½Ù ÀÌØíÍU$°ÅÕ½ÐìÅÕ½Ðì°ÍѽÁ!¥¡Ð¼ÄÜÀ°ÍѽÁ]¥Ñ ¼È¬ÌÈÀ¤)¹Õ¹()Õ¹Q½¼ ¤(%ÀÌØíÍIôÅÕ½Ðí¡±ÀÅÕ½ÐìQ¡¸5Í ½à À°ÅÕ½Ðí!±ÀÅÕ½Ðì°ÅÕ½Ðíe½Ô¹¡±ÀüÅÕ½Ðì¤(%ÀÌØíÍIôÅÕ½Ðí±½°ÅÕ½ÐìQ¡¸5Í ½à À°ÅÕ½Ðí1½°üÅÕ½Ðì°ÅÕ½Ðí]¡äÉå½Ô±Õ¡¥¹ÅÕ½Ðì¤)¹Õ¹ A decision is a powerful thing Link to comment Share on other sites More sharing options...
James Posted February 21, 2007 Author Share Posted February 21, 2007 Hmm.. That doesn't work for the Win Bar App. C:\Documents and Settings\James\My Documents\AutoIT Stuff\BorderlessGUI.au3 (25) : ==> Subscript used with non-Array variable.: $x = $pos[0] + $pos[2] - 200 $x = $pos^ ERROR About BetaPad.. If you post on the Topic, Razer should help you.. I don't know why its that big minus numbers. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 In the example, I put the searchbar on top of Notepad. Notepad must be open for WinPos to retrieve and build the array appropriately. Did you try opening Notepad? If you did let me know and we'll take another look A decision is a powerful thing Link to comment Share on other sites More sharing options...
James Posted February 21, 2007 Author Share Posted February 21, 2007 (edited) Ahh.. I get it now. Yes Notepad was open. But the message box kept coming up, so I couldn't see it.Edit: OK, so I worked it out. Now, I need to get the box only to move when the screen resolution changes. Edited February 21, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 Wonderful. I hope that helps out A decision is a powerful thing Link to comment Share on other sites More sharing options...
James Posted February 21, 2007 Author Share Posted February 21, 2007 #include <GuiConstants.au3> #NoTrayIcon $sGUI = GuiCreate("WinBar App", 100, 20, -1, -1, BitOR($WS_POPUP, $WS_EX_TOPMOST),$WS_EX_TOOLWINDOW) $sInput = GUICtrlCreateInput("", -1, -1, 102, 22) GUICtrlSetLimit($sInput, 20) GuiSetState() WinSetOnTop($sGUI, "", 1) While 1 _WinMoveFix() $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $sInput $sRead = GuiCtrlRead($sInput) ToDo() EndSwitch Wend Func ToDo() If $sRead = "help" Then MsgBox(0, "Help", "You need help?") If $sRead = "notepad" Then Run("notepad.exe") EndFunc Func _WinMoveFix() $pos = WinGetPos($sGUI) $x = $pos[0] + $pos[2] - 200 $y = $pos[1] + 5 $w = $pos[2] $h = $pos[3] WinSetOnTop($sGUI, "", 1) WinMove($sGUI, "", $x, $y) EndFunc Now it just dissapears! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 $pos = WinGetPos($sGUI) WinMove($sGUI) This means you're asking for the cors and dimensions of $sGUI and then Moving it to that place, which is confusing. WinGetPos needs the name of a window that already exists. WinMove is going to move $sGUI to whatever array positions you give it, which are defined by WinGetPos. Short answer $pos = WinGetPos("use a different window here like BetaPad") <------ WinMove($sGUI) A decision is a powerful thing Link to comment Share on other sites More sharing options...
James Posted February 21, 2007 Author Share Posted February 21, 2007 (edited) So I have to use another application to make it fit.. Right, I have to find out how to make it on the desktop. Or as it is for BetaPad, I can use BetaPad like you said.Edit: Forgot to say Thankyou. Thankyou! Edited February 21, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Shevilie Posted February 21, 2007 Share Posted February 21, 2007 Argh I give up Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 Sheville I what are you referring to?Secure, have you seen this http://www.autoitscript.com/forum/index.php?showtopic=9517 ? A decision is a powerful thing Link to comment Share on other sites More sharing options...
Shevilie Posted February 21, 2007 Share Posted February 21, 2007 Nope.... This http://www.autoitscript.com/forum/index.php?showtopic=41489(Saves me a lot of typing) Thx Smoke Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 Shevilie, I'm confused. My bad, but what are you referring to? I just got lost in this thread for some reason. I read the thread you posted, but I don't understand what you were saying. Sorry. Any clarification is much appreciated. You're probably trying to say something important, but I'm just lost. Get me back on track captin A decision is a powerful thing Link to comment Share on other sites More sharing options...
Shevilie Posted February 21, 2007 Share Posted February 21, 2007 (edited) You really should quit bouncing around ... starting new threads ... and answering questions (not so correctly I might add) when you have questions of your own that you have others doing the work for you on! That's a total lack of respect for those that have given you a hand (more like gave you the code).And yep its importantJust have a look throug h the different topics here and you would understand http://www.autoitscript.com/forum/index.php?showuser=18298 Edited February 21, 2007 by Shevilie Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
JohnBailey Posted February 21, 2007 Share Posted February 21, 2007 oh! Gotcha. I looked through it Now I'm following thanks for the clarification A decision is a powerful thing Link to comment Share on other sites More sharing options...
Shevilie Posted February 21, 2007 Share Posted February 21, 2007 Np Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit 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