18 December 2021, 23:05 | #1 |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 181
|
Can this application be a Commodity?
Hello,
So I made a very simple Cron like application that executes any command or script in some time intervals. I am using it to execute a script that pings my network and setup ENV variable Online/Offline. That Way and using AmigaOS3.2 I can have my Internet status updated on my WB menu bar. The mentioned Cron-like application just runs at system startup with parameters. So my question is... Is that type of application can be rewritten as commodity? I read that commodities are apps that only takes some input and then do something with it. I wanten my Cron-like application to be more "human-friendly" so it could be controled by Exchange to turn on/off/kill etc.. In my Cron-like app I am just using Delay(time) to get into non-busy "loop" nad wait to execute command Thanks in Advance! |
19 December 2021, 01:29 | #2 |
Registered User
Join Date: Nov 2015
Location: Perth, Australia
Posts: 73
|
You can certainly make it a commodity just so that Exchange can control it. You don't need to register extra key presses. Docs for commodities.library.
Commodities are usually run from WBStartup so you might want to look at using tooltypes or a config file rather than command line parameters. Rather than using Delay you probably also want to have a look at timer.device for scheduling actions. By using timer.device your main loop becomes a Wait() followed by checking for signals from either the commodity port or the timer. Using Delay means a message might come from Exchange while your program is sleeping and cause problems for the rest of the system. |
19 December 2021, 01:54 | #3 | |
Registered User
Join Date: Jan 2020
Location: Poland
Posts: 181
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Making a commodity - some questions | peceha | Coders. Blitz Basic | 14 | 11 March 2018 18:41 |
Helpful commodity | idrougge | Coders. Blitz Basic | 0 | 14 December 2015 19:51 |
Translators for a little commodity wanted | bubbob42 | support.Apps | 12 | 29 May 2014 16:40 |
Save Prefs on Blanker Commodity | manic23 | support.Apps | 3 | 22 April 2013 20:12 |
Looking for Caps2Ctrl commodity | kolla | support.Apps | 7 | 24 October 2009 17:14 |
|
|