[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] macperl::DoAppleScript Doesn't



Hi:

I've searched the archives for this problem and I noticed a number of folks=
=3D
 have similar problems, but haven't found a satisfactory solution to my par=
=3D
ticular instance.

The long and short is, I have a DoAppleScript call (see code below) which d=
=3D
oes not execute at all.  Neither does it generate any errors.  When I step =
=3D
through the code using the debugger, it comes to the call just fine, but al=
=3D
l it does in terms of execution is a brief pause and a touch of disk access=
=3D
.  The script works just dandy from script editor.

Thanks for any insight!

Eric

=3D09my $skript =3D3D <<END_OF_APPLESCRIPT;
=3D09

=3D09
=3D09display dialog "here1"
=3D09tell application "CodeWarrior IDE 4.0"
=3D09display dialog "here2"
=3D09activate
=3D09open $project_path converting yes
=3D09set theAccessPaths to Get Preferences from panel "access paths"
=3D09set theUserPaths to User Paths of theAccessPaths
=3D09set pow to {{name:":::::xpcom:base:", recursive:true, origin:project r=
el=3D
ative}}
=3D09set theUserPaths to theUserPaths & pow
=3D09set User Paths of theAccessPaths to pow
=3D09
=3D09Set Preferences of panel "access paths" to theAccessPaths
=3D09close project
=3D09end tell
=3D09
END_OF_APPLESCRIPT
=3D09
=3D09system ("flush");
=3D09MacPerl::DoAppleScript($skript);

WaitNextEvent();



# =3D3D=3D3D=3D3D=3D3D=3D3D Want to unsubscribe from this list?
# =3D3D=3D3D=3D3D=3D3D=3D3D Send mail with body "unsubscribe" to macperl-re=
quest@macp=3D
erl.org