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 

Combine many scripts into one.

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





PostPosted: Fri Aug 22, 2008 11:21 am    Post subject: Combine many scripts into one. Reply with quote

these are my working scripts and i have far many of them.I have to open them one by one and close them one by one.How can i combine them easily so they can work in a single macro script.Or any other script adjustments welcome.



Code:

loop,
{
WinWait, Program Manager,
IfWinNotActive, Alaka , WinActivate, Alaka,

WinWait, Onay,
IfWinExist , Onay
{
send,{tab}{numpadenter}
sleep,100
MouseClick, left,  923,  706

}
}


Code:
loop,
{
WinWait, Program Manager,
IfWinNotActive, Alaka, , WinActivate, Alaka,

WinWait, Mesaj:,
IfWinExist , Mesaj:
{
send,{numpadenter}
}
}
Back to top
poo_noo



Joined: 08 Dec 2006
Posts: 137
Location: Sydney Australia

PostPosted: Fri Aug 22, 2008 11:41 am    Post subject: Reply with quote

how does this look ? Untested though
Code:
loop,
{
   WinWait, Program Manager,
   IfWinNotActive, Alaka , WinActivate, Alaka,
   WinWait, Onay,
   IfWinExist , Onay
   {
      send,{tab}{numpadenter}
      sleep,100
      MouseClick, left,  923,  706
   }
   WinWait, Mesaj:,
   IfWinExist , Mesaj:
   {
      send,{numpadenter}
   }
}

_________________
Paul O
Back to top
View user's profile Send private message Visit poster's website
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Fri Aug 22, 2008 1:42 pm    Post subject: Reply with quote

Or make a simple:

Code:
^1::#Include Path\Script1
^2::#Include Path\Script2
^3::#Include Path\Script3
^4::#Include Path\Script4
^5::#Include Path\Script5


When you close this script, they all stop. You would press CTRL+1 to run the first script, CTRL+2 for the second... e.t.c.
Back to top
View user's profile Send private message MSN Messenger
kgc
Guest





PostPosted: Mon Aug 25, 2008 8:59 am    Post subject: Reply with quote

Sivvy wrote:
Or make a simple:

Code:
^1::#Include Path\Script1
^2::#Include Path\Script2
^3::#Include Path\Script3
^4::#Include Path\Script4
^5::#Include Path\Script5


When you close this script, they all stop. You would press CTRL+1 to run the first script, CTRL+2 for the second... e.t.c.


I have applied the following code but it works randomly or not all the scripts work.But when they are open one by one it works good.how can i fix this.

Code:

#Include C:\MYAHK\script1.ahk
#Include C:\MYAHK\script2.ahk
#Include C:\MYAHK\script3.ahk
#Include C:\MYAHK\script4.ahk
#Include C:\MYAHK\script5.ahk
#Include C:\MYAHK\script6.ahk
#Include C:\MYAHK\script7.ahk
#Include C:\MYAHK\script8.ahk


kgc
Back to top
Jiashern



Joined: 09 Aug 2008
Posts: 26

PostPosted: Fri Sep 26, 2008 2:34 pm    Post subject: Reply with quote

I have tried to use the script discuss here, however when execute, some of the script might be interrupt by other and cannot function properly...

Is that anyway that each script execute themselves and does not interfere other script yet can be run using just one script?

Code:
^1::#Include Path\Script1
^2::#Include Path\Script2
^3::#Include Path\Script3
^4::#Include Path\Script4
^5::#Include Path\Script5
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Fri Sep 26, 2008 2:50 pm    Post subject: Reply with quote

On all of those lines, change the "#Include" to "Run".
Back to top
View user's profile Send private message MSN Messenger
Jiashern



Joined: 09 Aug 2008
Posts: 26

PostPosted: Mon Oct 27, 2008 2:07 am    Post subject: Reply with quote

Thanks Sivvy, I have tried to replace it with run. And now it works well together. But, here arise another challenge, there is several AH icon in the system tray, how to compile all of these AH script into just one AH icon?

Thanks again :shock:
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