xboxscene.org forums

Author Topic: Mytv Script Works Perfectly, But...  (Read 181 times)

joshgambit

  • Archived User
  • Newbie
  • *
  • Posts: 6
Mytv Script Works Perfectly, But...
« on: January 06, 2006, 02:33:00 PM »



I thought this would work under the My Videos submenu:

                  <bookmark>
      <name>TV Channel Listings</name>
      <path>F:\Apps\XBMC\Scripts\myTV\myTV.py</path>
     </bookmark>

But it doesn't work.  You can click it, but it doesn't do anything.  Any ideas to make this work?

Thanks!
Logged

joshgambit

  • Archived User
  • Newbie
  • *
  • Posts: 6
Mytv Script Works Perfectly, But...
« Reply #1 on: January 07, 2006, 04:17:00 PM »


Bump Please.

I'd really like this to work, but I'm clueless...any ideas??

I tried adding <execute>yadda</execute>
also tried adding <path> </path> around THAT...

I'm out of ideas...
Logged

joshgambit

  • Archived User
  • Newbie
  • *
  • Posts: 6
Mytv Script Works Perfectly, But...
« Reply #2 on: January 09, 2006, 11:03:00 AM »


Figured it out with some help over at the forums at xboxmediacenter.com...


Just added a button to the MyVideos skin file, with

<execute>F:\Apps\XBMC\Scripts\myTV\myTV.py</execute>

Anyone want additional info on this, let me know...I've now done it with 4 other scripts...works great.
Logged

hiaw

  • Archived User
  • Newbie
  • *
  • Posts: 5
Mytv Script Works Perfectly, But...
« Reply #3 on: March 19, 2006, 02:29:00 PM »

QUOTE(joshgambit @ Jan 10 2006, 06:34 AM) View Post

Figured it out with some help over at the forums at xboxmediacenter.com...
Just added a button to the MyVideos skin file, with

<execute>F:\Apps\XBMC\Scripts\myTV\myTV.py</execute>

Anyone want additional info on this, let me know...I've now done it with 4 other scripts...works great.



Hi Josh,

Thanks for the tip. I managed to get it working, but I haven't figure out how to change the label on the button. Can you give me a hint? Cheers
Logged

timdog82001

  • Archived User
  • Sr. Member
  • *
  • Posts: 446
Mytv Script Works Perfectly, But...
« Reply #4 on: March 25, 2006, 11:04:00 PM »

QUOTE(joshgambit @ Jan 9 2006, 06:34 PM) View Post

Figured it out with some help over at the forums at xboxmediacenter.com...
Just added a button to the MyVideos skin file, with

<execute>F:\Apps\XBMC\Scripts\myTV\myTV.py</execute>

Anyone want additional info on this, let me know...I've now done it with 4 other scripts...works great.


Could you possibly be a little more descriptive about how to do this?  Should it look like this?

<button>
    <execute>Q:\Scripts\Music\iTunes Web Radio\iTunes Web Radio.py\</execute>
</button>

....or should it have all the other garbage i saw with the other "buttons", for example...

<button>
            <description>Weather</description>
            <label>8</label>
            <execute>XBMC.ActivateWindow(2600)</execute>
            <icon>107</icon>
</button>


and lastly....Where exactly does it go?  Do you just toss it in with all the bookmarks under the my videos section?

Either way I do it, I'm not getting it to show up at all.  Any help would be GREATLY appreciated.  Thanks!
Logged

hiaw

  • Archived User
  • Newbie
  • *
  • Posts: 5
Mytv Script Works Perfectly, But...
« Reply #5 on: March 26, 2006, 01:23:00 AM »

Hi,

The file you want to edit is in the skin directory. ie.

.../XBMC/skin/Project Mayhem III/PAL/MyVideo.xml

Place similar code immediately underneath the last button in the file, just search for button upward from the end of the file.

      <control>
        <description>Stacking</description>
        <type>button</type>
      <execute>******D*******\XBMC\scripts\*****C****.py</execute>
        <id>81</id>
        <posx>50</posx>
        <posy>303</posy>
        <label>346</label>
        <onleft>50</onleft>
        <onright>50</onright>
        <onup>******A*********</onup>
        <ondown>********B*******</ondown>
      </control>

A is the number corrensponding to the button immediate above this new button
B is the number corrensponding to the button immediate below this new button
C is the name of the python script you want it to run
D is the exact path of the python script.

For the value of A, look at the button immediately above, and copy the <id> value
For the value of B, look at the first button of the list, and copy the <id> value

Hope that helps you get started. And if you figure out how to change the label text, let me know. Cheers
Logged

timdog82001

  • Archived User
  • Sr. Member
  • *
  • Posts: 446
Mytv Script Works Perfectly, But...
« Reply #6 on: March 26, 2006, 01:17:00 PM »

Ok, I got it working I guess...but the botton shows up right in the middle of the screen, covering up the part where it says "F Drive" and "ReplayTV" and all that stuff.....is there a way to move it so its actualy over with the other buttons??
Logged

hiaw

  • Archived User
  • Newbie
  • *
  • Posts: 5
Mytv Script Works Perfectly, But...
« Reply #7 on: March 31, 2006, 12:18:00 AM »

Hi,

Just make sure that this following parameters are the same for you new button and for your old buttons. It's just a basic parameter to describe where the button should be, I think.

<posx>50</posx>
<posy>303</posy>
Logged

timdog82001

  • Archived User
  • Sr. Member
  • *
  • Posts: 446
Mytv Script Works Perfectly, But...
« Reply #8 on: April 20, 2006, 05:51:00 PM »

Do you know how to make the buttons open up a new window instead of a file?  I have my scripts organized into folders (music, news, etc) and I'd like to be able to add a button that would open up the folder with the scripts in it.  I know there's the XBMC.OpenWindow or something like that, but this is a folder I added and not an actual part of xbmc so it doesn't have it's own ID, so i'm not sure what to do....I tried doing it with that anyway and instead of the ID I put in the path, but it didn't work.  Any ideas?
Logged

Osanya

  • Archived User
  • Jr. Member
  • *
  • Posts: 65
Mytv Script Works Perfectly, But...
« Reply #9 on: November 14, 2006, 06:40:00 PM »

For anyone else that's interested, the new tag is <onclick>
there's info here:
http://www.xboxmedia...=Button_control

and the function is XBMC.RunScript(PATH_TO_THE_SCRIPT)
more info here:
http://www.xboxmedia...lt_In_Functions

so it should look something like:

<onclick>XBMC.RunScript(Q:/sripts/mytv/default.py)</onclick>

Logged