I'm very confused, I have no issue with most of my AppleScript, but some are not running or giving a different result when started from Keyboard Maestro while I have no issue at all when I start them from Apple Script Editor
e.g this won't work from KM but have no issue from AppleScript Editor:
set internalID to "demo"
try
tell application "System Events"
tell process "My Internal app"
-- gathering AppleID
set internalID to get value of static text 5 of scroll area 1 of group 1 of group 1 of group 1 of group 2 of splitter group 1 of window 1
end tell
end tell
on error
--
end try
and this will give me a value but totally different (reading the value of a Plist, I double checked the value from the plist its self, and it's wrong)
try
set the plistfile_path to "~/Desktop/_DATA.plist"
tell application "System Events"
set p_list to property list file (plistfile_path)
-- read the plist data
set theCaseIDFromPlist to value of property list item "internalID" of p_list
end tell
end try
set the clipboard to theCaseIDFromPlist
Can you please tell me what I'm doing wrong here?
thank you