Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Can you access the clip-board in DarkBASIC?

Author
Message
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 18th Nov 2005 02:34
Can you access the clip-board in DarkBASIC? Like, can you coopy something in DarkBASIC and paste it somewhere else?

Read Ender's Game. And all its sequals.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Nov 2005 05:22
If you mean write stuff to the clipboard and use another program (like Notepad) and paste the text then yes it's possible.

Run this code then go to Notepad and hit paste.
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 19th Nov 2005 00:20 Edited at: 19th Nov 2005 20:04
Ook, thanks. What I need more specifically is too coopy a bitmap

Read Ender's Game. And all its sequals.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2005 01:56
I did a few experiments to help you but the way it looks right it's impossible.

"write to clipboard" writes a string to the clipboard... and does not allow writing multiple strings into the clipboard. So if the stuff you want to write to the clipboard can't fit in one string then there's no way to do it. The limit of a string in Darkbasic is 255 characters. Pictures of any decent size take a lot more than 255 characters.
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 19th Nov 2005 20:04 Edited at: 19th Nov 2005 20:05
I just started reading through the manual, and I found that save image will woork well enough. Thanks Grog!

Read Ender's Game. And all its sequals.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2005 21:26
Np. I'm glad you found another command that'll do it for you. The clipboard commands are way too limited to do anything good.
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 20th Nov 2005 00:53
I agree.

Read Ender's Game. And all its sequals.
ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 20th Nov 2005 18:51
The string formats are too limited. I can't tell you how many times I thought I had something working, only to remember that, of course, there's a 255 character limit on strings. It's terrible for a lot of typed input, you wind up having to put in into a memblock.

AdamGameSource.com
3d Model Competition
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 20th Nov 2005 21:56


I just posted this snippet in reply to another thread, if you look at the last block of rem lines and the code that follows, you can see that the author of this code (not me btw) was copying bitmaps to the clipboard via system DLL`s, you might want to look at that.



if there is one thing I can NOT tolerate, it`s intolerant people.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Nov 2005 22:37
Quote: "The string formats are too limited. I can't tell you how many times I thought I had something working, only to remember that, of course, there's a 255 character limit on strings. It's terrible for a lot of typed input, you wind up having to put in into a memblock."


I wonder if that automatic limit has to do with the lack of Darkbasic's ability to define strings a certain number of characters (like "PlayerName as string * 50"... something i'd like to see in the next update). There has to be a limit somewhere so they just picked 255 characters as the limit.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 21st Nov 2005 06:32
I was bored so I did a test in QuickBasic 4.5... the character limit of strings in QuickBasic (a language that was made in 1985)... is 23,736 characters.

I love using Darkbasic and will probably use it for many, many, many years to come... but some things in Darkbasic just don't make sense.
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 21st Nov 2005 06:53
Yah, too bad they don't update DBC anymore.

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 21st Nov 2005 07:11 Edited at: 21st Nov 2005 07:14
Quote: "Yah, too bad they don't update DBC anymore."


Well it's just another thing to add to the list of negatives for anybody that wants to buy Classic over Pro. I tried a similar test in Pro... I never reached a limit. It got slower and slower adding to the string before I finally decided to stop the test.

It was over 25 million characters in a single string using Pro.
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 21st Nov 2005 10:27 Edited at: 21st Nov 2005 10:28
are my posts invisible or something?, this is the third reply I researched and made and not one word of recognition, what is this?, ignore a poster week?



I spent all my life being careful to not underestimate my opponents...then I realised...they realy are as dumb as they appear
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 22nd Nov 2005 04:33
Quote: "are my posts invisible or something?, this is the third reply I researched and made and not one word of recognition, what is this?, ignore a poster week? "


Sorry about that. I did see it... I just got distracted with the oddity of Darkbasics 255 character limit. That's a nice way to do it.
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 22nd Nov 2005 08:50
yay!

Ignore a poster week!!!

Er, I ignore those advertising ones all the time.

16-colour PNGs pwn.

Login to post a reply

Server time is: 2025-05-22 21:21:46
Your offset time is: 2025-05-22 21:21:46