Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:38

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Unfocus current active window

Discussion on Unfocus current active window within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
Unfocus current active window

Is there anyway to unfocus the currenct active window?
fuso98 is offline  
Old 09/19/2014, 16:05   #2
 
elite*gold: 15
Join Date: Aug 2012
Posts: 3,041
Received Thanks: 6,397
Can you explain "why" do you want to do it? A little detail like "I want to do X so I need to unfocus a window" would help.
berkay2578 is offline  
Old 09/19/2014, 23:18   #3
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
focus get lost with a click on taskbar

Quote:
Originally Posted by berkay2578 View Post
Can you explain "why" do you want to do it? A little detail like "I want to do X so I need to unfocus a window" would help.
why would that help?
YatoDev is offline  
Old 09/20/2014, 00:23   #4
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
butter123 is offline  
Old 09/20/2014, 08:27   #5
 
elite*gold: 15
Join Date: Aug 2012
Posts: 3,041
Received Thanks: 6,397
Quote:
Originally Posted by »FlutterShy™ View Post
why would that help?
Well firstly, making a window lose focus sounds really useless and unnecessary.
Secondly, I need to know what OP's goal is, so that I can assist him better. Not everyone thinks the same, you may not need to know this but I do, so don't go all hazin' on me.
berkay2578 is offline  
Old 09/20/2014, 10:44   #6
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Set the focus to the desktop:
Code:
WinActivate(_WinAPI_GetDesktopWindow())
KDeluxe is offline  
Old 09/22/2014, 14:50   #7
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
I want to make a bakground bot and i make a window trasparent and with control click i click on this window. But if the window where i send click is hidden and i'm writing on another window when i call controlclick the window where i'm writing lose the focus.

For clicking on the hidden window i want to try something like

func Mouseclick_BG($x,$y)
controlclick(....)
;Unfocus the hidden window
endfunc
fuso98 is offline  
Old 09/22/2014, 16:50   #8
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
ControlClick() doesn't focus the window. Are you sure that ControlClick() triggers the problem (it might be a bug)?
It should be possible to 'restore' the focus by focusing the second top window:
Code:
;~ ControlClick()
$windows = WinList()
If $windows[0][0] > 1 Then WinActivate($windows[2][1])
KDeluxe is offline  
Old 09/22/2014, 20:18   #9
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
forget that its to slow. already tryed it and i produce faster code than you^^

@SW_HIDE ?
YatoDev is offline  
Old 09/24/2014, 13:39   #10
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
Quote:
Originally Posted by KDeluxe View Post
ControlClick() doesn't focus the window. Are you sure that ControlClick() triggers the problem (it might be a bug)?
It should be possible to 'restore' the focus by focusing the second top window:
Code:
;~ ControlClick()
$windows = WinList()
If $windows[0][0] > 1 Then WinActivate($windows[2][1])
It is too slow, for a click i need like 500ms
Quote:
Originally Posted by »FlutterShy™ View Post
forget that its to slow. already tryed it and i produce faster code than you^^

@SW_HIDE ?
If i hide the window control click will not work anymore, and i can't take a snapshot too.
fuso98 is offline  
Old 09/24/2014, 20:26   #11
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
move window out of screen like every other background api
YatoDev is offline  
Old 09/25/2014, 17:09   #12
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
I use FastFind to get a screen, and if the widnow is trasparent i can take the screenshot with outscreen window i got black screen.
fuso98 is offline  
Old 09/26/2014, 14:31   #13
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
Quote:
Originally Posted by fuso98 View Post
I use FastFind to get a screen, and if the widnow is trasparent i can take the screenshot with outscreen window i got black screen.
it doesnt make sense to use fastfind. GDI+ or the build in AutoIt _ScreenShot function is better
YatoDev is offline  
Old 09/27/2014, 13:53   #14
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
I've tryed them, and i got always black screen + it's terrible slow
fuso98 is offline  
Old 09/28/2014, 00:53   #15
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
if you cant do it by yourself decompile all that background bots
YatoDev is offline  
Reply


Similar Threads Similar Threads
Most current, active server...?
08/11/2013 - SRO Private Server - 4 Replies
I uninstalled Windows from my Mac for a while, but I'm bored and got a little spare time on my hands. The times have changed since there were just a handful of servers too download. So I'm coming too you guys for help, since it seems every server I download has virtually no community. I typically enjoy 110 cap or less, but I will settle for anything that has an active community. ...Any recommendations?
Current Window Name
11/17/2012 - C/C++ - 3 Replies
Ja hallo. Also: Ich suche eine Funktion in ANSI-C die mir den Namen des aktuellen Fensters zurückgibt. Hab alle SuFus vergewaltigt, aber ohne Erfolg.. Hoffe auf Rückmeldung LG Lapis :mofo:
Keep SRO active while window is inactive?
05/28/2012 - Silkroad Online - 0 Replies
I remember I used to have this happen - that I could open up 2 windows side by side, one SRO, other a browser, for example. And while I surfed in the browser the SRO window would be inactive but picture would still keep moving so I could watch my bot do the work or keep an eye on the chat window. But now when I click on any other window the SRO window will freeze : \ Anyone know how to avoid that?
Send and UseSkill to the not active window
07/04/2011 - PW Hacks, Bots, Cheats, Exploits - 3 Replies
how do it? I can send to active window only. I try to use autoit, but that did not work Dim Au3 As New AutoItX3Lib.AutoItX3 Dim hWnd As Integer= FindWindow("ElementClient Window", Nothing) Au3.ControlSend("", "", "", "{F1}") I also tried using PostMessage,it does not work Dim hWnd As Integer= FindWindow("ElementClient Window", Nothing)
must active on client window to use bot ?
08/29/2010 - Perfect World - 78 Replies
Today PW Indo just got tideborn patch. Everything works fine, except now to use skill by using controlsend in autoit, the client window must be the active window or the bot can't send attack keys to it and it's just do nothing unless I switched back to this client window, zzzzzzzzz that's kinda defeat the purpose of having a bot running, it's supposed to be working in the background while we can use the computer for something else like browsing or watching movies :( does anyone playing PW in...



All times are GMT +1. The time now is 04:38.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.