Friday, November 17, 2017

#1 2011-09-10 01:58:19 pm

rfmusic
Member
Registered: 2011-07-30
Posts: 14

"on run" replacement in ASS ?

Hi, i'm working on a droplet and i need to run some code only when i open the application by double clicking, while i don't want that code to be executed when i drag'n'drop

this can be done easily in standard applescript using "on run".

unfortunately "on run" doesn't works in ASS so i have to execute the code calling an handler such as "on launched", main problem is that all the handlers i've tried are executed also when i drag'n'drop so i don't know how to do it, expecially the issue is that they are executed BEFORE "on open" so i have no way to tell the application to not show the panel.

basically i need to know if application has been opened by double click or drag'n' drop since the beginning, so i can modify the "on launched" part accordingly
can this information be called in some way ?

i had found a way to manage it using "on idle" but i've encountered some issues so i cannot use it

Basically i have an option panel that should be opened only when i double click, i can tell inside the "on open" part to hide the panel, but i still see that for a fraction then it hides, can be a workaround but it's not exactly how it should be...

any ideas ?
thanks

Offline

 

#2 2011-09-10 02:09:33 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11482
Website

Re: "on run" replacement in ASS ?

Hi,

take a look at this thread.


regards

Stefan

Offline

 

#3 2011-09-10 03:46:18 pm

rfmusic
Member
Registered: 2011-07-30
Posts: 14

Re: "on run" replacement in ASS ?

worked great, no need to put a delay anymore in this way...
1 thousand thanks!!

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)