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 

IE/mozilla script but i want to run background

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



Joined: 15 Oct 2007
Posts: 9

PostPosted: Thu Apr 24, 2008 1:18 am    Post subject: IE/mozilla script but i want to run background Reply with quote

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
View user's profile Send private message
CraSH23000



Joined: 22 Jun 2007
Posts: 38

PostPosted: Thu Apr 24, 2008 2:05 am    Post subject: ControlSend Reply with quote

You might want to think about using ControlSend
_________________
What is real in our infinitely alternating perception of reality?
Back to top
View user's profile Send private message
Mkbailey755



Joined: 20 Aug 2007
Posts: 178

PostPosted: Thu Apr 24, 2008 2:43 am    Post subject: Reply with quote

aswell as detect hidden windowshttp://www.autohotkey.com/docs/commands/DetectHiddenWindows.htm
Back to top
View user's profile Send private message
SomeGuy



Joined: 21 Apr 2008
Posts: 96
Location: somewhere

PostPosted: Thu Apr 24, 2008 3:08 am    Post subject: Reply with quote

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
View user's profile Send private message
alcalina



Joined: 15 Oct 2007
Posts: 9

PostPosted: Thu Apr 24, 2008 5:19 pm    Post subject: Reply with quote

tks SomeGuy
Its perfect and work VERY fine
tks again
Back to top
View user's profile Send private message
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