Post by honkytonk on Jun 23, 2019 8:03:52 GMT
Hello good morning,
In a folder, I have a file "rgb.html" (which opens well with Firefox.
And the following code:
As with clicking on "Open Color" Windows returns: "unknow error 11"
I launched Firefox with the same procedure, and it starts; I put two seconds of delay before opening: "rgb.html" and it say: One shot: "Not found", one shot: "Error 11"
What can happen?
In a folder, I have a file "rgb.html" (which opens well with Firefox.
And the following code:
NOMAINWIN
WindowWidth = 410
WindowHeight = 190
UpperLeftX = (DisplayWidth-WindowWidth)-200
UpperLeftY = 20 ' (DisplayHeight-WindowHeight)
BUTTON #w.go, "Convert !", [go], UL, 320, 40, 70, 25
BUTTON #w.new, "New", [new], UL, 320, 70, 70, 20
BUTTON #w.op, "Open Color", [op], UL, 320, 100, 70, 20
TEXTEDITOR #w.te, 10, 40, 300, 80
GRAPHICBOX #w.m 5, 5, 395, 130
OPEN "RGB for html" FOR window_nf AS #w
#w, "TRAPCLOSE [closeconv]"
#w.m "down;fill darkred"
#w.te, "!font courrier 16 bold": #w.m, "font courrier 14 bold"
#w.m, "color yellow;backcolor darkred"
#w.m, "place 20 20": #w.m, "\New-->Paste RGB-->Copy Hexadec"
base=16: b=16: #w.te, "255 200 212 (Exemple)"
#w.m, "flush"
wait
[new]
#w.te, "!cls"
wait
[op]
run "D:\Program Files\Mozilla Firefox\firefox.exe"
gosub [pause]
run "rgb.html"
wait
[go]
b$=""
#w.te, "!contents? string$"
for x=1 to 3
n=val(word$(string$,x))
nDec=n: base=b
gosub [convert]
stock$(x)=b$
b$=""
next x
#w.te, stock$(1);stock$(2);stock$(3)
wait
[convert]
p = 0
while base ^ p <= nDec
scan
p = p + 1
wend
for pow = p to 0 step -1
scan
if nDec >= base ^ pow then
d = int(nDec / base ^ pow)
if d < 10 then
b$ = b$ + str$(d)
else
b$ = b$ + chr$(65 + d - 10)
end if
nDec = nDec - d * base ^ pow
else
if b$ <> "" then b$ = b$ + "0"
end if
next
if b$ = "" then b$ = "0"
stock$(x)=b$
return
[pause] 'bloc à mettre où tu veux puisqu'indépendant
timer 2000, [temps] 'pause en millisecondes
wait
[temps]
timer 0
return
[closeconv]
CLOSE #w
END
As with clicking on "Open Color" Windows returns: "unknow error 11"
I launched Firefox with the same procedure, and it starts; I put two seconds of delay before opening: "rgb.html" and it say: One shot: "Not found", one shot: "Error 11"
What can happen?