Recent

Author Topic: AppleScript Lazarus X11  (Read 6527 times)

kalle_19

  • New Member
  • *
  • Posts: 15
AppleScript Lazarus X11
« on: February 16, 2007, 07:31:05 am »
Is it possible to launch lazarus from a applescript? I have tried but not succeeded. Se code below :(

I was thinking of a .command script instead but is it possible to launch lazarus from terminal (tcsh) without X11 open?

The non-working X11 script:
Code: [Select]

on run
tell application "Finder"
activate application "X11"
set theCommand to "export DISPLAY=':0.0';/usr/local/share/lazarus/lazarus > /dev/null 2>&1 &"
with timeout of 100 seconds
do shell script theCommand with administrator privileges
end timeout
end tell
end run

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: AppleScript Lazarus X11
« Reply #1 on: February 16, 2007, 03:25:13 pm »
Quote from: "kalle_19"
Is it possible to launch lazarus from a applescript? I have tried but not succeeded.


Why not create an app bundle for Lazarus and run it by double-clicking or dropping it on the Dock? Haven't tried it in a while, but the instructions are here:

http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips

kalle_19

  • New Member
  • *
  • Posts: 15
RE: Re: AppleScript Lazarus X11
« Reply #2 on: February 16, 2007, 05:19:40 pm »
Thanks! A little problem with no sudo mode thought. But better than .sh file :)

 

TinyPortal © 2005-2018