CONTROL inconsistencies
› Forums › Desktop Info › CONTROL inconsistencies
- This topic has 5 replies, 2 voices, and was last updated 1 year, 12 months ago by
dcross@ed.ac.uk.
-
AuthorPosts
-
-
23 May, 2020 at 3:22 pm #3040
dcross@ed.ac.uk
ParticipantWindows vers : 1803 / 1809 / 1903
Product vers : 2.6.0 (symptoms since > 2.3.1)I’ve experienced these symptoms using the (DTI) CONTROL function since version 2.3.1 – been unable to upgrade …
I’m displaying a support button for users to click which takes them to a support URL based on the version of their OS (feature update). That is, I’d like users who are running 1903 to have a default (normal) help page (https://edin.ac/helpline) & users who have yet to move (< 1903) to our tested-OS to display a “Pending” button for support (https://edin.ac/sdx-feature-previews). This button will overwrite the default button.
Based on the IF statement logic, only one button (depending on feature update version) should appear for the user. The symptoms are the default/Pending button spuriously appearing/disappearing when values are toggled for testing (eg contains / notcontains logic in IF statement). There doesn’t appear to be any consistency with the results. I have tried various methods of using the IF/CONTROL statements but I’m failing to resolve the issues.
A (test) ini file …
##########[options]
# size and position
#top=1
#left=5
bottom=35
right=30
width=300# font
font-face=Arial
font-size=12# banner logo
#logo=EUCrest.png# logging
log=desktopinfo.log
log-level=debug# navigation
nav=0
nav-align=-1
allowdrag=0
#transparency=70
formcolor=000000
contextmenu=0
offset=0
networkadapterfilter=
#language=english.ini
inimonitortime=10[text]
noresults=
null-result=
error=[pages]
1=Main Page
2=
3=
4=
5=
6=
7=
8=
9=[items]
# colors
set=key:White,value:ffffff
set=key:Grey,value:a0a0a0
set=key:Cyan,value:00ffff
set=key:Magenta,value:ff00ff
set=key:Green,value:008000
set=key:Orange,value:0080ff
set=key:Silver,value:c0c0c0
set=key:Blue,value:0000f0
set=key:Red,value:0000FF# main
PAGE=1
COLOR=%White%
COMMENT=color:%Orange%,style:b,text:SDX **TEST** Desktop v2.6.0
HOST=interval:300,text:Computer:### get OSBuildVer (BuildNum) for lookup
OSBUILD=set:OSBuildVer,display:%1,hidden:1COMMENT=color:FF80FF,text:OSBuildVer : %OSBuildVer%
# SUPPORTED (default) button
control=active:1,interval:10,left:0,width:100,type:0,button-color:%Green%,text:Support:,display:IS Helpline,uri:https://edin.ac/helpline# set PENDING button (OS 1803/9)
IF=active:1,interval:10,value1:%OSBuildVer%,value2:6.3.17,comparator:contains
control2=active:1,interval:10,left:0,width:100,type:0,button-color:%Orange%,text:Support:,display:Pending,uri:https://edin.ac/sdx-feature-previews####
The debug log for the above ini …
22-05-20 10:36:07:934 DEBUG Command Line Debug: c:\workspace\SDXDebug.log
22-05-20 10:36:07:966 DEBUG CheckIniFile
22-05-20 10:36:07:966 MAP Mapping: ClearProcessMonitors
22-05-20 10:36:07:966 MAP Mapping: SendTerminateCommand
22-05-20 10:36:07:977 DEBUG Mapping: CloseMapping
22-05-20 10:36:07:977 INFO Ini File: c:\sdx\DesktopInfo\SDXInfo.ini
22-05-20 10:36:07:993 INFO Desktop Info version 2.6.0.3489
22-05-20 10:36:08:008 INFO Windows Version 6.2.9200
22-05-20 10:36:08:024 DEBUG AddConfItem: key:White,value:ffffff
22-05-20 10:36:08:024 DEBUG AddConfItem: key:Grey,value:a0a0a0
22-05-20 10:36:08:040 DEBUG AddConfItem: key:Cyan,value:00ffff
22-05-20 10:36:08:040 DEBUG AddConfItem: key:Magenta,value:ff00ff
22-05-20 10:36:08:055 DEBUG AddConfItem: key:Green,value:008000
22-05-20 10:36:08:055 DEBUG AddConfItem: key:Orange,value:0080ff
22-05-20 10:36:08:072 DEBUG AddConfItem: key:Silver,value:c0c0c0
22-05-20 10:36:08:087 DEBUG AddConfItem: key:Blue,value:0000f0
22-05-20 10:36:08:087 DEBUG AddConfItem: key:Red,value:0000FF
22-05-20 10:36:08:167 DEBUG AddConfItem: color:%Orange%,style:b,text:SDX **TEST** Desktop v2.6.0
22-05-20 10:36:08:173 DEBUG AddConfItem: interval:300,text:Computer:
22-05-20 10:36:08:196 DEBUG AddConfItem: set:OSBuildVer,display:%1,hidden:1
22-05-20 10:36:08:211 DEBUG AddConfItem: color:FF80FF,text:OSBuildVer : %OSBuildVer%
22-05-20 10:36:08:227 DEBUG AddConfItem: active:1,interval:10,left:0,width:100,type:0,button-color:%Green%,text:Support:,display:IS Helpline,uri:https://edin.ac/helpline
22-05-20 10:36:08:242 DEBUG AddConfItem: active:1,interval:10,value1:%OSBuildVer%,value2:6.3.17,comparator:contains
22-05-20 10:36:08:258 DEBUG AddConfItem: active:1,interval:10,left:0,width:100,type:0,button-color:%Orange%,text:Support:,display:Pending,uri:https://edin.ac/sdx-feature-previews
22-05-20 10:36:08:258 INFO Items Loaded: 15
22-05-20 10:36:08:336 INFO Thread priority set
22-05-20 10:36:08:430 DEBUG UpdateEntries Complete.
22-05-20 10:36:08:446 DEBUG UpdateEntries Complete.
22-05-20 10:36:08:462 DEBUG SET () run procedure
22-05-20 10:36:08:477 DEBUG SET () process results
22-05-20 10:36:08:477 DATA SET () True####
Thanks again for your help Glenn.
Cheers,
Dave. -
23 May, 2020 at 9:45 pm #3045
webmaster
KeymasterI can see what you’re trying to do, however there’s a couple of reasons why you won’t succeed.
Bug 1: The IF statement is not necessarily evaluated before the buttons hit the display.
Bug 2: The buttons appear on the display before any data is collected and once a button is visible it can’t be made invisible.
Bug 3: The CONTROL2 item is supposed to be a part of a group headed by the CONTROL item. This is incomplete.
Bug 4: The IF evaluation isn’t correctly setting the state/visibility of CONTROLs.
Because CONTROL2 is supposed to be part of a group, it doesn’t have status as an ITEM in it’s own right and so the IF statement isn’t applied to it. In fact it will be applied to the next item that’s not a CONTROL2.
So the whole construct is doomed!
I’ll make some changes to deal with the above issues so that by the time that’s done you should be able to:
1. Do 2 IF+CONTROL constructs where one of the 2 CONTROLS will be displayed and the other is hidden similar to what you’ve attempted.
2. Set up three user variables containing data controlled by IF items then define a CONTROL using those variables to populate, the caption, the color and the uri.
-
24 May, 2020 at 7:32 am #3046
webmaster
KeymasterSo I’ve cleaned up the above bugs and we now have two distinct ways of achieving your goal:
The first is closest to your idea of switching between two buttons.
1234567891011# get the OS buildOSBUILD=set:OSBuildVer,display:%1,hidden:1# if it’s Win 10 1903/1909IF=value1:%OSBuildVer%,value2:6.3.18,comparator:containsCONTROL=text:Support:,display:Helpline,uri:https://intranet/help-win19# if it’s Win 10 1803/1809IF=value1:%OSBuildVer%,value2:6.3.17,comparator:containscontrol=text:Support:,display:Helpline,uri:https://intranet/help-win18The second sets a bunch of variables and uses those to construct a single button.
123456789101112131415161718### get OSBuildVer (BuildNum) for lookupOSBUILD=set:OSBuildVer,display:%1,hidden:1# default button settingsset=key:button-color,value:%Green%set=key:button-caption,value:IS Helplineset=key:button-uri,value:https://edin.ac/helpline# change if requiredIF=value1:%OSBuildVer%,value2:6.3.17,comparator:containsset=key:button-color,value:%Orange%IF=value1:%OSBuildVer%,value2:6.3.17,comparator:containsset=key:button-caption,value:PendingIF=value1:%OSBuildVer%,value2:6.3.17,comparator:containsset=key:button-uri,value:https://edin.ac/sdx-feature-previewscontrol=button-color:%button-color%,text:Support,display:%button-caption%,uri:%button-uri%You’ll notice I’ve removed the interval option from all items. All of this is available in v2.6.1 which I’ll test and hopefully make available today.
-
25 May, 2020 at 7:04 pm #3048
dcross@ed.ac.uk
ParticipantThanks Glenn, I tried both methods you outline above without any joy but it clearly would not have worked the way the button-statements are processed.
I will give it another go once v2.6.1 is available.
Hope I didn’t spoil your weekend !
Cheers,
Dave. -
25 May, 2020 at 8:02 pm #3050
dcross@ed.ac.uk
ParticipantOK thanks. I actually was meaning “previously” tried both methods (multiple controls / vars pushed to a single control) rather than since your reply.
I’ll give it a go later in the week.
Cheers,
Dave.
-
-
AuthorPosts
- The topic ‘CONTROL inconsistencies’ is closed to new replies.