Open a Plugin via Script

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Open a Plugin via Script

Geoff Canyon via use-livecode
Hi all.

You would think all the plugin stacks would be "known" by the IDE, but when I attempt to open a plugin by name, either short name or the actual file name (without the path) Livecode cannot find it. There is no SpecialFolderPath option for the plugins folder. (Maybe there should be??) So I cannot programmatically discern where the plugins are.

You will ask, "Why do you need that? Just open it from the developers menu!" Well I have my own Developers Menu, with just the stuff I use all the time, and I don't necessarily want to switch to pointer mode to get to it, then switch back again. It's not a big deal, but I'd like to make that work if I can.

Bob S


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Open a Plugin via Script

Geoff Canyon via use-livecode
If this is just for your own Dev use then the installed plugins should be in 2 locations, on Mac inside the App bundle;
e.g. /Applications/LiveCode Indy 9.0.1.app/Contents/Tools/Plugins

I’d guess a similar location in Widows inside the App folder.

The user installed plugins should be in the "My LiveCode” folder inside your “Documents” folder or wherever you set the Extensions Folder under Preferences. I’m sure you know all this anyway, but if you need to build this info programatically you could hook into the revIDE scripts…

#Place in the Script of a Menu Button
local sMenu,sPlugins

on mouseEnter // Build the menu
   put revIDEPlugins() into sPlugins // Returns an array of installed Plugins
   put the keys of sPlugins into sMenu
   sort sMenu
   set the text of me to sMenu
end mouseEnter

on menuPick pItemName // Just so we can choose one plugin
   open stack sPlugins[pItemName]["path"]
end menuPick

I’m sure you can adapt the above. :)

Paul

> On Oct 12, 2018, at 11:18, Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Hi all.
>
> You would think all the plugin stacks would be "known" by the IDE, but when I attempt to open a plugin by name, either short name or the actual file name (without the path) Livecode cannot find it. There is no SpecialFolderPath option for the plugins folder. (Maybe there should be??) So I cannot programmatically discern where the plugins are.
>
> You will ask, "Why do you need that? Just open it from the developers menu!" Well I have my own Developers Menu, with just the stuff I use all the time, and I don't necessarily want to switch to pointer mode to get to it, then switch back again. It's not a big deal, but I'd like to make that work if I can.
>
> Bob S
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



Paul
[hidden email]

Mac OS Sierra 10.12.1




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Open a Plugin via Script

Geoff Canyon via use-livecode
In reply to this post by Geoff Canyon via use-livecode
On 10/12/2018 11:18 AM, Bob Sneidar via use-livecode wrote:
> Hi all.
>
> You would think all the plugin stacks would be "known" by the IDE, but when I attempt to open a plugin by name, either short name or the actual file name (without the path) Livecode cannot find it. There is no SpecialFolderPath option for the plugins folder. (Maybe there should be??) So I cannot programmatically discern where the plugins are.

put revenvironmentpluginspath()
put revenvironmentuserpluginspath()

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Open a Plugin via Script

Geoff Canyon via use-livecode
In reply to this post by Geoff Canyon via use-livecode
That's the ticket! :-)

Bob S


> On Oct 12, 2018, at 12:45 , Paul Hibbert via use-livecode <[hidden email]> wrote:
>
> revIDEPlugins()


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Open a Plugin via Script

Geoff Canyon via use-livecode
In reply to this post by Geoff Canyon via use-livecode
That too!

Bob S


> On Oct 12, 2018, at 12:48 , Mark Wieder via use-livecode <[hidden email]> wrote:
>
> put revenvironmentuserpluginspath()


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Open a Plugin via Script

Geoff Canyon via use-livecode
The first solution is great if you need to enumerate the plugins. The second is good for just prepending the path before the stack name. Works a peach!

Thanks guys.


>> On Oct 12, 2018, at 12:45 , Paul Hibbert via use-livecode <[hidden email]> wrote:
>>
>> revIDEPlugins()

>> On Oct 12, 2018, at 12:48 , Mark Wieder via use-livecode <[hidden email]> wrote:
>>
>> put revenvironmentuserpluginspath()
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode