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 

If you activate 2 scripts..

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





PostPosted: Thu Oct 29, 2009 1:30 am    Post subject: If you activate 2 scripts.. Reply with quote

If you activate 2 different scripts, will they effect each other?

Ex:
t::
Loop
{
Send {F3}
Sleep 1000
}
y::
Loop
{
Send {F10}
Sleep 10000
}
return

Will the 2 sleeps effect each other if both scripts are activated?
Back to top
mstorey20



Joined: 21 Sep 2009
Posts: 10

PostPosted: Thu Oct 29, 2009 1:54 am    Post subject: Reply with quote

As written the first loop exits when you begin the second and vise versa.

Code:

IfWinExist Untitled - Notepad
{
   WinActivate
}
else
{
   Run Notepad
       WinWait Untitled - Notepad
      WinActivate
}
Sleep 1000

#t::
Loop
{
Send t
Sleep 1000
}
#y::
Loop
{
Send y
Sleep 500
}
return


Easy test code to see what happens
_________________
StoreyQuickNotes - An AutoHotkey Project for Radiation Oncology
Back to top
View user's profile Send private message
Mhh
Guest





PostPosted: Thu Oct 29, 2009 2:06 am    Post subject: Reply with quote

So 2 scripts can't be running at the same time?
Back to top
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Thu Oct 29, 2009 2:27 am    Post subject: Re: If you activate 2 scripts.. Reply with quote

Mhh wrote:
If you activate 2 different scripts

He means 2 different AHK script files.
You can test just like I did:
Code:
; SCRIPT 1
Loop
  traytip,, %A_INDEX%

Code:
; SCRIPT 2
Loop
  tooltip, %A_INDEX%

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
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