cksedg Posted April 30, 2023 Posted April 30, 2023 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.
hart2hart Posted April 30, 2023 Posted April 30, 2023 I feel like I’m missing something subtle but..Have program B execute program A 1
cksedg Posted April 30, 2023 Author Posted April 30, 2023 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.
DennisC Posted April 30, 2023 Posted April 30, 2023 (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 April 30, 2023 by DennisC Added more info
hart2hart Posted April 30, 2023 Posted April 30, 2023 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. 1
DreamerI90 Posted April 30, 2023 Posted April 30, 2023 It sounds like a good use for variables, when run B sets a variable value, then A checks for it, if valid runs, and resets it. 1
MrBill Posted April 30, 2023 Posted April 30, 2023 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 ELSEProgram 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 ELSEProgram 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. 2
cksedg Posted May 1, 2023 Author Posted May 1, 2023 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.
larryllix Posted May 1, 2023 Posted May 1, 2023 (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 May 1, 2023 by larryllix
Recommended Posts