Hi ejang,
AppleScript can write into text files, no need to hijack TextEdit for this task. It's quite easy:
set curdate to (current date) as string
set logmsg to "LOGIN:" & tab & curdate & return
set logfilepath to (((path to desktop) as text) & "logins.txt")
set logsucess to my...
It's quite easy:
-- Mac path to a hidden sript file in the bundle
set hiddenscriptpath to (((path to me) as text) & "Contents:Resources:script.app")
-- Converting the Mac path to a Posix path
set hiddenscriptpath to POSIX path of hiddenscriptpath
-- Quoting the Posix path
set...
Hi Ewar,
You don't even need to bring up the finder to open files using AppleScript, it can be all done in the background with code like follows:
set filepath to POSIX path of "DandyDisk:Users:martin:Desktop:test.ppt"
try
set command to "open " & quoted form of filepath
do shell script...
Just surround your code with these tags: <code>code goes here</code>. You will have to replace the '<' and '>' characters with '[' and ']'. Or just hit the # icon in the message editor :-)
Hi rowoflo,
You can get the screen resolution using code as follows:
set command to "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution"
set output to words of (do shell script command)
set {dspwidth, dspheight} to {item 2, item 4} of output
Best regards from Germany!