Adding buttons to a script ?
Adding buttons to a script ?
God morning to you all,
Is there a way to easely add a button to a script or a node?
Or add a button at all?
For example if a have a modify track script that I use freqently and I wish to acces that by clicking a button instead of going thru the Tools/scrpits menu.
Or
I have a magic node that I wish to come back to, it would be sweet to just have to click a button and the tree structure folds back to that particular magic node.
Well, just some thoughts I had this morning... have a nice day
//Peter
Is there a way to easely add a button to a script or a node?
Or add a button at all?
For example if a have a modify track script that I use freqently and I wish to acces that by clicking a button instead of going thru the Tools/scrpits menu.
Or
I have a magic node that I wish to come back to, it would be sweet to just have to click a button and the tree structure folds back to that particular magic node.
Well, just some thoughts I had this morning... have a nice day
//Peter
-
- Posts: 1017
- Joined: Wed Mar 01, 2006 1:09 am
- Location: In a jungle down under
- Contact:
There are two kinds script types basically.
Those that goes in the \Scripts\Auto folder and those that goes in the \Scripts\ folder
Those in the \scripts\ folder usually have a section in the \Scripts\Scripts.ini file.
If it is one of those you could do something like this
SubInScript is the sub name of the script, revealed in the scripts.ini like
ProcName=ExportCSV for example
The above could be put under the \Auto\ folder, and you call it something ending with .vbs. I believe the above should work.
Those that goes in the \Scripts\Auto folder and those that goes in the \Scripts\ folder
Those in the \scripts\ folder usually have a section in the \Scripts\Scripts.ini file.
If it is one of those you could do something like this
Code: Select all
Sub OnStartup
With SDB.UI.AddMenuItem(SDB.UI.Menu_TbStandard, 0, 0)
.Caption="My Button to Script"
.IconIndex=52
.UseScript=Script.ScriptPath
.OnClickFunc="DoStuffInOtherScript"
End With
End Sub
Sub DoStuffInOtherScript(o)
Script.Include "C:\Program Files\MediaMonkey\Scripts\SomeScript.vbs"
SubInScript
End Sub
ProcName=ExportCSV for example
The above could be put under the \Auto\ folder, and you call it something ending with .vbs. I believe the above should work.
-
- Posts: 1017
- Joined: Wed Mar 01, 2006 1:09 am
- Location: In a jungle down under
- Contact:
If so, then...
Hey,
Trixmoto have made this awsome scrpit that lets you preview a song without interuping the current playlist.
That is a script that I would love a button attached to.
http://www.mediamonkey.com/forum/viewto ... =previewer
Merry X-mas
//P
Trixmoto have made this awsome scrpit that lets you preview a song without interuping the current playlist.
That is a script that I would love a button attached to.
http://www.mediamonkey.com/forum/viewto ... =previewer
Merry X-mas
//P
-
- Posts: 1017
- Joined: Wed Mar 01, 2006 1:09 am
- Location: In a jungle down under
- Contact:
I see Trixmoto have added a keyboard shortcut being Shift+Alt+P.
That script above should look something like this to work with Trixmoto's Previewer. Maybe he'll consider doing a button as a feature in the next version.
Make a new notepad document, copy the code to it, and save it to your \Scripts\Auto folder.
Use " (double quotes) in front and at the end of the file name when you save, like "PreviewerButton.vbs"
Revised code. Should add a speaker icon to your toolbar called Previewer after restarting MM.
That script above should look something like this to work with Trixmoto's Previewer. Maybe he'll consider doing a button as a feature in the next version.
Make a new notepad document, copy the code to it, and save it to your \Scripts\Auto folder.
Use " (double quotes) in front and at the end of the file name when you save, like "PreviewerButton.vbs"
Code: Select all
'\MediaMonkey\Scripts\Auto\PreviewerButton.vbs
Sub OnStartup
With SDB.UI.AddMenuItem(SDB.UI.Menu_TbStandard, 0, 0)
.Caption="Previewer"
.IconIndex=50
.UseScript=Script.ScriptPath
.OnClickFunc="DoStuff"
End With
End Sub
Sub DoStuff(o)
Script.Include SDB.ApplicationPath & "Scripts\Previewer.vbs"
Previewer
End Sub
MAGIC
Hey DiddeLeeDoo,
Wouderfull!
This is truly magic, I past some text into notepad and like magic a button appears in MM.
I'm so glad you guys take the time and help people like me out, without you MM would not be the best manager out there !!
Thanx again,
(I'm sure I will come back when I need more favours from you magicians)
//P
Wouderfull!
This is truly magic, I past some text into notepad and like magic a button appears in MM.
I'm so glad you guys take the time and help people like me out, without you MM would not be the best manager out there !!
Thanx again,
(I'm sure I will come back when I need more favours from you magicians)
//P
-
- Posts: 14
- Joined: Thu Jul 19, 2007 7:58 am
- Location: belgium
You need to add this...
...above the "Previewer" sub procedure and move the file to the Auto folder. You'll then need to amend the file path in the Scripts.ini file if you want to use the menu bar as well.
Code: Select all
Sub OnStartup
With SDB.UI.AddMenuItem(SDB.UI.Menu_TbStandard, 0, 0)
.Caption="Previewer"
.IconIndex=50
.UseScript=Script.ScriptPath
.OnClickFunc="DoPreviewer"
End With
End Sub
Sub DoPreviewer(obj)
Call Previewer
End Sub
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Well the button appears on the standard toolbar, is this not visible in party mode? Are there any toolbars which do?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
The standard tool-bar is visible only partly: The edit and the three play-buttons are displayed. As the remaining buttons (Visualization,...) are inaccessible as well, I don't think it's possible to modify this party mode setting.
However it's possible to set a hotkey which is available in party mode.
PS: I just noticed another behaviour: When running Previewer script by hotkey the interrupted song always restarts from the beginning. Starting the script by Tools/Scripts or the "Previewer button" works fine.
However it's possible to set a hotkey which is available in party mode.
PS: I just noticed another behaviour: When running Previewer script by hotkey the interrupted song always restarts from the beginning. Starting the script by Tools/Scripts or the "Previewer button" works fine.
-
- Posts: 45
- Joined: Tue Aug 05, 2008 4:16 pm
Re: Adding buttons to a script ?
Hey guys,
interesting topic here, it has to do with my problem
I tried to understand the programming-code but i don't know nothing about that, so my question is if somebody could help me to create a Shortcut for 3 scripts i Use a Lot:
1. PersonalTagEnhancer
http://www.mediamonkey.com/forum/viewto ... agenhancer
2. Auto-Increment TrackNumbers
and
3. The Case checker
I would appreciate any help
interesting topic here, it has to do with my problem
I tried to understand the programming-code but i don't know nothing about that, so my question is if somebody could help me to create a Shortcut for 3 scripts i Use a Lot:
1. PersonalTagEnhancer
http://www.mediamonkey.com/forum/viewto ... agenhancer
2. Auto-Increment TrackNumbers
and
3. The Case checker
I would appreciate any help
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
Re: Adding buttons to a script ?
I'm working on an update to my Right Click for Scripts (link is in my signature) that will allow you to create a toolbar button for any of the scripts available off my Right Click menus. I think the 3 scripts you mentioned would be in that category. I'm hoping to have first beta done to post this weekend. If all you want is Right Click access to those scripts, then my script will do it. If you want a button, then wait for my update.-SuperFunk- wrote:Hey guys,
interesting topic here, it has to do with my problem
I tried to understand the programming-code but i don't know nothing about that, so my question is if somebody could help me to create a Shortcut for 3 scripts i Use a Lot ...
~One