Ooops
September 28, 2021, 18:42:48

Author Topic: input  (Read 326 times)

Offline Pfaber11

  • Hero Member
  • *****
  • Posts: 796
  • Bonjour
input
« on: February 25, 2021, 09:09:07 »
Was wanting to know how I could input data via the keyboard . For example entering your name for a high score table .
  It's ok I've got it . Gettextinput()
« Last Edit: February 25, 2021, 10:08:54 by Pfaber11 »
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen.

Offline Dabz

  • Sr. Member
  • ****
  • Posts: 450
  • Is it cos I is ginger?
    • dabzy.co.uk
Re: input
« Reply #1 on: February 25, 2021, 10:22:39 »
I've never played with inputing in AGK (Apart from the commands that return true if a specific key has been pressed), but I imagine you will have to catch the key being pressed, which will be the ascii code for said key, wiggle it over to a string, rinse repeat until you catch the ascii code for the return key.

you may need to keep track if a key has been pressed and let go as well, theres probably loads of ways to do it, and im sure after glancing over the docs, the commands are there to do such a thing, its just not wrapped up in such a way where you can plonk one command down and be done, so make sure when you do it, have it nice and tidy so you can use the code later on! :)

Sorry for having no code, or can play myself, just im away and not in front of the computer.

EDIT: Oh,nice find, but, can you place the input [well, the inputs output so to speak) anywhere you want or is it just leashed to the left hand side like Print(), as in  it works like an old style input command?
« Last Edit: February 25, 2021, 12:19:32 by Dabz »
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Offline Pfaber11

  • Hero Member
  • *****
  • Posts: 796
  • Bonjour
Re: input
« Reply #2 on: February 25, 2021, 15:30:27 »
I'm not sure yet been shopping for the weekend . As soon as I know I'll post it here . I was just looking really at basic in AGK2 and although a lot of it might be missing I am thinking the commands have it covered as in the input commands . And Random numbers etc. I like to think anything that can be done with say free basic can be done in AGK2 plus a lot more . I looked at FreeBasic and it's not my cup of tea .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen.

Offline blinkok

  • Sr. Member
  • ****
  • Posts: 377
Re: input
« Reply #3 on: February 25, 2021, 18:32:07 »

Offline Pfaber11

  • Hero Member
  • *****
  • Posts: 796
  • Bonjour
Re: input
« Reply #4 on: February 26, 2021, 00:08:13 »
Well I eventually did it took hours very frustrating . I'm currently building a program for my own reference in the future . sort of a scrap book and this was added.  learnt quite a bit of new stuff today . gonna check out your link now . thanks .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal