Jump to content

How to execute scripts in sequence


shiv
 Share

Recommended Posts

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

 

Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...