|
Post by George on Jul 9, 2019 9:34:13 GMT -5
Robert: Well, I seriously doubt anyone will ever be impacted by this. I'm not even sure why we created it, what problem does it solve?
The number returned is simply the Window ID of the tab (the control ID number all window components are identified by). I guess I could initialize it by some random number from 1-100 to reduce collisions, but really?
George
|
|
|
Post by George on Jul 9, 2019 12:29:53 GMT -5
Sure that would work, but still, what method would macros be using to communicate across multiple instances? How would they even KNOW what IDs were in use in another instance? I'm still not clear what macros in multiple instances of SPFLite would be doing where the possible duplication of a Uniq_ID would affect them.
George
|
|
|
Post by George on Jul 9, 2019 15:54:17 GMT -5
OK, if used as you describe, I can perhaps see a possible 'collision'. But it reminds me of a comedy speech by some Englishman who was an air traffic controller. He said something like:
The need for air traffic controllers is somewhat vague, I mean the chances of two aircraft to be at the same location and the same height at the same time is so remote as to be ignored. So the purpose of air traffic controllers is to force all aircraft to follow narrow airways, thus forcing the need for air traffic controllers to keep them from bumping in to each other.
This is like that, just WHAT are we worrying about? Do we really think this scenario is EVER going to happen? I'll add something to make the Uniq-ID more unique, but this is really pushing what's reasonable.
George
|
|
|
Post by mueh on Jul 9, 2019 16:09:56 GMT -5
Hi Robert! What do you think About following . Macro is user written so he is reponsible for creating unique names . Since every Instance has it's own INI Filename and Title Name ( not accessable by Macro ) he can qualify the unique Name with INI FileName if it would be known in macro . I use only a max of 4 char ( most of the time only one ) at the end of ini Name to make it unique . If the INI path is different you have also a different CLIP Folder path . Does this help ? Regards MUEH
|
|
|
Post by George on Jul 10, 2019 11:16:00 GMT -5
Robert: The other SPFLite folders and files DO INDEED follow the location of the -INI specified file.
Get_Uniq_ID will now return a numeric value of ppppwww where pppp is the current Process ID and www is the current Window ID. e.g a number like 2482203 for PID=2482 and WindowID=203.
These values are absolutely unique in Windows.
George
|
|
|
Post by George on Jul 11, 2019 9:29:29 GMT -5
I've never seen a PID over 4 digits. If it's a concern, the macro should just left truncate it, it will certainly still be unique enough.
George
|
|
|
Post by George on Jul 11, 2019 12:05:02 GMT -5
The Window ID is SPFLite generated, think +1 for every time a tab is opened. And if it did somehow get > 999, then all it would do is increment the PID portion value by 1. Still a unique number.
I do think the odds of opening > 999 tabs, combined with macro use, combined with multiple instances, combined with the chance that another SPFLite PID just happened to be +1 higher than the first one, combined with that instance also using macros using UNIQ, etc. etc.
I think we're safe.
George
|
|