Jump to content

Welcome to FTB Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

ComputerCraft term.setCursorPos() help

computercraft help term.setCursorPos()

Best Answer Hippieshaman , 06 March 2013 - 09:53 PM

Termx, Termy = term.getCursorPos()
Termy = Termy + 1
term.setCursorPos(1,Termy)

This will first get the current cursor pos, then add one to the Y-value (going down one line) and finally sets the cursor to the beginning of next line.

Go to the full post »


  • This topic is locked This topic is locked
1 reply to this topic

#1
Undefinedmaster

Undefinedmaster

    Member

  • Members
  • PipPip
  • 12 posts
  • Modpack:FTB Unleashed

In a program in ComputerCraft, I am trying to make the monitor type something one line below where it typed the last thing, however, I can't seem to get "term.setCursorPos()" to work with any args besides 1,1. How would you, for example, get the cursor to line 2?

 

Thanks,

Undefinedmaster


Did this post help? Rate my answer below.

13 Up 4 Down 2akl850.png


#2
Hippieshaman

Hippieshaman

    Advanced Member

  • Members
  • PipPipPip
  • 185 posts
  • Location:Hippiecraft HQ
  • Modpack:FTB Unleashed
✓  Best Answer
Termx, Termy = term.getCursorPos()
Termy = Termy + 1
term.setCursorPos(1,Termy)

This will first get the current cursor pos, then add one to the Y-value (going down one line) and finally sets the cursor to the beginning of next line.


Hippiecraft Community, since 2012.

Forum, Twitch, Youtube, Twitter, Planet Minecraft, Steam, Website

Contact us by e-mail: mail@hippiecraft.net | Support: support@hippiecraft.net






Also tagged with one or more of these keywords: computercraft, help, term.setCursorPos()

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users