Jump to content

Run Program B only if Program A is called to run


cksedg
Go to solution Solved by oberkc,

Recommended Posts

Posted

I have a program (let's call it Program A) which I want to run ONLY if Program B is called to run first.

Program A should run immediately when Program B is called to run.  Program B will only be called to run manually (no IF statements).

Can anyone help me?  What do I put in Program A to verify Program B has/is run before Program A starts.

Hope that all made sense!  Thanks.

Posted

Yes, I have done this, but then program A runs WITHOUT program B, also, because program A is set to run at a specific time.  I only want program A to run WITH or immediately AFTER program B.

Thanks for your input. 

Posted (edited)
5 hours ago, cksedg said:

because program A is set to run at a specific time.  I only want program A to run WITH or immediately AFTER program B.

Then why do you have a run time in program A?

You need to clearly list all of your requirements to get help. Right now we are guessing at what you want.

It also helps to post both programs by right clicking on program and selecting copy to clipboard at the bottom of the list. Paste the results here.

Edited by DennisC
Added more info
Posted
Yes, I have done this, but then program A runs WITHOUT program B, also, because program A is set to run at a specific time.  I only want program A to run WITH or immediately AFTER program B.
Thanks for your input. 

As stated by others, we need more but…

Program A can have an If for the time and be disabled. B could run the If of A.
  • Like 1
Posted
12 hours ago, cksedg said:

I have a program (let's call it Program A) which I want to run ONLY if Program B is called to run first.

Program A should run immediately when Program B is called to run.  Program B will only be called to run manually (no IF statements).

Can anyone help me?  What do I put in Program A to verify Program B has/is run before Program A starts.

Hope that all made sense!  Thanks.

So here is what i have so far from what you've said:

Program A

IF

THEN

ELSE

Program B

IF
    (none)
THEN

ELSE

9 hours ago, cksedg said:

Yes, I have done this, but then program A runs WITHOUT program B, also, because program A is set to run at a specific time.  I only want program A to run WITH or immediately AFTER program B.

Thanks for your input. 

2 new pieces of information, so:

Program A

IF
     Time is 1:11:11 AM
THEN

ELSE

Program B

IF
    (none)
THEN
    Run Program A
ELSE

 

So really no clue what you're trying to do?  the answer might be Disable Program A (disabled programs still run when run manually or are run by another program).

--or-- the answer might be to combine all this into one program?

--or-- maybe you want A to run that the Specific Time, so leave it enabled but have Program B run the THEN block of program A instead of the IF block.

--or-- there might be a better way entirely... please post the programs by right clicking their names, Selecting the last item COPY TO CLIPBOARD and then pasting it into a forum message.

  • Like 2
Posted

Thanks so much for your help!  I didn't realize a program could be disabled and still be called for and run from another program.  Disabling Program A did the trick!

Thanks again.

Posted (edited)
12 hours ago, cksedg said:

Thanks so much for your help!  I didn't realize a program could be disabled and still be called for and run from another program.  Disabling Program A did the trick!

Thanks again.

The disable only disables the triggers from the IF section. However the conditions still work, selecting Then or Else to run, if the program (IF)  is called as a subroutine from another program or manually from the menus.

I like to comment the IF section with "Disabled" as when some updates are done the Enable/Disable status has often been lost and you have to recereate and analyse the whole set of programs to figure out if the program should be disabled or not.


Document...document...document. ISY has various commenting styles built in for different program sections.

Edited by larryllix
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...