Script for Palmbutler (1 Viewer)

HTPC-Fan

Portal Member
August 28, 2004
10
0
Hi,

for the people who would like to use the Palmbutler remote with MediaPortal. I made a script. You possibly have to change the directory path.
Filename = MP.PSM
---------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-16"?>

<Module>
<Name>MediaPortal</Name>
<Description>MediaPortal control</Description>
<RunWithShadow>true</RunWithShadow>
<ShadowOverride>true</ShadowOverride>
<Standalone>true</Standalone>
<?Script VBScript

?>
<Events>

<OnInitialization>
<?Script VBScript
Dim WshShell, bKey, hWnd, LResult
Set WshShell = CreateObject("WScript.Shell")
pbMenu.Visible = 0
WshShell.CurrentDirectory = ("C:\Programme\Team MediaPortal\MediaPortal\")
Set MP = Exec("C:\Programme\Team MediaPortal\MediaPortal\MediaPortal")
Sleep 4000
If not WshShell.AppActivate(MP.ProcessID) Then
MsgBox "App not activated", 0, ":)"
End If


?>
</OnInitialization>
<OnFinalization>
<AppActivate WindowName="Media Portal"/>
<SendKeys Alt="true" Keys="{F4}"/>
<Sleep Time="100"/>
<SetMenuVisible>true</SetMenuVisible>
</OnFinalization>
<OnKeyBlue>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="s"/>
</OnKeyBlue>
<OnKeyGreen>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="X"/>
</OnKeyGreen>
<OnKeyRed>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys=" "/>
</OnKeyRed>
<OnKeyStar>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="*"/>
</OnKeyStar>
<OnKeyPlay>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{ }"/>
</OnKeyPlay>
<OnKeyStop>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="b"/>
</OnKeyStop>
<OnKeyNext>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{F8}"/>
</OnKeyNext>
<OnKeyRight>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{Right}"/>
</OnKeyRight>
<OnKeyLeft>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{Left}"/>
</OnKeyLeft>
<OnKeyUp>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{Up}"/>
</OnKeyUp>
<OnKeyDown>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{Down}"/>
</OnKeyDown>
<OnKeyEnter>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{Enter}"/>
</OnKeyEnter>
<OnKeyVolUp>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="="/>
</OnKeyVolUp>
<OnKeyVolDown>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="-"/>
</OnKeyVolDown>
<OnKeyMenu>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="{Esc}"/>
</OnKeyMenu>
<OnKey0>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="0"/>
</OnKey0>
<OnKeyMute>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="Y"/>
</OnKeyMute>
<OnKey1>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="1"/>
</OnKey1>
<OnKey2>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="2"/>
</OnKey2>
<OnKey3>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="3"/>
</OnKey3>
<OnKey4>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="4"/>
</OnKey4>
<OnKey5>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="5"/>
</OnKey5>
<OnKey6>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="6"/>
</OnKey6>
<OnKey7>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="7"/>
</OnKey7>
<OnKey8>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="8"/>
</OnKey8>
<OnKey9>
<AppActivate WindowName="Media Portal"/>
<SendKeys Keys="9"/>
</OnKey9>
</Events>
</Module>
 
A

Anonymous

Guest
Hey, I've been looking for something like this. (well, actually I've been looking for something that would circumvent that damned Palmbutler software completely, and just make the remote itself work directly with Girder or something like that.)
In absense of such a thing this will do.

However, I can't get it to work at all. Perhaps I should post this in the palmbutler forum, but that is all but dead.

When I try to run the script nothing happens. Just a green Palmbutler screen. No error messages or any sort of attempt to run the program at all. I have changed the path in the file to the correct one, but no cigar. Any idea what I might be doing wrong?

/Jacob Andersen
 

HTPC-Fan

Portal Member
August 28, 2004
10
0
Hi Jacob,

I don't know any software that can replace the original one. I have heard that it is possible to use WinLIRC for the infrared version of Palmbutler. But it does not work at all for me. I can't train WinLIRC for the Palmbutler remote and furthermore, using the existing file of another guy is also without success.

I looked at the script again. Hm, if you have changed both directory paths, it should work. Please check following again:
WshShell.CurrentDirectory = ("C:\Programme\Team MediaPortal\MediaPortal\")
Hint: Please examine if you also put the backslash "\" at the end of directory name.

Set MP = Exec("C:\Programme\Team MediaPortal\MediaPortal\MediaPortal")
Hint: Second path to change. Cause it is calling the program, there is no
backslash there.

If all is correct, please inform me about the model of your Palmbutler as well as software version. Thanks

Regards
HTPC-Fan
 
A

Anonymous

Guest
Hi

I've tried the script you wrote and I don't know why but it doesn't work. Only a green screen of Palmbutler. I have checked the path of Program and it's ok. I have Palmbutler 3000 with software 2.3.0. (I can't get any newer).
Can anyone help me?

Thank you
Kevin
 
A

Anonymous

Guest
Kevin41 said:
Hi

I've tried the script you wrote and I don't know why but it doesn't work. Only a green screen of Palmbutler. I have checked the path of Program and it's ok. I have Palmbutler 3000 with software 2.3.0. (I can't get any newer).
Can anyone help me?

Thank you
Kevin

I have the same here, only a green palmbutler screen.
Do you have any sugestions? (HTPC-fan)

This is the change I made.


WshShell.CurrentDirectory = ("C:\Program Files\Team MediaPortal\MediaPortal\")
Set MP = Exec("C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal")
Sleep 4000
If not WshShell.AppActivate(MP.ProcessID) Then
MsgBox "App not activated", 0, ""
End If
 
A

Anonymous

Guest
My working (MediaPortal.psm) script looks like this.

Code:
<?xml version="1.0" encoding="UTF-16"?>
<Module>
	<Description>Media Portal</Description>
	<RunWithShadow>true</RunWithShadow>
	<ShadowOverride>true</ShadowOverride>
	<Standalone>false</Standalone>
	<?Script VBScript
		Dim MediaPortal, WshShell
		Set WshShell = CreateObject("WScript.Shell")
	?>
	<Events>
		
		<OnInitialization>
			<?Script VBScript
				Dim hWnd, LResult, URL
				URL=pbMenu.CurItem.URL
				pbMenu.Visible = false
				Set MediaPortal = Exec("%programfiles%\Team MediaPortal\MediaPortal\MediaPortal.exe "+URL)
				Sleep 200
			?>
		</OnInitialization> 
<OnFinalization> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Alt="true" Keys="{F4}"/> 
<Sleep Time="100"/> 
<SetMenuVisible>true</SetMenuVisible> 
</OnFinalization> 
<OnKeyBlue> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="s"/> 
</OnKeyBlue> 
<OnKeyGreen> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="X"/> 
</OnKeyGreen> 
<OnKeyRed> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys=" "/> 
</OnKeyRed> 
<OnKeyStar> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="*"/> 
</OnKeyStar> 
<OnKeyPlay> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{ }"/> 
</OnKeyPlay> 
<OnKeyStop> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="b"/> 
</OnKeyStop> 
<OnKeyNext> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{F8}"/> 
</OnKeyNext> 
<OnKeyRight> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{Right}"/> 
</OnKeyRight> 
<OnKeyLeft> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{Left}"/> 
</OnKeyLeft> 
<OnKeyUp> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{Up}"/> 
</OnKeyUp> 
<OnKeyDown> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{Down}"/> 
</OnKeyDown> 
<OnKeyEnter> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{Enter}"/> 
</OnKeyEnter> 
<OnKeyVolUp> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="="/> 
</OnKeyVolUp> 
<OnKeyVolDown> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="-"/> 
</OnKeyVolDown> 
<OnKeyMenu> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="{Esc}"/> 
</OnKeyMenu> 
<OnKey0> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="0"/> 
</OnKey0> 
<OnKeyMute> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="Y"/> 
</OnKeyMute> 
<OnKey1> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="1"/> 
</OnKey1> 
<OnKey2> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="2"/> 
</OnKey2> 
<OnKey3> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="3"/> 
</OnKey3> 
<OnKey4> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="4"/> 
</OnKey4> 
<OnKey5> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="5"/> 
</OnKey5> 
<OnKey6> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="6"/> 
</OnKey6> 
<OnKey7> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="7"/> 
</OnKey7> 
<OnKey8> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="8"/> 
</OnKey8> 
<OnKey9> 
<AppActivate WindowName="Media Portal"/> 
<SendKeys Keys="9"/> 
</OnKey9> 
</Events> 
</Module>
 
A

Anonymous

Guest
How to start Media Portal with this script?

Hi,
Can anyone tell me how I can start Media Portal with this Palmbutler script? Or how can I tell Media Portal to use this script?

I'm a newby to this can anyone please help?
 

HTPC-Fan

Portal Member
August 28, 2004
10
0
Hello there,

it is really strange that it does not work. But I never tried with the old 2.3

On the other hand, I have to agree that the forum has modified the script a little bit...

Please change following line:
MsgBox "App not activated", 0, ""

to this one:
MsgBox "App not activated", 0, "Error"

Maybe, you can also tell me why you like to use version 2.3 resp. cannot get newer release.

Regards
HTPC-Fan
 

Users who are viewing this thread

Top Bottom