QT: How to send a local application path to a script button?

Klaus Major klaus at major-k.de
Sun Sep 23 16:48:44 EDT 2007


Hi William,

> Hi there,
>
> I am trying to develop an application which only shows buttons with
> links to programs on our school PC's and Windows 2000 and Windows XP.
> The children are disabled and they don't need Windows at all.
>
> What I do is this:
> on mouseUp
>   answer files "Which application?:"
>   put it into tData
>  ## put "on mouseUp"  & cr & "revGoURL" && "file://" & tData & cr &  
> "end
> ## mouseUp" into fld "path"

put "on mouseUp"  & cr & "revGoURL" && QUOTE & "file://" & tData &  
QUOTE & cr & "end
mouseUp" into fld "path"

>   set the script of btn "1" to field "path"
> end mouseUp
>
> The result almost works but I am missing "":
> on mouseUp
>   revGoURL file:///Applications/Burn.app
> end mouseUp

But I would recommend to use:
...
launch QUOTE & tData & QUOTE
...

> I also know I better use "open process" but that is not permitted in
> the way I am trying to handle this. In the end I also would like the
> application name and icon to appear on the button. I work with RR
> 2.7.4 on Mac OS X 4.10.

You can easily extract the appname by:
...
set the itemdel to "/"
set the label of btn "Your button here" to item -1 of tData
...

But getting the app icon is not possible without extreme efforts with
the built-in capabilities of Rev, I'm afraid.

> Can anyone advise/help me with this one?

Hope that helps.

> greetings,
>
> William
>
>
> -- 
> ICT-coördinator
> Koetsveldschool
> Vrijstaathof 50
> 2572 HB Den Haag
> T 070 - 380 51 39
> www.koetsveldschool.nl

Groetjes

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list