Save an Input dialog value

Discussion about Code Builder Builder and Winlog language support.
joqr231210
Posts: 5
Joined: Fri Jun 16, 2017 5:43 am

Save an Input dialog value

Postby joqr231210 » Sun Jul 09, 2017 1:37 am

[*]Hi Sielco Team,

If I want to do an Input dialog once save a variable, and then have running a code until the end of it (with a lot of cycles between). How can I do it? Every cycle the code ask me with the Input dialog, and I just want to save an initial value.
Like:
temp=InputDialog(Enter the desired temperature, default)
If(temp<35)then
Setdiggatevalue(out,1,1)
Else
Setdiggatevalue(out,1,0)
End

This code ask me for temp every cycle, but i just want to keep it, after the first cycle.

PD: How can I keep a value that change un a cycle if it Will change at the next cycle? (Because i need to declare it)

Thanks

User avatar
admin
Site Admin
Posts: 306
Joined: Tue Nov 17, 2009 1:18 pm

Re: Save an Input dialog value

Postby admin » Mon Jul 10, 2017 10:07 am

Dear Sir,
sorry but I don't understand what do you want to do, something like this?

Code: Select all

Function void callDialog()

    real temp;

    temp = InputDialog("Enter the desired temperature", "title", "");

    while (WindowIsOpen())
        if(temp < 35)then
            SetDigGateValue(out,1,1)
        else
            SetDigVateValue(out,1,0)
        end

        Sleep(500);
    end
end


Best regards

joqr231210
Posts: 5
Joined: Fri Jun 16, 2017 5:43 am

Re: Save an Input dialog value

Postby joqr231210 » Mon Jul 10, 2017 10:42 pm

admin wrote:Dear Sir,
sorry but I don't understand what do you want to do, something like this?

Code: Select all

Function void callDialog()

    real temp;

    temp = InputDialog("Enter the desired temperature", "title", "");

    while (WindowIsOpen())
        if(temp < 35)then
            SetDigGateValue(out,1,1)
        else
            SetDigVateValue(out,1,0)
        end

        Sleep(500);
    end
end


Best regards


Yes, thaks a lot! I forgot the while, bah.

Another question, when I open the runtime, a Window Says: An error ocurred while initializing http server. Please verificar that specified poder (80) is not currently used by another program. ....

But i have checked and any program is using this port. What could be happenning?

User avatar
admin
Site Admin
Posts: 306
Joined: Tue Nov 17, 2009 1:18 pm

Re: Save an Input dialog value

Postby admin » Tue Jul 11, 2017 7:36 am

Dear Sir,
try to set http port in project configurtion to 88 (for example) and try to start Runtime. Do you have the same error?

Best Regards

joqr231210
Posts: 5
Joined: Fri Jun 16, 2017 5:43 am

Re: Save an Input dialog value

Postby joqr231210 » Tue Jul 11, 2017 3:28 pm

admin wrote:Dear Sir,
try to set http port in project configurtion to 88 (for example) and try to start Runtime. Do you have the same error?

Best Regards



Yes admin, i tried with 88, 90, 140, 144 and the error is the same. What can i do?

User avatar
admin
Site Admin
Posts: 306
Joined: Tue Nov 17, 2009 1:18 pm

Re: Save an Input dialog value

Postby admin » Tue Jul 11, 2017 4:02 pm

Dear Sir,
please try to disable Windows Firewall and any type of antivirus.

Thanks

joqr231210
Posts: 5
Joined: Fri Jun 16, 2017 5:43 am

Re: Save an Input dialog value

Postby joqr231210 » Tue Jul 11, 2017 4:16 pm

admin wrote:Dear Sir,
please try to disable Windows Firewall and any type of antivirus.

Thanks


Dear Admin,

I disabled the Windows Firewall and the Windows Defender, and the result is the same, I also tried with 46820, 9200 and others. What is the correct configuration in the TCP and Web Options ? Disable or enable TCP Server / Client? Java web server port? FastCGI?

Thanks

User avatar
admin
Site Admin
Posts: 306
Joined: Tue Nov 17, 2009 1:18 pm

Re: Save an Input dialog value

Postby admin » Thu Jul 13, 2017 7:35 am

Dear Sir,
you have converted the Web server application correct? Can you please post your application?

Best Regards


Return to “Code - Code Builder”

Who is online

Users browsing this forum: No registered users and 0 guests