--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "tom_and_kate" <tom_and_kate@> 
> wrote:
> >
> > Hello : Wondering if there's a way to toggle a scheduled event. I 
> have 
> > little scripting skills. I'd like to create a button that could 
> toggle 
> > my history eraser when I browse, then toggle off when done. The 
event 
> > currently runs every 10min, but I often forget to disable it when 
> done. 
> > PP is great. I'm learning. (slowly)
> > Thanks
> 
> If you only want the event to run when your browser is active, and 
> supposing the exename of your browser is iexplore, then change the 
> scheduled event command entry controls as follows
> 
> enter command:  if (anywindow("=iexplore"))
> More commands
> "c:/run/your/history_eraser.exe"
> 
> This says to run the history eraser only if the there is an active 
> window on your system from the iexplore program.
> 
> YOu can also do this with a button for manual control by using a 
global 
> variable which is set by the button and checked by the command.
> 
> 1.  Best practice is to declare the variable in a scheduled event 
set 
> to run at PowerPro startup.  Create a new schedule event, type 
startup
> 
> enter command:   global g_doErase = 1
> 
> 
> 2.  Change the scheduled event you are now running every 10 minutes
> 
> command name:  if (g_doErase)
> More commands
> "c:/run/your/history_eraser.exe"
> 
> 3.  Add the button command (or use a hot key etc):
> 
> enter command:  g_doErase = not g_doErase
> 
> 
> If you like, set the item label of the button to display status:
> *info expr(if(g_doErase,"on", "off"))
> Do this label setting last after everything is working as if you 
make a 
> typing error you will get lots of error messages.
>
================================

   Thanks -(direct response from the AUTHOR, I'm impressed & grateful)
 I chose your first solution - it worked perfectly. It's about 
precise automation, for me. Thanks again for the rapid response. 
   Even more important then simplifying my computing, your program 
has refreshed my brain pan by making me relearn how to think 
logically as I learn to use PowerPro. 

Regards,
  Tom


Reply via email to