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 

Help with Transparent command, I think

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ProgNewbie
Guest





PostPosted: Tue Nov 27, 2007 1:38 pm    Post subject: Help with Transparent command, I think Reply with quote

I'm extremely green when it comes to programming but I found this program a couple weeks back and think it is great for what I am needing to accomplish. I am using it to record keystrokes and mouse clicks to automate a process, for which it is doing great. I have had a request for something that re I am not sure if it can be done or not so I need some help. The process that gets automated has 2 windows that it switches back and forth from. The main window displays all of the information needed and 2 fields are copied and pasted to the other window. Is it possible to keep the second window hidden but still process the keystrokes and mouse clicks in it? In short I would like to know if it is possible to keep the first window always on top even though information is being inputted into the second window? I read about the transparent command but I'm not clear on how it really works or if it is what I am looking for. If anyone could clarify this for me I would really appreciate it.

Thanks,
Travis
Back to top
Ripper



Joined: 24 Oct 2007
Posts: 17
Location: Germany

PostPosted: Tue Nov 27, 2007 3:49 pm    Post subject: Reply with quote

Wrong section

And a Screenshot is very usefull
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Nov 27, 2007 6:03 pm    Post subject: Reply with quote

you are looking for ControlSend and ControlClick, but it depends on your target program.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
ProgNewbie
Guest





PostPosted: Wed Nov 28, 2007 1:56 pm    Post subject: Reply with quote

engunneer wrote:
you are looking for ControlSend and ControlClick, but it depends on your target program.


How would these commands work for that? Like I said I am really green when it comes to this stuff so I'm not really sure how these commands really work.

I'm copying information from a webpage that are two different series of digits. I copy the first set of digits, switch windows to a Telnet App, enter a few keystrokes, paste the copied digits, enter more keystrokes, switch windows back to IE, copy second set of digits, switch to Telnet App and paste the copied digits followed by a keystroke.

What I am wanting to accomplish is to keep the windows from switching back and forth so that the end user is not seeing the windows pop open and closed. Is that possible?

Thanks,
Travis
Back to top
DeWild1



Joined: 30 Apr 2006
Posts: 163
Location: Shigle Springs

PostPosted: Fri Nov 30, 2007 6:24 pm    Post subject: Re: Help with Transparent command, I think Reply with quote

ProgNewbie wrote:
Is it possible to keep the second window hidden but still process the keystrokes and mouse clicks in it? In short I would like to know if it is possible to keep the first window always on top even though information is being inputted into the second window? I read about the transparent command but I'm not clear on how it really works or if it is what I am looking for. If anyone could clarify this for me I would really appreciate it.

Thanks,
Travis


WinMove, the name of the app window, , 1000, 1000

winminimize will not keep it active, use BlockInput, On and then your stuff, then BlockInput, off to keep them from puttng their keystokes in.
Also use WinWaitActive then do the move...
_________________
CPULOCK.com
virusSWAT.com
GuaranteedPCFIX.com
911PCFIX.com
Back to top
View user's profile Send private message Visit poster's website
ProgNewbie
Guest





PostPosted: Mon Dec 03, 2007 9:21 pm    Post subject: Re: Help with Transparent command, I think Reply with quote

DeWild1 wrote:


WinMove, the name of the app window, , 1000, 1000

winminimize will not keep it active, use BlockInput, On and then your stuff, then BlockInput, off to keep them from puttng their keystokes in.
Also use WinWaitActive then do the move...


Would the WinMove command go before or after the WinWait and WinActive commands?

Here is a snippet of my code
Code:
WinWait, Window Name - Microsoft Internet Explorer,
IfWinNotActive, Window Name - Microsoft Internet Explorer, , WinActivate, Window Name - Microsoft Internet Explorer,
WinWaitActive, Window Name - Microsoft Internet Explorer,
MouseClick, left,  498,  315
MouseClick, left,  498,  315
Sleep, 300
MouseClick, right,  498,  315
Sleep, 300
MouseClick, left,  523,  348
Sleep, 300
WinWait, ,
IfWinNotActive, , , WinActivate, ,
WinWaitActive, ,
Sleep, 300
WinWait, Program Name,
IfWinNotActive, Program Name, , WinActivate, Progame Name,
WinWaitActive, Program Name,
Send, {F7}{F7}{F7}{F7}{F7}{F7}11{ENTER}


The "Program Name" is what I want to keep hidden and keep IE on top. Would I put the WinMove in the line above,

"WinWait, ,
IfWinNotActive, , , WinActivate, ,
WinWaitActive, ,
Sleep, 300
WinWait, Program Name, " ?
Back to top
ProgNewbie
Guest





PostPosted: Tue Dec 04, 2007 3:49 pm    Post subject: Reply with quote

I tried using the WinMove command in various places but wasn't able to get it working. I put WinMove in the line before the WinWait and it did keep the program behind my other one but did not allow me to input anything in the screen. I not only need to enter key strokes but need to input mouse clicks. Am I using it in the right place or am I totally off on this?
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Dec 04, 2007 5:23 pm    Post subject: Reply with quote

if you are trying to send commands to a non active window, use ControlSend and ControlClick.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
ProgNewbie
Guest





PostPosted: Tue Dec 04, 2007 7:31 pm    Post subject: Reply with quote

engunneer wrote:
if you are trying to send commands to a non active window, use ControlSend and ControlClick.


Code:
Sleep, 300
WinWait, App Name,
ControlSend, {F7}{F7}{F7}{F7}{F7}{F7}11{ENTER}
ControlClick, right,  554,  562
Sleep, 300
ControlClick, left,  583,  589
Sleep, 500
ControlSend, {ENTER}4{ENTER}4{ENTER}


Is that what you are talking about? I've tried this and different various combinations of it and can't seem to get it to send anything to the window.
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Dec 04, 2007 7:40 pm    Post subject: Reply with quote

please read the help file for ControlSend. In short, you need to tell it where to send it.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
ProgNewbie
Guest





PostPosted: Tue Dec 04, 2007 8:39 pm    Post subject: Reply with quote

engunneer wrote:
please read the help file for ControlSend. In short, you need to tell it where to send it.


I guess be not being a programmer I'm just not getting it. I've only done limited VB stuff and that was like 8 years ago.

Here's what I've got an neither the ControlSend or ControlClick work. I'm sure I'm not even close on getting it right. The script blows up when it gets to the ControlClick line.

Code:
WinWait, App Name
ControlSend, {F7}{F7}{F7}{F7}{F7}{F7}11{ENTER}, App Name,
ControlClick, right,  x554 y562, WinTitle, App Name,
Sleep, 300
ControlClick, left,  x583 y589, WinTitle, App Name,
Sleep, 500
ControlSend, {ENTER}4{ENTER}4{ENTER}, App Name,


Sorry for the lack of knowledge, I'm trying but I'm not familiar with this programming language, or any programming language for that matter.[/code]
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Dec 04, 2007 8:57 pm    Post subject: Reply with quote

WinTitle = App Name
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
ProgNewbie
Guest





PostPosted: Tue Dec 04, 2007 9:07 pm    Post subject: Reply with quote

That didn't work. Thanks for the help but I'm going to scrap this and tell them I'm unable to do it.
Back to top
Display posts from previous:   
Post new topic   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