FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Whats wrong?

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
to2
Newbie


Joined: 15 Nov 2007
Posts: 3

PostPosted: Fri Nov 16, 2007 8:25 pm    Post subject: Whats wrong? Reply with quote

[code:1]property app_list : {"iCal", "iTunes", "iSync", "Preview"}

try
tell application "SEC Helper"
enter list mode title "Applications" items app_list item selected "item_was_selected"
end tell
on error
beep
end try
return false
on item_was_selected(appselected)
set the_app to appselected
try
tell application the_app
activate
end tell
end try
return false
end item_was_selected[/code:1]

I get the list, but thats it :(
Back to top
View user's profile Send private message
to2
Newbie


Joined: 15 Nov 2007
Posts: 3

PostPosted: Thu Nov 22, 2007 3:26 am    Post subject: Reply with quote

I got it working


[code:1]
property applist : {"iCal", "iChat"}

try
tell application "SEC Helper"
enter list mode title "Programmer" items applist item selected "app_was_selected"
end tell
on error
beep
end try
return false

on app_was_selected(itemIndex)
try
tell application (item itemIndex of applist)
activate
tell application "SEC Helper"
tell current terminal
push (make new popup dialog with properties {textual content:(item itemIndex of applist) & " started...", delegate:(item itemIndex of applist)})
end tell
end tell
end tell
end try
return false
end app_was_selected

[/code:1]

The probleme now is that I want the script to ask if I want to "Quit" or "Activate" the app. so I don't have to make 2 scripts, one for activation and one for ending the apps!

Appreciate feedback!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group