Active window and mouse location
Bob Sneidar
bobsneidar at iotecdigital.com
Wed May 9 13:05:17 EDT 2018
Here is what I do and it works a peach. Assuming tPath is a valid path to a folder:
if tPlatform contains "Win" then
replace "/" with "\" in tPath
put "explorer " & quote & tpath & quote into theCmd
put shell(theCmd) into theResult
else
put "property the_path : " & quote & tPath & quote & cr into theCmd
put "set the_folder to (POSIX file the_path) as alias" & cr after theCmd
put "tell application " & quote & "finder" & quote & cr after theCmd
put "activate" & cr after theCmd
put "reveal the_folder" & cr after theCmd
put "end tell" & cr after theCmd
do theCmd as appleScript
end if
This should probably also be in the master library.
Bob S
> On May 9, 2018, at 08:32 , Douglas Ruisaard via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Thanks, as always, for the responses. Getting old means you forget about the differences between Commands and Functions... but anyway
> My MAIN question was whether there was a way to get LC to make a desktop window THE active, top-most window... next necessarily the LC's window (in my case) but ANY window for that matter.
More information about the use-livecode
mailing list