Jump to content
OmarKN

Launching app with Apple Script fails, why?

Recommended Posts

Hi and good day,

 
To launch Tex-Edit Plus I thought was a child's play, so I have a trigger then a working Apple Script:
 
-----
tell application "Tex-Edit Plus"
activate
set bounds of front window to {400, 810, 1280, 1260}
end tell
-----
 
but without success. Anyone can see the reason why?
 
/

with best regards,

Omar K N

Stockholm, Sweden

Edited by OmarKN

Share this post


Link to post

Hi and good day Vítor,

 
 
This is the debugger message:
 
Starting debug for 'Test Workflow1'

 

[iNFO: alfred.workflow.trigger.hotkey] Processing output 'alfred.workflow.action.script' with arg ''

 

 

Sorry, don't know how to upload a workflow, but what I have is a Hotkey, then a /bin/bash Apple Script:
 
tell application "Tex-Edit Plus"
activate
set bounds of front window to {400, 810, 1280, 1260}
end tell
 
 

with best regards + happy new year!

Omar K N

Stockholm, Sweden

 
 

 

Share this post


Link to post

 

Sorry, don't know how to upload a workflow, but what I have is a Hotkey, then a /bin/bash Apple Script:

 
tell application "Tex-Edit Plus"
activate
set bounds of front window to {400, 810, 1280, 1260}
end tell
 

 

What is a "/bin/bash Apple Script"? That sounds like a problem.

Share this post


Link to post

Hi and good day Deanishe,

 
It's "Language /bin/bash" in the context menu of Alfred. Or should I choose: osascript(AS) ?
 
 

/

with best regards,

Omar K N

(No idea at all here!)

Share this post


Link to post

If you're trying to run AppleScript, you need to set the language to AppleScript, which is indeed the "AS" in /usr/bin/osascript (AS).

 
So, yeah, use that instead.

Share this post


Link to post

hi D.

 

ok found the mistake:

 

When I added: make new window - everything was fine, so here is the script:

 

----

 

tell application "Tex-Edit Plus"

activate
make new window
set bounds of front window to {328, 577, 1264, 1102}
end tell

 

----

 

/

with best regards + have a happy new year!

Omar K N

Stockholm, Sweden

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...