ListRequest error
ListRequest error
My project are a media player. I have this line:
ROD_Playbox_Player = ListRequest(({Width=350, Height=610}), "6. Rakt Over Disc-1978-2022-Playbox-Player", "Select show", {"None",
"1978-05-19.mp3",
"1978-05-26.mp3",
"1978-06-02.mp3", ...
The problem are that I want, is too set the size of the ListRequest too Width=350, Height=610.
I has try different combination, and the. program will compile, but shows error then error.
ROD_Playbox_Player = ListRequest(({Width=350, Height=610}), "6. Rakt Over Disc-1978-2022-Playbox-Player", "Select show", {"None",
"1978-05-19.mp3",
"1978-05-26.mp3",
"1978-06-02.mp3", ...
The problem are that I want, is too set the size of the ListRequest too Width=350, Height=610.
I has try different combination, and the. program will compile, but shows error then error.
Re: ListRequest error
your parameter are complete reversd in order, first is title then-> body then-> choices then-> parameter table
Code: Select all
ROD_Playbox_Player = ListRequest("Select show",
"6. Rakt Over Disc-1978-2022-Playbox-Player",
{"None",
"1978-05-19.mp3",
"1978-05-26.mp3",
"1978-06-02.mp3"
},
{Width=350, Height=610}
)
Christos
Re: ListRequest error
/**************************************************************************/
/*** Version of Hollywood-MAL is at least version 10.0! ***/
/**************************************************************************/
@VERSION 10,0
/****************************************/
/*** Information about this app ***/
/****************************************/
@APPTITLE "ROD-Playbox-Player"
@APPVERSION "$VER: ROD-Playbox-Player V1.0.0 (2023.09.09)"
@APPCOPYRIGHT "(C) Copyright 1971-2071 by Magnus Hammarstrom"
@APPAUTHOR "Magnus Hammarstrom"
@APPDESCRIPTION "ROD-Playbox-Player - OSsys:MacOS HDD: ./Golden/ROD_GOLD/Media"
/***************************************/
/*** Display size and background PIX ***/
/***************************************/
@DISPLAY {X=52, Y=52, Borderless = True, DragRegion = {{X=0, Y=0, Width=616, Height=616}}}
@BGPIC 1, "./HD-BGP/5_playbox_round_616x616.png", {LoadAlpha = True}
/**************************/
/*** Keyboard Function ***/
/**************************/
Function
p_EventFunc(msg)
Switch(msg.action)
Case "OnKeyDown":
/***************/
/* Enter key 1 */
/***************/
/* Enter new key */
If msg.key= "1"
p_Show_ROD_Playbox_Player()
EndIf
/*****************/
/* Enter key ESC */
/* Exit program */
/*****************/
If msg.key="ESC"
End()
EndIf
EndSwitch
EndFunction
/********************************/
/*** End of keyboard function ***/
/********************************/
/****************/
/** 2023-09-09 **/
/**********************************************************************/
/* https://www.hollywood-mal.com/docs/html ... quest.html */
/**********************************************************************/
Function
p_Show_ROD_Playbox_Player()
ROD_Playbox_Player = ListRequest(({Width=600, Height=800}), "6. Rakt Over Disc-1978-2022-Playbox-Player", "Select show", {"None",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3"})
/**************************/
/*** ***/
/**************************/
If ROD_Playbox_Player = -1
Print("Rakt Over Disc - 1978-2022 - Playbox - Player")
ElseIf ROD_Playbox_Player =1 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =2 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =3 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =4 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =5 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =6 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978_Clabbe_Tandberg_Station_Cazzette.mp3")
/**************************/
/*** ***/
/**************************/
Else
Print(" ")
EndIf
EndFunction
/**************************/
/*** EventHandler ***/
/**************************/
InstallEventHandler({OnKeyDown = p_EventFunc})
/**************************/
/*** EventHandler ***/
/**************************/
EscapeQuit(True)
/****************/
/* */
/****************/
Repeat
WaitEvent
Forever
/****************/
/* End program */
/****************/
/**********************/
/* The End 2023-09-09 */
/**********************/
/*** Version of Hollywood-MAL is at least version 10.0! ***/
/**************************************************************************/
@VERSION 10,0
/****************************************/
/*** Information about this app ***/
/****************************************/
@APPTITLE "ROD-Playbox-Player"
@APPVERSION "$VER: ROD-Playbox-Player V1.0.0 (2023.09.09)"
@APPCOPYRIGHT "(C) Copyright 1971-2071 by Magnus Hammarstrom"
@APPAUTHOR "Magnus Hammarstrom"
@APPDESCRIPTION "ROD-Playbox-Player - OSsys:MacOS HDD: ./Golden/ROD_GOLD/Media"
/***************************************/
/*** Display size and background PIX ***/
/***************************************/
@DISPLAY {X=52, Y=52, Borderless = True, DragRegion = {{X=0, Y=0, Width=616, Height=616}}}
@BGPIC 1, "./HD-BGP/5_playbox_round_616x616.png", {LoadAlpha = True}
/**************************/
/*** Keyboard Function ***/
/**************************/
Function
p_EventFunc(msg)
Switch(msg.action)
Case "OnKeyDown":
/***************/
/* Enter key 1 */
/***************/
/* Enter new key */
If msg.key= "1"
p_Show_ROD_Playbox_Player()
EndIf
/*****************/
/* Enter key ESC */
/* Exit program */
/*****************/
If msg.key="ESC"
End()
EndIf
EndSwitch
EndFunction
/********************************/
/*** End of keyboard function ***/
/********************************/
/****************/
/** 2023-09-09 **/
/**********************************************************************/
/* https://www.hollywood-mal.com/docs/html ... quest.html */
/**********************************************************************/
Function
p_Show_ROD_Playbox_Player()
ROD_Playbox_Player = ListRequest(({Width=600, Height=800}), "6. Rakt Over Disc-1978-2022-Playbox-Player", "Select show", {"None",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3"})
/**************************/
/*** ***/
/**************************/
If ROD_Playbox_Player = -1
Print("Rakt Over Disc - 1978-2022 - Playbox - Player")
ElseIf ROD_Playbox_Player =1 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =2 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =3 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =4 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =5 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =6 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978_Clabbe_Tandberg_Station_Cazzette.mp3")
/**************************/
/*** ***/
/**************************/
Else
Print(" ")
EndIf
EndFunction
/**************************/
/*** EventHandler ***/
/**************************/
InstallEventHandler({OnKeyDown = p_EventFunc})
/**************************/
/*** EventHandler ***/
/**************************/
EscapeQuit(True)
/****************/
/* */
/****************/
Repeat
WaitEvent
Forever
/****************/
/* End program */
/****************/
/**********************/
/* The End 2023-09-09 */
/**********************/
Re: ListRequest error
very helpfull you posted code
please always use code embed aka [code] and [/code], so code will be easily readable
also change ListRequest as i posted to you the fixed in post 2 and will compile..
please always use code embed aka [code] and [/code], so code will be easily readable
also change ListRequest as i posted to you the fixed in post 2 and will compile..
Christos
Re: ListRequest error
and if I want set the position?
It will show error "Too many arguments for this function!"
Code: Select all
ROD_Playbox_Player = ListRequest("Select show",
"6. Rakt Over Disc-1978-2022-Playbox-Player",
{"None",
"1978-05-19.mp3",
"1978-05-26.mp3",
"1978-06-02.mp3"
},
{X=52, Y=52}, {Width=350, Height=610}
)Re: ListRequest error
The code are bigger, I have only mad it smaler.
Code: Select all
/****************************************************************/
/*** Version of Hollywood-MAL is at least version 10.0! ***/
/****************************************************************/
@VERSION 10,0
/**********************************/
/*** Information about this app ***/
/**********************************/
@APPTITLE "ROD-Playbox-Player"
@APPVERSION "$VER: ROD-Playbox-Player V1.0.0 (2023.09.09)"
@APPCOPYRIGHT "(C) Copyright 1971-2071 by Magnus Hammarstrom"
@APPAUTHOR "Magnus Hammarstrom"
@APPDESCRIPTION "ROD-Playbox-Player - OSsys:MacOS HDD: ./Golden/ROD_GOLD/Media"
/***************************************/
/*** Display size and background PIX ***/
/***************************************/
@DISPLAY {X=52, Y=52, Borderless = True, DragRegion = {{X=0, Y=0, Width=616, Height=616}}}
@BGPIC 1, "./HD-BGP/5_playbox_round_616x616.png", {LoadAlpha = True}
/**************************/
/*** Keyboard Function ***/
/**************************/
Function
p_EventFunc(msg)
Switch(msg.action)
Case "OnKeyDown":
/***************/
/* Enter key 1 */
/***************/
/* Enter new key */
If msg.key= "1"
p_Show_ROD_Playbox_Player()
EndIf
/*****************/
/* Enter key ESC */
/* Exit program */
/*****************/
If msg.key="ESC"
End()
EndIf
EndSwitch
EndFunction
/********************************/
/*** End of keyboard function ***/
/********************************/
/****************/
/** 2023-09-09 **/
/**********************************************************************/
/* https://www.hollywood-mal.com/docs/html/hollywood/ListRequest.html */
/**********************************************************************/
Function
p_Show_ROD_Playbox_Player()
ROD_Playbox_Player = ListRequest("6. Rakt Over Disc-1978-2022-Playbox-Player", "Select show", {"None",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978-05-19.mp3",
"1978_Clabbe_Tandberg_Station_Cazzette.mp3"}, {Width=1350, Height=1610})
/**************************/
/*** ***/
/**************************/
If ROD_Playbox_Player = -1
Print("Rakt Over Disc - 1978-2022 - Playbox - Player")
ElseIf ROD_Playbox_Player =1 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =2 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =3 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =4 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =5 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978-05-19.mp3")
ElseIf ROD_Playbox_Player =6 Execute("./Database/X64PLayer/macos/mpv ./Database/Golden/ROD_GOLD/Media/1978_Clabbe_Tandberg_Station_Cazzette.mp3")
/**************************/
/*** ***/
/**************************/
Else
Print(" ")
EndIf
EndFunction
/**************************/
/*** EventHandler ***/
/**************************/
InstallEventHandler({OnKeyDown = p_EventFunc})
/**************************/
/*** EventHandler ***/
/**************************/
EscapeQuit(True)
/****************/
/* */
/****************/
Repeat
WaitEvent
Forever
/****************/
/* End program */
/****************/
/**********************/
/* The End 2023-09-09 */
/**********************/Re: ListRequest error
yes the manual says it is 1 parameter (table) not two tables
so the correct way is to make it 1 table
so the correct way is to make it 1 table
Code: Select all
{X=52, Y=52,Width=350, Height=610}Christos
Re: ListRequest error
The X and Y posistion do not work on MacOS. But on Windows are ok. I havent try on Linux
.
- Juan Carlos
- Posts: 932
- Joined: Mon Sep 06, 2010 1:02 pm
Re: ListRequest error
A little suggestion you don't forget include the plugins to play sound music formats, because sometime you have errors because the sound file isn't support without the plugin.
Re: ListRequest error
Yes I know that. But my program are using mpv player, so there are no need of plugins (just now). My plan are too use the internal player in the future.