Post by angelo2449 on Jul 27, 2021 10:08:39 GMT -5
Hi guys,
I think I have already posted something similar!
In the following code, after clicking the radio button and opening the numeric keypad, something strange happens.
When the numeric keypad is closed, it reopens !! ?
This is due to the > reset < of the radiobuttons.
Thank you
I think I have already posted something similar!
In the following code, after clicking the radio button and opening the numeric keypad, something strange happens.
When the numeric keypad is closed, it reopens !! ?
This is due to the > reset < of the radiobuttons.
Thank you
nomainwin
WindowWidth = 470
WindowHeight = 270
UpperLeftX=int((DisplayWidth-WindowWidth)/2) - 100
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
BackgroundColor$ = "yellow"
ForegroundColor$ = "black"
texteditor #main.edit, -400, -400, 200, 25
statictext #main.t1, "Valore Primo Raggio ..(Sx)", 25, 25, 275, 20
TextboxColor$ = "white"
textbox #main.r1, 310, 20, 100, 25
radiobutton #main.tar1, "", [PrimoSet], [PrimoReset], 420, 20, 25, 25
statictext #main.t2, "Valore Secondo Raggio (DX)", 25, 65, 275, 20
textbox #main.r2, 310, 60, 100, 25
radiobutton #main.tar2, "", [SecondoSet], [ScondoReset], 420, 60, 25, 25
statictext #main.t3, "Nome del Punto ", 25, 105, 140, 20
textbox #main.n1, 185, 100, 225, 25
radiobutton #main.tan1, "", [NomeSet], [NomeReset], 420, 100, 25, 25
ya = 40
button #main.b1,"Info",[Info], UL, 25, ya + 110, 100, 40
button #main.b2,"Annulla",[Annulla], UL, 145, ya + 110, 100, 40
button #main.b3,"Accetta",[Accetta], UL, 265, ya + 110, 145, 40
open "Intersezione in Avanti by Angelo Ambrogio Montoli" for window as #main
#main, "font courier_new 10 17 bold"
#main, "trapclose [quit.main]"
#main.r1, "!setfocus"
wait
'-----------------------------
[Info]
if FileExists("C:\AutocadSupporto\Info\Cerchi.txt") then
Run "Notepad " + "C:\AutocadSupporto\Info\Cerchi.txt"
end if
wait
'-----------------------------
[PrimoSet]
Dove$ = "#main.r1"
Butt$ = "#main.tar1"
goto [TASTIERA.NUMERICA]
wait
'-----------------------------
[SecondoSet]
Dove$ = "#main.r2"
Butt$ = "#main.tar2"
goto [TASTIERA.NUMERICA]
wait
'-----------------------------
[NomeSet]
Dove$ = "#main.n1"
Butt$ = "#main.tan1"
'goto [Tastiera]
wait
'-----------------------------
[PrimoReset]
[SecondoReset]
[NomeReset]
wait
'-----------------------------
[Accetta]
#main.r1, "!contents? Raggio1$"
Raggio1$ = trim$(Raggio1$)
if Raggio1$ = "" then
Notice "Attenzione" + chr$(13) + "Valore Primo Raggio nullo"
wait
end if
#main.r2, "!contents? Raggio2$"
Raggio2$ = trim$(Raggio2$)
if Raggio2$ = "" then
Notice "Attenzione" + chr$(13) + "Valore Secondo Raggio nullo"
wait
end if
#main.n1, "!contents? Nome1$"
Nome1$ = trim$(Nome1$)
if Nome1$ = "" then
Notice "Attenzione" + chr$(13) + "Nome delPunto Inesistente"
wait
end if
#main.edit, "!cls";
#main.edit, Raggio1$ + "#" + Raggio2$ + "#" + Nome1$;
#main.edit, "!selectall";
#main.edit, "!copy";
close #main
end
'-----------------------------
[Annulla]
[quit.main]
#main.edit, "!cls";
#main.edit, "Fine";
#main.edit, "!selectall";
#main.edit, "!copy";
close #main
end
'-----------------------------
[Numerici]
button #tast.b1, "1", [B1], UL, 25, 20, 25, 25
button #tast.b2, "2", [B2], UL, 55, 20, 25, 25
button #tast.b3, "3", [B3], UL, 85, 20, 25, 25
button #tast.b4, "4", [B4], UL, 115, 20, 25, 25
button #tast.b5, "5", [B5], UL, 145, 20, 25, 25
button #tast.b6, "6", [B6], UL, 175, 20, 25, 25
button #tast.b7, "7", [B7], UL, 205, 20, 25, 25
button #tast.b8, "8", [B8], UL, 235, 20, 25, 25
button #tast.b9, "9", [B9], UL, 265, 20, 25, 25
button #tast.b0, "0", [B0], UL, 295, 20, 25, 25
button #tast.punto, ".", [BPunto], UL, 325, 20, 25, 25
button #tast.bak, "<<", [Bbak], UL, 355, 20, 25, 25
button #tast.bcls, "CL", [Bcls], UL, 385, 20, 25, 25
button #tast.enter, "Enter", [Benter], UL, 415, 20, 100, 25
return
'-----------------------------
[TASTIERA.NUMERICA]
WindowWidth = 550
WindowHeight = 105
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2) - 120
BackgroundColor$ = "blue"
ForegroundColor$ = "yellow"
gosub [Numerici]
open "Tastiera" for window as #tast
#tast, "font courier_new 10 16 bold"
#tast, "trapclose [quit.tast]"
wait
' ---------------
[B1]
Car$ = "1"
goto [Componi]
[B2]
Car$ = "2"
goto [Componi]
[B3]
Car$ = "3"
goto [Componi]
[B4]
Car$ = "4"
goto [Componi]
[B5]
Car$ = "5"
goto [Componi]
[B6]
Car$ = "6"
goto [Componi]
[B7]
Car$ = "7"
goto [Componi]
[B8]
Car$ = "8"
goto [Componi]
[B9]
Car$ = "9"
goto [Componi]
[B0]
Car$ = "0"
goto [Componi]
[BPunto]
Car$ = "."
goto [Componi]
[Bcls]
#Dove$, ""
wait
[Bbak]
#Dove$, "!contents? Contenuto$"
Contenuto$ = left$(Contenuto$, len(Contenuto$) - 1)
#Dove$, Contenuto$
wait
' ---------------
[Benter]
#Dove$, "!contents? Contenuto$"
if val(trim$(Contenuto$)) = 0 then
Notice "Attenzione" + chr$(13) + "Valore non valido!"
wait
end if
close #tast
wait
' ---------------
[Componi]
if Car$ = "." or Car$ = "0" then goto [Salta1]
select case Dove$
case "#main.r1"
if val(Car$) = 0 then
Notice "Attenzione" + chr$(13) + "Deve essere un Numero!"
#main.r1, "!setfocus"
wait
end if
case "#main.r2"
if val(Car$) = 0 then
Notice "Attenzione" + chr$(13) + "Deve essere un Numero!"
#main.r2, "!setfocus"
wait
end if
case "#main.n1"
end select
[Salta1]
#Dove$, "!contents? Contenuto$"
Contenuto$ = Contenuto$ + Car$
#Dove$, Contenuto$
wait
' ---------------
[quit.tast]
#Dove$, ""
close #tast
#Butt$, "reset"
wait
'-----------------------------
function FileExists(FilePath$)
dim FileExistsInfo$(1,1)
files "", FilePath$, FileExistsInfo$(
FileExists = val(FileExistsInfo$(0,0))
end function
'-----------------------------