Sign in to follow this  
Followers 0
shiv

How to execute scripts in sequence

6 posts in this topic

Hi All,

I am executing  two scripts one after the other.

1. In script 1 i am activating the add-on. when runs independently to 2nd script.

2. In 2nd script also it is need to activate the add-on. when runs independently to 1st script.

Now issue is that when running two scripts simultaneously what happend

steps:

1.when script 1 will run it will activate the add-on.

2. now script 2 will run but it will be aborted because i have also used a function in this script to activate the add-on when it is run independently.

so what i want is that when script 1 is completed and script 2 is started it do not use the activation credentials of script 1.

i have also used the exit command in script so that after completion script gets exit and script 2 start with all new events

please suggest what should i do

 

Share this post


Link to post
Share on other sites



Both the scripts perform different scenarios but activation function is required in both the scripts to achieved the desired result when run independently

Share this post


Link to post
Share on other sites

These too:

HotKeySet("{F5}", "_f5") ;Scenario 1
HotKeySet("{F6}", "_f6") ;Scenario 2

Run("notepad.exe") ; to test
WinSetState("[CLASS:Notepad]", "", @SW_HIDE)

While 1
    Sleep(28800)
WEnd

;F5 Scenario 1
Func _f5()

        WinSetState("[CLASS:Notepad]", "", @SW_MAXIMIZE)

EndFunc

;F6 Scenario 2
Func _f6()

        WinSetState("[CLASS:Notepad]", "", @SW_MINIMIZE)

EndFunc

Share this post


Link to post
Share on other sites

Thanks

Share this post


Link to post
Share on other sites

ProcessWaitClose()
?


If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0