Page 1 of 2
Wrong arguments specified! - Error message
Posted: Sat Sep 03, 2016 3:51 am
by marko
Hi, when dealing with tooltypes..
When I run my Hollywood app executable it promps "Wrong arguments specified!" and the program exits. The error message's window title says HollywoodPlayer.
Not sure if it's Hollywood, my code or my tooltype(s) where the fault is. The weird thing is, if I comment the last tooltype it starts fine.
Any clue someone, what's wrong please??
Re: Wrong arguments specified! - Error message
Posted: Sat Sep 03, 2016 3:57 am
by marko
Here's the tooltypes, if removing the last line it starts fine. If not the error message shows up and then quits.
Code: Select all
CustomTitle = AOS4.1 FE
(BGColor = $F0F0F0)
(FGColor = $111111)
(TitleColor = $1111CC)
(LineColorTop = $000000)
(LineColorBottom = $666666)
(IconShadows = NO)
(MUIinPersonal = NO)
(GraniteInInternet = NO)
3rd-partyGroup = YES
3rd-partyPrefs1_path = "SYS:Prefs/CANDIPrefs"
Re: Wrong arguments specified! - Error message
Posted: Sun Sep 04, 2016 3:00 am
by marko
I now discovered that if I start it from Shell it starts fine, but the error appears when started from WB :S
Re: Wrong arguments specified! - Error message
Posted: Sun Sep 04, 2016 10:09 am
by SamuraiCrow
Are applications supposed to ignore tooltypes from other applications? The only one used by Workbench is donotwait for WBStartup directory-launched background tasks. What are you doing with Candi that needs tooltypes?
Re: Wrong arguments specified! - Error message
Posted: Sun Sep 04, 2016 12:23 pm
by marko
@SamuraiCrow
These tooltypes are for my program Preferences, on OS4Depot
http://os4depot.net/index.php?function= ... rences.lha
Re: Wrong arguments specified! - Error message
Posted: Sun Sep 04, 2016 11:34 pm
by airsoftsoftwair
Weird, I'd need to see a minimal demo script and icon to examine what's going on there...
Re: Wrong arguments specified! - Error message
Posted: Mon Sep 05, 2016 12:29 am
by marko
Nice, stay tuned, give me a day or two for shrinking down the code...
Re: Wrong arguments specified! - Error message
Posted: Wed Sep 07, 2016 1:51 am
by marko
Here's the schrinked code:
Code: Select all
@VERSION 6,0
CustomPath$ = {"", "", "", "", "", "", "", "", ""}
p_BGColor = $D6D6D6
p_FGColor = $111111
p_LineColorTop = $999999
p_LineColorBottom = $FFFFFF
p_TitleColor = #RED
isIconShadows = TRUE
customTitle$ = "AOS4"
is3rdPartyGroup = FALSE
isMUIinPersonal = TRUE
isGraniteInInternet = True
type, fileNameFullPath$ = GetProgramInfo()
If Exists(fileNameFullPath$..".info")
type, tt, deftool$ = GetIconProperties(fileNameFullPath$..".info")
For i = 0 To ListItems(tt) -1
If tt[i].enabled And LowerStr(tt[i].key)="iconshadows" And LowerStr(tt[i].value)="no" Then isIconShadows = FALSE
If tt[i].enabled And LowerStr(tt[i].key)="customtitle"
CustomTitle$ = tt[i].value
EndIf
If tt[i].enabled And LowerStr(tt[i].key)="3rd-partygroup" And LowerStr(tt[i].value)="yes" Then is3rdPartyGroup = TRUE
If tt[i].enabled
ExitOnError(FALSE)
Switch(LowerStr(tt[i].key))
Case "iconshadows" :
If LowerStr(tt[i].value)="no" Then isIconShadows = FALSE
Case "customtitle" :
CustomTitle$ = tt[i].value
Case "3rd-partygroup" :
If LowerStr(tt[i].value)="no" Then is3rdPartyGroup = FALSE
Case "bgcolor" :
p_BGColor = tt[i].value
Case "fgcolor" :
p_FGColor = tt[i].value
Case "titlecolor" :
p_TitleColor = tt[i].value
Case "linecolortop" :
p_LineColorTop = tt[i].value
Case "linecolorbottom" :
p_LineColorBottom = tt[i].value
Case "muiinpersonal" :
If LowerStr(tt[i].value)="no" Then isMUIinPersonal = FALSE
Case "graniteininternet" :
If LowerStr(tt[i].value)="no" Then isGraniteInInternet = FALSE
Default :
For j=0 To 8
If LowerStr(tt[i].key)="3rd-partyprefs"..(j+1).."_path" Then CustomPath$[j] = tt[i].value
Next
EndSwitch
EndIf
Next
Else
SystemRequest("Preferences: Icon not found", "Icon file (.info) for "..filePart(fileNameFullPath$).." not found.", "OK", #REQICON_WARNING)
EndIf
DebugPrint("p_BGColor =", p_BGColor)
DebugPrint("p_FGColor =", p_FGColor)
DebugPrint("p_LineColorTop =", p_LineColorTop)
DebugPrint("p_LineColorBottom =", p_LineColorBottom)
DebugPrint("p_TitleColor =", p_TitleColor)
DebugPrint("isIconShadows =", isIconShadows)
DebugPrint("customTitle$ =", customTitle$)
DebugPrint("is3rdPartyGroup =", is3rdPartyGroup)
DebugPrint("isMUIinPersonal =", isMUIinPersonal)
DebugPrint("isGraniteInInternet =", isGraniteInInternet)
For i=0 To 8
DebugPrint(i+1, "path: "..CustomPath$[i])
Next
I have compiled with the line:
Code: Select all
hollywood TootypesTest.hws -compile "TootypesTest.exe" -locksettings -exetype amigaos4
And here's the icon:
http://m4rko.com/temp/TootypesTest.exe.info.zip
My system is AmigaOS 4.1 FE on a Sam440ep-flex.
Re: Wrong arguments specified! - Error message
Posted: Wed Sep 07, 2016 1:53 am
by marko
The code above runs fine from Shell, but the error message appears when run from Workbench or Filer.
Re: Wrong arguments specified! - Error message
Posted: Wed Sep 07, 2016 9:12 pm
by airsoftsoftwair
Ok, I see. The problem is the hyphen (-) character used by some of your tooltypes. Hollywood doesn't like that. Only English alphabet characters, numbers and the underscore are allowed as tooltype names, i.e. use "3rd_partyGroup = YES" instead of "3rd-partyGroup = YES" ... and so on.