Getting Warning sign : OMEGA13 was used but was never set (will evaluate as its name) - automation

Getting warning from Script Checker : "OMEGA13 was used but was never set (will evaluate as its name)"
I've set
start using Omega13
-- some codes here --
stop using Omega13
Anyone has any idea on why the warning sign is there?
Eggplant documentation - Advance scripting: Error Recovery with Omega13

What's probably happened is somewhere you've mistyped some variant of omega13.
Sensetalk treats uninitialized variables as strings. This results in lots of hard to debug errors.
name = "my name"
put naame
This will print naame which is probably not what you wanted.
It looks like the correct form to invoke is omega13 not Omega13, or OMEGA13. I'd check the documentation and make sure that you haven't mistyped it anywhere.
You may also want to look into the strictVariables global which if true will treat using an uninitialized variable as an error.

Related

Extracting information from a file variable in d3 pick basic

I have a file variable in d3 pick basic and I am trying to figure out what file it corresponds to.
I tried the obvious thing which was to say:
print f *suppose the file variable's name is f in this case
but that didn't work, because:
SELECTION: 58[B34] in program "FILEPRINTER", Line 7: File variable used
where string expression expected.
I also tried things like:
list f *didn't compile
execute list dict f *same error
execute list f *same error
but those also did not work.
In case any one is wondering, the reason I am trying to do this in the first place is that there is a global variable that is passed up and down in the code base I am working with, but I can't find where the global variable gets its value from.
That file pointer variable is called a "file descriptor". You can't get any information from it.
You can use the file-of-files to log Write events, and after a Write is performed by the code, check to see what file was updated. The details for doing this would be a bit cumbersome. You really should rely on the Value-Add Reseller or contract with competent assistance for this.
If this is not a live end-user system, you can also modify an item getting written with some very unique text like "WHAT!FILE!IS!THIS?". Then you can do a Search-System command to search the entire account (or system) to find that text. See docs for proper use of that command.
This is probably the best option... Inject the following:
IF #USER = "CRISZ" THEN ; * substitute your user ID
READU FOO FROM F,"BLAH" ELSE
DEBUG
RELEASE F,"BLAH"
END
END
That code will stop only for one person - for everyone else it will flow as normal. When it does stop, use the LIST-LOCKS command to see which file has a read lock for item "BLAH". That's your file! Don't forget to remove and recompile the code. Note that recompiling code while users are actively using it results in aborts. It's best to do this kind of thing after hours or on a test system.
If you can't modify the code like that, diagnostics like this can be difficult. If the above suggestions don't help, I think this challenge might be beyond your personal level of experience yet and recommend you get some help.
If suggestion here Does help, please flag this as the answer. :)

The specified RegistryOptions value is invalid

What im trying to do is write a key to the registry but im stepping from one problem to another, first permissions problem, now this..
This is the line of code.
If PNGchk.Checked = True Then
My.Computer.Registry.Users.CreateSubKey(UserSID & "\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice", True, Security.AccessControl.RegistryRights.FullControl).SetValue("Progid", "SIV.png", Microsoft.Win32.RegistryValueKind.String)
End If
You must have Option Strict Off for that code to even compile, so you might want to fix that to start with. Option Strict On would have flagged issues with that code right away. You should read the documentation or at least pay attention to Intellisense for that method because your second and third arguments make no sense. No overload that I can see has a Boolean parameter and if you want to use a RegistryRights value you do so within a RegistrySecurity object as far as I can see.
RegistryKeyPermissionCheck.ReadWriteSubTree worked for me.
Using clsid64 = view64.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice", RegistryKeyPermissionCheck.ReadWriteSubTree)
clsid64.SetValue("StubPath", "SIV.png")
clsid64.Close()
End Using

ColdFusion structkey starting with number

Why does this fail:
<CFIF isdefined("URL.3dfile")>...</CFIF>
with following message:
Parameter 1 of function IsDefined, which is now URL.3dfile, must be a syntactically valid variable name.
and this won't:
<CFIF structkeyexists(URL,"3dfile")>...</CFIF>
Is the way it get's parsed not much the same? And .. are variables starting with numbers invalid or aren't they?
Seybsen - variables names should not begin with a number. This is likely a legacy of older non-java version of CF Where a variable was not part of an object.
However, in the java world everything IS an object. This leads to a syntactical nuance. If you are using variable names in dotted notation your var name will likely throw an error. But use it in other ways and it will succeed.
So this sort of syntax works
url['33foo']
But setting a variable name directly - 33foo = true - will not work.
Here's a post with a full explanation.
http://www.coldfusionmuse.com/index.cfm/2005/9/8/isdefined%20vs%20structkeyexists

Datatree MUMPS -- resolve undefined variables to null/empty string?

I'm trying to port some scripts from a modern version of Intersystems Cache back to 1980s Datatree MUMPS. It was written in the context where $ZUTIL(18,2) was set. That is, undefined variables resolve to an empty string, rather than throwing an "undefined variable" error.
Rather than refactor it all to check $DATA, does anyone know whether DTM supports a similar feature to automatically resolve undefined variables per process, or globally?
*Update: running "zzswitch +2" did the trick.
That was tricky one.
Have a look at this document:
ftp://ftp.intersystems.com/pub/cache/DTMtoCache.doc95
It says that equivalent of $ZU(18) in DTM was zzswitch +2 / -2
I obviously can't run DTM now so just try to issue zzswitch +2 and then zzswitch -2 and see how does it affect the way your undefined vars are treated.
PS: I would understand efforts of migrating from DTM to Cache, but going back? Mate it's not even necromancy, it's archeology now.

Settings variable returning a different value in VB.net!

This is a quite strange problem. I have set a setting variable in Application settings with following data:
Name: county
Type: integer
Scope: user
Value: 0
Yet when I reference it with this statement: MsgBox(My.MySettings.Default.county)
It alerts 1. Despite being the first to be executed as soon as form loads.
I'm assuming that the My.MySettings bit is a typo.
Often when someone sees a different value than they expect when reading from My.Settings, it seems to be that they are reading the Default rather than the actual value.
I'd suggest trying to use just MsgBox(My.MySettings.county) and see if that returns what you want.
Otherwise, try to delete the bin and object directories of the project and try to re-compile and re-run and see if it might be something that had gotten "stuck" somewhere.