 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
alcalina
Joined: 15 Oct 2007 Posts: 9
|
Posted: Thu Apr 24, 2008 1:18 am Post subject: IE/mozilla script but i want to run background |
|
|
Hi.
I just do a very basic script for a site.
But i want to work without focus, so i can use the computer for other thing when the script runs
My program just send a sequence of keys ( left, down, up, right, enter, tab)
and end
| Code: | Sleep, 8000
Send, {DOWN}
Sleep, 8000
Send, {DOWN}
Sleep, 8000
Loop, 20
{
Send, {RIGHT}
Sleep, 8000
} |
tks for the help and patient |
|
| Back to top |
|
 |
CraSH23000
Joined: 22 Jun 2007 Posts: 38
|
Posted: Thu Apr 24, 2008 2:05 am Post subject: ControlSend |
|
|
You might want to think about using ControlSend _________________ What is real in our infinitely alternating perception of reality? |
|
| Back to top |
|
 |
Mkbailey755
Joined: 20 Aug 2007 Posts: 178
|
|
| Back to top |
|
 |
SomeGuy
Joined: 21 Apr 2008 Posts: 96 Location: somewhere
|
Posted: Thu Apr 24, 2008 3:08 am Post subject: |
|
|
for IE:
| Code: |
; Press the Windows Key and A to set the
; Window and tab you want to use.
#a::SendIEKeys()
; Press the Windows Key and S to start sending keys
#s::
loop 2 {
Sleep, 8000
SendIEKeys("{F5}")
}
Sleep, 8000
loop 20 {
SendIEKeys("{F5}")
Sleep, 8000
}
return
;Pressing escape exits
Esc::ExitApp
SendIEKeys(Keys=""){
Static hIESvr, hIESvr
If (!Keys) {
hWndIE := WinExist("A")
If (!hWndIE)
Return
WinGet, ActiveControlList, ControlListhWnd, ahk_id %hWndIE%
Loop, Parse, ActiveControlList, `n
{
WinGetClass, ThisWinClass, ahk_id %A_LoopField%
If (ThisWinClass = "Internet Explorer_Server") and (DllCall("IsWindowVisible", UInt, A_LoopField))
hIESvr := A_LoopField
}
If !hIESvr {
MsgBox, Control "Internet Explorer_Server" not found.
Return
}
}
ControlSend, ,%Keys%, ahk_id %hIESvr%
}
|
|
|
| Back to top |
|
 |
alcalina
Joined: 15 Oct 2007 Posts: 9
|
Posted: Thu Apr 24, 2008 5:19 pm Post subject: |
|
|
tks SomeGuy
Its perfect and work VERY fine
tks again |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|