How can I use the Offset patch for X seconds after the user starts recording? - spark-ar-studio

The runtime patch starts counting as soon as the effect is open which is not necessarily whilst the user is recording. How can I wait for 2 seconds after the user has started recording?

See the patch configuration in the link below. It turns a plane visible 2 seconds after the user has started recording.
Here's how it works:
When somebody starts recording, a 'Pulse' is sent that resets the offset timer, starting a fresh 2 second countdown.
An 'And' patch makes sure we're only responding to 2 second countdown events when the camera is recording.
screenshot: patch layout to delay 2 seconds after camera started recording

Related

Can github actions automatically open web pages?

My requirement is to automatically open a web page every 5 hours (for example: www.xxx.com, I don't need to see the content of this page, just open it). The page takes 3 minutes to load, and then just close the page.
Can I use Github Actions to achieve my requirement?
Yes, this technically possible. GitHub Actions has the on.schedule event which allows you to essentially set up a cron schedule for execution of your workflow. Your cron schedule for running the workflow every 5 hours would be something like 0 0/5 * * * (see here).
If you just want to open the webpage for 3 minutes, your workflow run step could use the && chaining the URL-opening command (xdg-open www.example.com can be used to open a URL) with a sleep 360. I leave the actual composition of the workflow file as an exercise to the reader 🙂.

Need to change URL in batch file after a timeout

Very new to batch files/scripts etc, and I need a little help with a basic script I am working on. I've made a script that opens Chrome and goes to a website, and after 15 seconds, it opens a new tab and goes to a different page on that site. I would like it to re-use the same tab, but change the URL after the 15 seconds. Then, after the sequence I'd like Chrome to close.
I've tried searching for 'changing url in batch files', and experimented with things such as leaving out 'start chrome.exe' etc, but I've been getting nowhere for the last 3 hours, so thought I would reach out for help. Ideally, I'd like to keep it all within the batch file, rather than trying to use sendkeys/hotkeys etc.
Thanks in advance (code should be below)
P.S. If I am approaching this from the complete wrong angle, please let me know and point me in the right direction :)
#echo off
start chrome.exe --new-window www.domainname.com/
timeout /t 15
start chrome.exe www.domainname.com/about-us/
timeout /t 15
start chrome.exe www.domainname.com/gallery/
timeout /t 15
start chrome.exe www.domainname.com/contact-us/
timeout /t 15
close chrome.exe
exit

What could prevent a ScheduledTaskAgent from firing OnInvoke more than once?

I have set up a ScheduledTaskAgent with a LaunchForTest (which I know is being called). When I launch the main app, it seems to successfully add the task and OnInvoke runs to completion (calls NotifyComplete), but never seems to run again. I've pared down the OnInvoke to do nothing other than call NotifyComplete, but it still only ever runs the one time following ScheduledActionService.Add and ScheduledActionService.LaunchForTest (with a few seconds' delay).
What could be preventing it from running more than once?
I am assuming it is about PeriodicTask.
You are right. It will run only once and that is because of the LaunchForTest call, wherein you have specified the timespan. After that execution, you have to wait another 30 minutes for it to run.
Are you adding the ScheduledActionService.Add in App.xaml.cs? I mean, on the launch event? You should. If you have that, then you could run the app again, and it will invoke the task agent.
If you are hitting the breakpoint even once that means that you are correctly set up. You have to remember that ScheduledActionService.LaunchForTest is just a function that you can call under debugger. It will not work when the app is released.
Basically, there is no way to fire the background agent, you can register it and then forget it. Windows Phone OS will invoke it periodically.
If you want to debug the periodic task multiple times then you can put LaunchForTest in a loop with delay.

MS Access On_Current event not firing on very first run of the application

I have an MS Access front end application in which the first form to be opened (a splash screen - the form is opened from the Autoexec Macro) has an on_Load event which sets the timer interval to 0, and an on current event which sets it to 100. The timer event starts the application running (attaching to the backend SQL Server Database etc).
When a fresh copy of the application is copied to a new place - we do that when there is a new release - it gets copied to each users machine, the very first call of the application acts as through the timer never fires. In other words it appears the the on current event never fires.
I cannot find what is causing it, and my only explanation that I can think of is that in testing the start up just before release, I have set the form so its current record IS the one that is set when the form loads on start up.
Is this true? Is there a situation anyone is aware of where the on_current event doesn't fire for that, or any other reason.
The reason I wait until the on_current event is that the form itself has a data-source which depending on the form filter sets the parameters for different databases to connect to (production v test for instance). A work around may be to set the timer interval in the on load event - but it opens up to a possible race condition where the timer fires before on_current has set the correct database, and I would prefer to avoid that risk
On Current fires when you move to a new record. To force it to fire, you might try to move to the last record, then back to the first.

WP8 Create a second tile causing App exit

To add a second Flip tile, I use the following code at the first time loading of MainPage.xaml
if the tile doesn't exist, then....
ShellTileData tileData = this.CreateFlipTileData(idx);
ShellTile.Create(tileUri, tileData, true);
The tile is created successfully, but the issue is the App will exit, of course, if user start the app again, it will be fine. Just wondering it is not a good experience, is there a better way.
There is no way to stop the your app from exiting when a new secondary tile is created. The best thing to do is be prepared for when the user presses the Back button to step backwards into your app.
Also, it's good to note that updating an existing tile will NOT cause the app to exit, only the creation of new tiles.