Forum > General

[SOLVED] Get unique constant identifier

(1/5) > >>

pcurtis:
I can get the handle of the foreground app with


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  AHandle: HWND;   AHandle := GetForegroundWindow; 
How can I get a unique constant identifier (maybe exe name, or anything else but must be unique) for this handle?

Thaddy:
https://www.freepascal.org/docs-html/rtl/sysutils/createguid.html

Note that handles are per session, so not permanent.

pcurtis:
The identifier must be constant across restarts, hence application EXE name.

Handoko:
Maybe by pressing Ctr+Shift+G in the Lazarus' Source Code Editor.

pcurtis:
What does that do. On my system it opens the AMD Radeon control panel  %)

Navigation

[0] Message Index

[#] Next page

Go to full version