My understanding of a service is that it is supposed to run in the background with no UI.
I have the following service app. I believe I have done everything I am supposed to do. I have turned off "Debug Mode" in the "Developer Options" of preference.
I assigned this app to the "Favorites" panel so that I can either just click on it or use a hotkey. When I click on the icon in the favorites panel for this app, I get an app window that pops up in the "App Viewer 1" panel. It is empty and has just my app title "CSP Add Seq Service"
How can I prevent the app window from showing up when I click on the app in Favorites?
Thanks
Chris
Here is my code
{
"type": "service",
"id": "94FB9D80-057A-4726-BDD1-F68D6B4E571F",
"version": "1.0",
"author": [
"CSP"
],
"name": {
"": "CSP Add Seq Service"
},
"description": {
"": "As a Service - Adds all selected files to the category PicSet/PicSet_NNN using the next highest sequence number"
},
"defaultDocument": "index.html",
"icon": {
"": "app.png"
}
}
And here is the app
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSP Add Seq: Service</title>
</head>
<!-- jQuery and Bootstrap -->
<script src="/system/jquery/dist/jquery.min.js"></script>
<script src="/system/bootstrap-4/js/bootstrap.bundle.min.js"></script>
<!-- The IMatch and IMWS helper libraries - they make access to IMWS and IMatch very easy -->
<script src="/system/imws/imwslib.js"></script>
<script src="/system/imatch/imatchlib.js"></script>
<body>
<script>
$(document).ready(function () {
// Update appInfo in the UI
IMatch.appInfo({
instanceid: IMatch.instanceId()
}).then(function (response) {
console.log('Running ' + response.app.localName);
});
RunMe();
function RunMe() {
console.log('Did run me');
}
});
</script>
</body>
</html>