ok this was driving me crazy. i tried it with and without the quotes but i tested it with Open With and Send To (preference. saves a step).
using Open With and the CL contains Quotes. Send To does not. So, it was failing 1/2 the time and i couldn't see why. (If i would have paid attention, i would have noticed that the errors were different.. "couldn't find" vs "couldn't load").
meanwhile, this accounts for either one:
#import_plugin FileExplore
F$ = FileExplore.GetCL()
F$ = GetStringToken(F$, "|", CountStringTokens(F$,"|") )
MSG$ = "Untrimmed"
If LEFT(F$,1) = CHR(34)
F$= Trim(F$)
MSG$ = "Trimmed"
EndIf
SetErrorMode(2)
SetWindowTitle( "ImgView" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 0 )
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
If LOWER(RIGHT(F$,3)) = "png" or LOWER(RIGHT(F$,3)) = "jpg"
Fit(LoadSprite("raw:"+F$))
Else
Message("Invalid Image")
End
Endif
do
Print(MSG$)
Print(F$)
If GetRawKeyState(27) then End
Sync()
loop
Function Trim(This$)
R$ = MID(This$,2,LEN(This$)-2)
EndFunction R$
Function Fit(Spr)
SetSpriteSize(Spr,1024,-1)
If GetSpriteHeight(Spr) > 768 then SetSpriteSize(Spr,-1,768)
SetSpritePositionByOffset(Spr,512,388)
EndFunction
what it doesn't do is account for more than 1 image at a time which i'll save for another day...
thanks, all!