Get Persistant ID of the material used
Moderator: Klaus
Get Persistant ID of the material used
Hello From France
In FileMaker Pro 12 and >, i use the function Obtain(IDPersistant) , a unique ID (non modifiable) of the material which FileMaker is executed : 32 hex chars string.
I can do the same thing in LiveCode on OSX and windows using do scripts ( AS or VBA , but these "do scripts" doesn't work on LiveCode 7 rc2 standalones )
A native function in LiveCode would be very useful.
Excuse for my bad english and thanks for your responses.
In FileMaker Pro 12 and >, i use the function Obtain(IDPersistant) , a unique ID (non modifiable) of the material which FileMaker is executed : 32 hex chars string.
I can do the same thing in LiveCode on OSX and windows using do scripts ( AS or VBA , but these "do scripts" doesn't work on LiveCode 7 rc2 standalones )
A native function in LiveCode would be very useful.
Excuse for my bad english and thanks for your responses.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Get Persistant ID of the material used
If I understand your post correctly I think what you'll find what you're looking for in the Dictionary entry for the UUID function.
As for "do script" not working on Windows in v7 where it had in previous versions, please submit a bug report on that:
http://quality.runrev.com/
As for "do script" not working on Windows in v7 where it had in previous versions, please submit a bug report on that:
http://quality.runrev.com/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Get Persistant ID of the material used
Hello.
UUID function of LiveCode can't be used for what i'm looking for.
I need getting a PERMANENT ID of the material LiveCode (or standalone) is executed on.
This ID must return an unique ID of my material, so it can't change: it must be constant, not variable.
Cordialy, Joan.
UUID function of LiveCode can't be used for what i'm looking for.
I need getting a PERMANENT ID of the material LiveCode (or standalone) is executed on.
This ID must return an unique ID of my material, so it can't change: it must be constant, not variable.
Cordialy, Joan.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Get Persistant ID of the material used
In this context what constitutes "material", and how will this identifier be used?
It may be that the sha1digest function will suffice, bit it's hard to say until I know more details about what's needed.
It may be that the sha1digest function will suffice, bit it's hard to say until I know more details about what's needed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Get Persistant ID of the material used
Material = Motherboard
i need to get an ID (unique for every motherboard) to install runtimes made with LiveCode on specific computers.
i need to get an ID (unique for every motherboard) to install runtimes made with LiveCode on specific computers.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Get Persistant ID of the material used
Thanks. I wouldn't have been able to guess that "material" could mean "motherboard".
What API calls would you use to do this in VB?
FileMaker's documentation on this is very sparse:
http://www.filemaker.com/help/12/fmp/ht ... 32.54.html
So I called a friend who's quite experienced with FileMaker, and he tells me that the older function, Get(NICAddress) used to return the identifier for the network card on the device, and more recently Get(PersistentID) has gone through some changes: initially it was a value provided by the device hardware, but Apple nixed that for security reasons. So at this point that function uses an arbitrary UUID created by FileMaker on install.
With that in mind, my FMP developer friend says that what he does these days is pretty much as I suggested: he generates a UUID on install and stores that, obtaining that value any time he needs it in subsequent sessions.
In LiveCode this can be done with the UUID function.
What API calls would you use to do this in VB?
FileMaker's documentation on this is very sparse:
http://www.filemaker.com/help/12/fmp/ht ... 32.54.html
So I called a friend who's quite experienced with FileMaker, and he tells me that the older function, Get(NICAddress) used to return the identifier for the network card on the device, and more recently Get(PersistentID) has gone through some changes: initially it was a value provided by the device hardware, but Apple nixed that for security reasons. So at this point that function uses an arbitrary UUID created by FileMaker on install.
With that in mind, my FMP developer friend says that what he does these days is pretty much as I suggested: he generates a UUID on install and stores that, obtaining that value any time he needs it in subsequent sessions.
In LiveCode this can be done with the UUID function.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Get Persistant ID of the material used
The FileMaker Pro get(PersistentID) works inside FMP itself and within runtime solutions created with the "Advanced" version, and returns the same string on both cases (on the same Mac).
I don't know where it's stored on the computer at the installation of FMP, this doesn't matter for me.
Even if i trash a runtime created with FMP and re-install it, the PersistentID remains the same: that works !
--
Creating a UUID at first launch of a LiveCode runtime supposes that this UUID has to be stored outside the app (runtimes are read only, a big problem of LiveCode, not in HyperCard
), so it can be read and changed, or the file containing the UUID can be trashed. Using an UUID is a good idea, but if the file containing it is trashed, or if the runtime is trashed and re-installed, another UUID will be created, and that's absolutely NOT what i need.
I absolutely need obtaining the SAME value any time i need in subsequent sessions.
What i need is an unique ID i can get via openstack of the runtime via a "get" function, and store directly in a global variable.
i actually does this with AppleScript and VB,(i spent lots of hours of tests to create these scripts) but a special function in LiveCode would be better and extremely useful.
I suppose that if FMPro engineers created the get(PersistentID), the LiveCode team can code a similar function in LiveCode.
Cordially, Joan.
I don't know where it's stored on the computer at the installation of FMP, this doesn't matter for me.
Even if i trash a runtime created with FMP and re-install it, the PersistentID remains the same: that works !
--
Creating a UUID at first launch of a LiveCode runtime supposes that this UUID has to be stored outside the app (runtimes are read only, a big problem of LiveCode, not in HyperCard

I absolutely need obtaining the SAME value any time i need in subsequent sessions.
What i need is an unique ID i can get via openstack of the runtime via a "get" function, and store directly in a global variable.
i actually does this with AppleScript and VB,(i spent lots of hours of tests to create these scripts) but a special function in LiveCode would be better and extremely useful.
I suppose that if FMPro engineers created the get(PersistentID), the LiveCode team can code a similar function in LiveCode.
Cordially, Joan.
Re: Get Persistant ID of the material used
Go here: http://www.sonsothunder.com/devres/live ... vecode.htm
There are scripts there that show you how to get the volume serial number, the MAC address, and the name of the boot volume.
There are scripts there that show you how to get the volume serial number, the MAC address, and the name of the boot volume.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Get Persistant ID of the material used
If that's a problem at all (OS designers see it as a security feature) it's with pretty much all modern OSes rather than with LiveCode: OSes don't allow executables to modify themselves.ekami wrote:...(runtimes are read only, a big problem of LiveCode, not in HyperCard)...
HyperCard was able to have standalones that saved to themselves only because the Mac's HFS file system is uniquely dual-forked, and in older versions of Mac OS code modules resided in the resource fork, leaving the data fork free for modifiable data. While HFS+ continues to support the resource fork for legacy reasons Apple strongly discourages its use in new code. Moreover, the Mach kernel in OS X expects executable code to reside in the data fork, and like other OSes won't allow its modification at runtime.
NICs can be changed, as can the primary volume. I'm not familiar with a way to obtain the ID of the motherboard, but would be interested in learning if you're in a position to share your AppleScript for that....it can be read and changed, or the file containing the UUID can be trashed.
Just trying to help. I still don't know why this is needed so I was only able to guess that UUID might be useful. If not, calling AppleScript from LC is an option, along with the examples Jacque pointed to.Using an UUID is a good idea, but if the file containing it is trashed, or if the runtime is trashed and re-installed, another UUID will be created, and that's absolutely NOT what i need.
You're certainly welcome to submit a request for that:I suppose that if FMPro engineers created the get(PersistentID), the LiveCode team can code a similar function in LiveCode.
http://quality.runrev.com/
It would be nice to have it in the future, but if you need this now you may want to explore alternatives such as one at the link Jacque provided.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Get Persistant ID of the material used
Many thanks to Jacque and Richard for the informations and links.
The volume serial number must be the ID of the hard disk (but if the disk changes, this ID too), the MAC adress can be spoofed, and the name of the boot volume can be modified.
So none of these values are useful for me.
Sorry, but i can't share my scripts to get an unique IDs from the hardware (confidentiality), but for the OSX case it's very easy to find on AppleScript forums.
The volume serial number must be the ID of the hard disk (but if the disk changes, this ID too), the MAC adress can be spoofed, and the name of the boot volume can be modified.
So none of these values are useful for me.
Sorry, but i can't share my scripts to get an unique IDs from the hardware (confidentiality), but for the OSX case it's very easy to find on AppleScript forums.