I could show code, but there be no point here.

All I wish to know is, when someone types a certain string in, can i make the program start a download when they press enter after the typing?

something like this-
[all var's are already declared]
[f3 = what they typed]

if f3 < 10 then
begin
writeln('Wrong key');
goto 1;
end;
if f3 = 10 then
begin
<I WANT TO PUT A DOWNLOAD LINK HERE>
goto 2;
end;
if f3 > 10 then
begin
writeln('Wrong key');
goto 1;
end;
2:
end.

Recommended Answers

All 13 Replies

All I wish to know is, when someone types a certain string in, can i make the program start a download when they press enter after the typing?

yes, you can.

i'm not sure that i understand. what you have typed there as example is ok, but which is your question?? you ask if your code is correct, or how to download or what? you are trying to put in your code something like
if f3 = 10 then
begin
http://test.com
goto 2;
end;this wouldn't work.

explain what you want to acomplish abd we'll try to help.

best regards,

I want, when the correct number is input, a download box to pop up. So if i put a download link, a link to a .exe file or some file, how can i make it pop up?

i think you are using dev-pascal. i am not sure that you can create a pop-up window. in pascal i know that the command for execute a file is Exec. maybe someone from here cand give more information. i haven't work with dev-pascal.

best regards,

popup windows work only in a graphical user interface, not in a text based interface (unless you're using a library mimmicking a graphical user interface in full screen text mode, what people did 15 years ago).

What I don't know is if his Pascal version has any networking libraries, which he'd need to do his http (I presume, he doesn't seem to have advanced enough knowledge to know about the existence of other transfer protocols) over tcp call.
I seriously doubt dev-Pascal has that though, being as old, non-standard compliant, and incomplete as it is.

Erm... you said you know that you can in Delphi/Lazarus, could you perhaps tell me?

What he's asking is not of the message box at all. I know nothing of PASCAL, so I can't help, but I can explain what he is saying.

He means that when a certain key or button? is pressed, the program should bring the user to a webpage.com/programupdate.exe program and download it. Is there any way to do this in PASCAL?

as I said before, there is.
In Delphi there are a lot of networking components available as standard, if it's plain old Pascal he may have to search for or write his own networking stack first, but it can certainly be done.
How do you think people write web browsers?

Hehe... Don't the cool people use ASM for the fancy web browsers like FF and IE, as well as programs like Dev-CPP?

I know Dev-CPP is written in ASM because I change the source around a lot.

popup windows work only in a graphical user interface, not in a text based interface (unless you're using a library mimmicking a graphical user interface in full screen text mode, what people did 15 years ago).

Hey wow, I do this in QBASIC when I write my leet BASIC programs! We all need text-based GUI's again, they kick butt; except when it comes to moving the windows with a mouse in QB, then it blows, because it's hard to get the mouse to work in BASIC... But back to PASCAL, I don't know if the mouse is enabled by default in text-mode.

Ever used Turbo Vision? Now that was a joy to work with (well, if you have a slight masochistic streak) :)

Turbo PASCAL or Turbo BASIC?

Turbo C++ 3 and Turbo Pascal 6.
I realise it was over a decade ago :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.