HyperNext Studio
HyperNext Studio => Getting Started => Topic started by: DanTheMan07 on July 01, 2010, 06:04:18 PM
-
Hello, alike many post I've read, I am also new to coding. I'm an html and css expert, but I've never went to java or any type of software programing. I have a very simple project and I'm not sure this is the program for me or not, here's what my program will do:
I have scripts for a game I play that is just like this:
http://example.url.com/do_job?user_id= (http://example.url.com/do_job?user_id=)[INPUT1]&job_id=[SELECTED FROM A DROP DOWN MENU]&session_id=a1d66a359cb72613fc9931c387068fc5420c80f2&auth_key=[INPUT 2]&nocache=1277996908403
whether you execute this in a browser, or tell a program to access the script, it will 'do the job' on the game.
The items in red will change, depending on the user's input. I need 2 text boxes, input1 and input2 and the job_id will inputed based on which item is selected from a drop down list.
I have no problem learning this on my own and by no means am I asking anyone to write this program for me. I just want advice from someone who knows what they are doing to tell me:
1.) Will this program do this
2.) Is this the best program for using this?
3.) If yes, please point me in the right direction. I've gone through the entire guide, I've made my 'hello world' program.. but I can't seem to find user input boxes, html execute commands, nor the capability to edit parts of the html based on input commands.
Any and all input will help. I'd much rather create a program for this than try to learn java or flash and put it on a webpage.
-
I'm not sure I understand your question.
Do you want your 'game' to run inside a web browser or as an application on a computer?
If your game needs to run inside a web browser then unfortunately you cannot produce it with HyperNext.
You would need to use some javascript or flash.
It is possible to serve web pages from a HyperNext built application/stack but the interactiveness and response speed is extremely poor as it can only handle one connection.
In fact I can't even recall how it works as it was something i played around with quite some time ago.
However if you want to produce your game as a standalone application or as a stack to run in HyperNext Player then you can do this with HyperNext.
Perhaps you mean an HTML viewer control as in REALbasic - a control that can display HTML pages etc - if so then again HyperNext V3 is of no use as it does not have an HTML viewer control. However, the forthcoming HyperNext v4 does have an HTML viewer control although it has some bugs notably when logging into a website via a php script.
-
Sorry I re-read my post and understand how it could be confusing. I'll re-word for you.
I want the user to run the program, and be asked for 3 things:
Type in your user id
Type in your auth key
Select your mission from the list
I have a URL that i want each of these inputs to alter certain aspects of the url. Once they answer the 3 things, they push a go button and the program will execute the generated url.
This url isn't a website address, its a request to send to a server, therefore it is not necessary to have to open up in a webpage, but if there is no way around it, it won't hurt anything, just annoy the user.
-
I have used java to generate the url, but I can't figure out how to get it to execute the url.. or even do me a simple favor of making the url a hyperlink, so I figured a program would be better for this.
-
Thank you for explaining again.
Yes, HyperNext can do what you want with getting user input and selecting from a list
Just open HyperNext and from the file menu create a new project.
Then add your 2 fields, a button, and a listbox or a popupmenu from the toolbar
In the button put this simple script
Global userID,authKey
Local okay
Put 1 into okay
Put field 1 into userID
Put field 2 into authKey
if userID='' then
Message 'empty userid'
Put 0 into okay
endif
if authKey='' then
Message 'empty auth key'
Put 0 into okay
endif
if okay=1 then
Message 'okay select game'
endif
This should get you started - then you just need to add the listbox and populate it - and in the listbox's script check that the userID and authKey global variablers are okay
On our website is a simple tutorial for creating an 'Hello World' program and also a QuickStart PDF
The built-in help and Language Reference PDF also both explain how listboxes and all the HyperNext commands/functions work
HyperNext can also retrieve a webpage but it doesn't have a control for rendering it.
There are a couple of projects on our Projects webpage showing how to retrieve a webpage
- 32 - StockQuotes
- 35 - web page monitor alarm
This example finds your IP address using the website 'www.whatismyip.org'. If successful it puts the IP address number into field 1.
Local webaddr,yield,timeout,filename,okay
@ Set params for URLexists function
HTTPSetHeaderName('User-Agent')
HTTPSetHeaderValue('My Web Browser')
Put 'http://www.whatismyip.org/' into webaddr
Put 1 into yield
Put 30 into timeout
Put 'webtext.txt' into filename
Put URLexistsFN(webaddr,yield,timeout,filename) into okay
@ If okay then write IP to field 1
If okay=1 Then
Local h1,sdata
OpenTReadLoc(filename,h1)
ReadTLine(h1,sdata)
Put sdata After field 1
CloseTRead(h1)
Else
Put 'unsuccessful' into field 1
EndIf