Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Console Overtype

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sun Dec 05, 2010 11:31 pm    Post subject: Console Overtype Reply with quote

Is it possible to have overtype in a Windows console?

Example:

Code:
Loading... 0%


To

Code:
Loading... 100%


Changing the 0 to a 100%.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 05, 2010 11:39 pm    Post subject: This post has 1 review(s) Reply with quote

it's possible but there is no real nice way to do it afaik

you can either use system("cls")
use a shitload of newlines

or i guess you could handle all the drawing yourself, but this is overkill.
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sun Dec 05, 2010 11:42 pm    Post subject: Reply with quote

slovach wrote:
it's possible but there is no real nice way to do it afaik

you can either use system("cls")
use a shitload of newlines

or i guess you could handle all the drawing yourself, but this is overkill.


Oh Lord. That doesn't sound fun at all. Linux is just special, huh? I'll probably just end up clearing the console screen and rewriting it for a faux overtype.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 05, 2010 11:48 pm    Post subject: Reply with quote

why not just create a regular window? it doesn't have to be fancy.
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sun Dec 05, 2010 11:56 pm    Post subject: Reply with quote

slovach wrote:
why not just create a regular window? it doesn't have to be fancy.


But consoles are so much cooler! Haha, I guess I'm crazy for the console appearance.
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Mon Dec 06, 2010 2:57 am    Post subject: Reply with quote

http://msdn.microsoft.com/en-us/library/ms682073.aspx -> http://msdn.microsoft.com/en-us/library/ms686025.aspx . Just move the cursor and write new stuff.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Dec 06, 2010 6:20 am    Post subject: Reply with quote

you could print out a bunch of '\b' characters
Back to top
View user's profile Send private message MSN Messenger
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Mon Dec 06, 2010 8:26 am    Post subject: Reply with quote

Print "Loading... " + %
Write " " ~5 spaces after last .
Write the % again
REPEAT!
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Mon Dec 06, 2010 10:41 am    Post subject: Reply with quote

Jani gave the best method of doing it, spamming new lines and making it seem like it happened just creates a bigger memory footprint on the application and in the end makes it extremely inefficient.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Dec 06, 2010 1:07 pm    Post subject: Reply with quote

Wiccaan wrote:
Jani gave the best method of doing it, spamming new lines and making it seem like it happened just creates a bigger memory footprint on the application and in the end makes it extremely inefficient.


i think if you're going for portability though, it might be the most portable way nevertheless :\

gross
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Mon Dec 06, 2010 3:24 pm    Post subject: Reply with quote

slovach wrote:
Wiccaan wrote:
Jani gave the best method of doing it, spamming new lines and making it seem like it happened just creates a bigger memory footprint on the application and in the end makes it extremely inefficient.


i think if you're going for portability though, it might be the most portable way nevertheless :\

gross


Using \b for portability would be the better choice then to delete the chars. Granted you'll probably land up getting ugly flickering depending on how often its being updated.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Tue Dec 07, 2010 9:27 am    Post subject: Reply with quote

Also, if the console you are using supports the escape character sequence (e.g ansi) you could use "printf("\033[1;1H");" to set the cursor position to 1,1


This tends to work fine in 'most' linux and mac systems(depending in what state you're running) but for windows you may have to do some extra configuring to let the default console support ansi

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites