AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hide window befor it pops up

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Leonidas225



Joined: 30 Jan 2009
Posts: 12

PostPosted: Fri Mar 27, 2009 10:53 am    Post subject: Hide window befor it pops up Reply with quote

Is it possible to open a window an hide it immediately before it pops up?

Code:
ControlClick, OpenWin2Button, Win1
;;Window pops up for a sec
WinHide,  Win2
Sleep, 3000
WinShow,  Win2


2nd question:
can i somehow click a button in a hidden window?

Code:
WinHide, Win1
ControlClick, OpenWin2Button, Win1
WinHide,  Win2
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Fri Mar 27, 2009 12:52 pm    Post subject: Reply with quote

Quote:
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
or
Gui,Show,Hide

Reg. 2nd one, I think all you need to add is:
Code:
DetectHiddenWindows,On
ControlClick, OpenWin2Button, Win1

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Apr 02, 2009 4:49 pm    Post subject: Reply with quote

Quote:
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
or
Gui,Show,Hide


Unfortuneatly it wont work becouse the application has a login window and as it pops up the program unhide itself.
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Thu Apr 02, 2009 6:51 pm    Post subject: Reply with quote

Then try to loop after Run:
Code:

Run,...
If ErrorLevel
 ...
Loop
{
 WinHide, your window
 IfWinExist, your window
  break
}
;Program started and window is hidden

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Apr 02, 2009 10:26 pm    Post subject: Reply with quote

i guess it wont solve my problem.If i hide the window and send a message to it to open a window, the child will be visible. is there any solution to open a window without it being drawn even for a millisec?
Back to top
Lighthouse



Joined: 12 Jan 2009
Posts: 55
Location: Southern Ca, USA

PostPosted: Thu Apr 02, 2009 10:32 pm    Post subject: Reply with quote

yes you can, but it won't block access you said
Quote:
Unfortuneatly it wont work becouse the application has a login window and as it pops up the program unhide itself.
Because the application reactivates itself you will still see a slight glimpse of it, before you loop/hide it.
You are still able to hide the window when it is first run by:
Code:
Run, (the window name), Hide
as mentioned above by HotKeyIt
Back to top
View user's profile Send private message
Pasdoy
Guest





PostPosted: Sun May 17, 2009 5:53 am    Post subject: Reply with quote

Bringing old topic but well. I want to do this :

Code:
Run, iexplore.exe http://www.google.ca, Hide


Then stay hided for 20-30 sec ramdomly and kill the process.

I tried lot of things but I am stuck at the hide part,

Anyway to leave it hide ?
Back to top
manual.reader
Guest





PostPosted: Sun May 17, 2009 10:10 am    Post subject: Reply with quote

Pasdoy wrote:
Bringing old topic but well. I want to do this :

Code:
Run, iexplore.exe http://www.google.ca, Hide


Then stay hided for 20-30 sec ramdomly and kill the process.

I tried lot of things but I am stuck at the hide part,

Anyway to leave it hide ?

Pay attention to the jotts and tiddles in the help file
Quote:
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
Code:
Run, iexplore.exe http://www.google.ca,  ,Hide
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group