My first programs with PureBasic

Developed or developing a new product in PureBasic? Tell the world about it.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

My first programs with PureBasic

Post by DevilDog »

Hey everyone,
I'm still learning Purebasic and I love it. I'm amazed at how much I've been able to do with it.

I've written a couple of programs that I thought I'd share in case anyone can use them and also to get some feedback on them.

There's three programs:

Astronomy Today - when you run this program it downloads the Astronomy Picture of the Day and sets it as your desktop background.

Buh-Bye - This program loads itself in the system tray and when you press the escape key it closes whatever the topmost application or window is.

Capture - This is my version of a screen capture utility I found but much smaller.

You can download them at http://utils.isengardtech.com

I'm still learning and I'd appreciate any advice or feedback.

I haven't had this much fun programming in way too many years :D
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: My first programs with PureBasic

Post by PB »

My thoughts:

> Astronomy Today

I don't use a wallpaper so I wouldn't use this, but I do visit "Astronomy
Picture of the Day" every now and then... it's a great site!

> Buh-Bye - This program loads itself in the system tray and when you press
> the escape key it closes whatever the topmost application or window is.

I personally wouldn't use this, because it's all too easy to hit Esc and close
something when you didn't want. What's wrong with ALT+F4 anyway? ;)

> Capture - This is my version of a screen capture utility

I love your comment on your web site: Capture is a 56k exe, but the other
version that inspired it requires the 20 MB .NET runtime to do the same job!

:lol:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

Hi, DD.
You learn fast. I look forward to your other programs. Thanks.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I don't find a use for the other two, but the capture could be handy. I'll keep it around and see if I use it. Something like that seems like a good candidate for the systray if a person is going to be using it much. The only critique I have to offer is that it doesn't seem to have any help function to give basic direction in how to use it at runtime. I ran it and had to go back to your website to see how to take a snapshot. Perhaps the ? symbol could raise a popup something along this line:

+ to Resize
x to Close
Double click window to save snapshot
visit author website
BERESHEIT
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

feedback

Post by DevilDog »

Thanks everyone for the feedback.

netmaestro I'll look into putting some help into the capture program.

Thanks again.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Do they work ok?

Post by DevilDog »

If you do decide to use any of the programs or even if you don't but at least are able to try them out on your system, let me know how they do as I don't have anything else other than win 2k to test and I would appreciate to know how they work on other systems.

thanks
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Good point, I've updated my sig with my hardware. I don't know how you're going about the window transparency so I can't say for sure, but I'll venture a guess that it won't work on Win9x. Which brings up another point, unless you've got some compelling reason for keeping it a secret, folks here on the forum like it best when programs are posted with full source. That way they can be (and likely will be) critiqued by PB gurus who can show all of us better and faster ways to do things. And that's really what the forum is all about, right? Just a bit of food for thought.
BERESHEIT
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

source code

Post by DevilDog »

netmaestro, you're right of course and I cobbled most of the code in the programs from code I found here.

If I hesitate at all to post the source code it would only be because of my newbie status and I'm sure I'm doing quite a few things in the least optimal way :oops:

But nevertheless I will post the source code when I get a chance to clean it up a bit.
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

:shock: Now you ask for the sources? The day I show you some of my projects you'll want the sources to "criticize" them too!! :lol:

My comment: I dont try out other's beginners applications, I never do. But.. For learning purposes, its ok to take someones code, change it to do what you want and keep on learning.. but posting as "my first programs" thats a little like a "copy&paste programmer wannabe" - Okey you're on the learning process (we all are on some aspects, thats true) But dont do that please.. I take it as robbing, to use someone elses code and take credit for it. Its just a comment im giving though. You aint making money out of it (you couldnt anyway!) But.. just remember to put the right credits when you use someone's routine or snippet..


About the programs... perhaps DevilDog finds them useful for himself.

Cheers


*covers his butt* By the way the first sentence of this post... its a joke, just in case.
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

what did I say?

Post by DevilDog »

OK dagcrack I guess you got up on the wrong side of the bed.

When I say "my first programs", I mean with PureBasic. I've been programming since 1987, so it will be almost 20 years in a year and a half so I think I'm a bit past a "programmer wannabe" as you so eloquently put it.

As for "robbing" by using code that has been posted on here, I don't even know how to address that. That's why it's been posted, isn't it? Did I not say I had taken the code from various places on this board? Do I need to name each post and author in order to use it?

*** Announcement ***
I did not write the original code in these programs. I took a little from here, a little from there and combined them into programs that do something else. You are under no obligation to use any of these programs. You will not hurt my feelings if you choose not to.

*** End of Announcement ***

Is that better dagcrack?

Man, try to share something and get smacked for it. Nice world.
When all is said and done, more is said than done.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

@dagcrack: Keep it down, will you son? The men are talking. :D
Last edited by netmaestro on Thu Aug 11, 2005 5:24 pm, edited 2 times in total.
BERESHEIT
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

For the program on systray whish close the current window when Escape is have been press : others shortcut would be good : hide the window, minimize and maximize. Simples suggestions. I'm refering me just with your first message in this post, I'm going to try thes.

EDIT: I have just tested Bye and Capture. Capture doesn't work because of problem of libraries (User32.dll) compatibility. About bye: it doesn't seem to work. I am on Windows 98 SE fully updated.
Last edited by Gansta93 on Thu Aug 11, 2005 4:45 pm, edited 1 time in total.
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

DevilDog wrote:I did not write the original code in these programs. I took a little from here, a little from there and combined them into programs that do something else. You are under no obligation to use any of these programs. You will not hurt my feelings if you choose not to.
Thats how i see it too! All code on this public forums is considered Public Domain and free to use how ever and when ever you like unless expressed by an author and even then it might just be a mention in credits.
netmaestro wrote:Which brings up another point, unless you've got some compelling reason for keeping it a secret, folks here on the forum like it best when programs are posted with full source
Asking an author to reveal his source code should be done politely. And even then he/she doesn't have to.
dagcrack wrote: My comment: I dont try out other's beginners applications, I never do. But.. For learning purposes, its ok to take someones code, change it to do what you want and keep on learning.. but posting as "my first programs" thats a little like a "copy&paste programmer wannabe" - Okey you're on the learning process (we all are on some aspects, thats true) But dont do that please.. I take it as robbing, to use someone elses code and take credit for it. Its just a comment im giving though. You aint making money out of it (you couldnt anyway!) But.. just remember to put the right credits when you use someone's routine or snippet..
This is total bullshit i'm afraid. I copy and paste peoples code from here and other places all the time, why should i give credit to other people (if they havn't expressly asked me to do so)? Am i a "copy&paste programmer wannabe"? Probably i am then! :roll: I look at it as why should i re-invent the wheel when i find a useful piece of code that somebody else has happened to write? This is a community and we post purely to help each other out and share tips and code. There is absolutely no problem with taking code from this forum.

Give DevilDog a break, he's sharing programs he doesn't have to, if you find them useful, then try them out, if not just skip this page. :roll: I hate the way some people are thought of as noobs just because their post count is low, some people here are extremely advanced coders but don't post much and share only brief snippets.
--Kale

Image
Gansta93
Enthusiast
Enthusiast
Posts: 238
Joined: Wed Oct 20, 2004 7:16 pm
Location: The Village
Contact:

Post by Gansta93 »

Oops, Bye works on Win 98 SE. But a "SystrayIconTooltip" would be very nice for accessibility reasons. :-)
Be seeing you! :-)

Gansta93
If you speak french, you can visite Le Monde de Gansta93 (Gansta93's World)
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

feedback

Post by DevilDog »

Gansta93, thanks for the feedback on this. I will see what I can do about testing it in a win98 pc. Maybe I can get a VM program so I can load 98 and test it. Thanks again.

Kale, I agree and hopefully, and from what I've seen so far, this is just a slight bump in the road. Everyone on this board is amazingly helpful and ver sharp, which is another reason I went ahead and paid for PB.
When all is said and done, more is said than done.
Post Reply